blob: 255aa2c44cce8594c5d3ccf4f84a4e37f8477f87 [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@ubuntu.com1abe1c52012-06-30 20:42:45 +02002929if test "$cross_compiling" = yes; then
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2931$as_echo_n "checking for python interpreter for cross build... " >&6; }
2932 if test -z "$PYTHON_FOR_BUILD"; then
2933 for interp in python$PACKAGE_VERSION python3 python; do
2934 which $interp >/dev/null 2>&1 || continue
2935 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2936 break
2937 fi
2938 interp=
2939 done
2940 if test x$interp = x; then
2941 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2942 fi
2943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2944$as_echo "$interp" >&6; }
doko@python.org97313302013-01-25 14:33:33 +01002945 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 +02002946 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002947elif test "$cross_compiling" = maybe; then
2948 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002949else
2950 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2951fi
2952
2953
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
Benjamin Petersond23f8222009-04-05 19:13:16 +00002955if test "$prefix" != "/"; then
2956 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2957fi
2958
2959
Martin v. Löwis11437992002-04-12 09:54:03 +00002960
2961
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002962# We don't use PACKAGE_ variables, and they cause conflicts
2963# with other autoconf-based packages that include Python.h
2964grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2965rm confdefs.h
2966mv confdefs.h.new confdefs.h
2967
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002968
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002969VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002970
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002971# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002972
2973SOVERSION=1.0
2974
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002975# The later defininition of _XOPEN_SOURCE disables certain features
2976# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2977
Matthias Kloseb9621712010-04-24 17:59:49 +00002978$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002979
2980
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002981# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2982# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2983# them.
2984
Matthias Kloseb9621712010-04-24 17:59:49 +00002985$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002986
2987
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002988# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2989# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2990# them.
2991
Matthias Kloseb9621712010-04-24 17:59:49 +00002992$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002993
2994
Martin v. Löwisd6320502004-08-12 13:45:08 +00002995# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2996# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2997
Matthias Kloseb9621712010-04-24 17:59:49 +00002998$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002999
3000
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003001# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3002# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3003# them.
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003006
3007
3008
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003009define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003010
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003011# Arguments passed to configure.
3012
3013CONFIG_ARGS="$ac_configure_args"
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3016$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003017# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003018if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003019 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003020 case $enableval in
3021 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003022 # Locate the best usable SDK, see Mac/README.txt for more
3023 # information
3024 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3025 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003026 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003027 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3028 if test ! -d "${enableval}"
3029 then
3030 enableval=/
3031 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003033 ;;
3034 esac
3035 case $enableval in
3036 no)
3037 UNIVERSALSDK=
3038 enable_universalsdk=
3039 ;;
3040 *)
3041 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042 if test ! -d "${UNIVERSALSDK}"
3043 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003044 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046 ;;
3047 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003048
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050else
3051
3052 UNIVERSALSDK=
3053 enable_universalsdk=
3054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003055fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003056
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057if test -n "${UNIVERSALSDK}"
3058then
Matthias Kloseb9621712010-04-24 17:59:49 +00003059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3060$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003061else
Matthias Kloseb9621712010-04-24 17:59:49 +00003062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3063$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003064fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003066
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003067
3068
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069# For backward compatibility reasons we prefer to select '32-bit' if available,
3070# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003072if test "`uname -s`" = "Darwin"
3073then
3074 if test -n "${UNIVERSALSDK}"
3075 then
3076 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3077 then
3078 UNIVERSAL_ARCHS="intel"
3079 fi
3080 fi
3081fi
3082
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3085$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086
3087# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003088if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3091$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092 UNIVERSAL_ARCHS="$withval"
3093
3094else
3095
Ned Deilycbfb9a52012-06-23 16:02:19 -07003096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3097$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003098
3099fi
3100
3101
3102
3103
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003104
3105# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003106if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003107 withval=$with_framework_name;
3108 PYTHONFRAMEWORK=${withval}
3109 PYTHONFRAMEWORKDIR=${withval}.framework
3110 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3111
3112else
3113
3114 PYTHONFRAMEWORK=Python
3115 PYTHONFRAMEWORKDIR=Python.framework
3116 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3117
3118fi
3119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003120# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003121if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003123 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003124 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003125 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003126 esac
3127 case $enableval in
3128 no)
3129 PYTHONFRAMEWORK=
3130 PYTHONFRAMEWORKDIR=no-framework
3131 PYTHONFRAMEWORKPREFIX=
3132 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003133 FRAMEWORKINSTALLFIRST=
3134 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003135 FRAMEWORKALTINSTALLFIRST=
3136 FRAMEWORKALTINSTALLLAST=
3137 if test "x${prefix}" = "xNONE"; then
3138 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3139 else
3140 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3141 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003142 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003143 ;;
3144 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003146 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003147 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003148 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003149 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3150 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003151 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003152
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003153 if test "x${prefix}" = "xNONE" ; then
3154 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003155
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003156 else
3157 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3158 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003159
3160 case "${enableval}" in
3161 /System*)
3162 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3163 if test "${prefix}" = "NONE" ; then
3164 # See below
3165 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3166 fi
3167 ;;
3168
3169 /Library*)
3170 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3171 ;;
3172
3173 */Library/Frameworks)
3174 MDIR="`dirname "${enableval}"`"
3175 MDIR="`dirname "${MDIR}"`"
3176 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3177
3178 if test "${prefix}" = "NONE"; then
3179 # User hasn't specified the
3180 # --prefix option, but wants to install
3181 # the framework in a non-default location,
3182 # ensure that the compatibility links get
3183 # installed relative to that prefix as well
3184 # instead of in /usr/local.
3185 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3186 fi
3187 ;;
3188
3189 *)
3190 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3191 ;;
3192 esac
3193
Jack Jansen127e56e2001-09-11 14:41:54 +00003194 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003196 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003200 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003202 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3203
3204 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3205
Jack Jansene578a632001-08-15 01:27:14 +00003206 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003207
Guido van Rossum563e7081996-09-10 18:20:48 +00003208else
Martin v. Löwis11437992002-04-12 09:54:03 +00003209
Jack Jansene578a632001-08-15 01:27:14 +00003210 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003211 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003212 PYTHONFRAMEWORKPREFIX=
3213 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003214 FRAMEWORKINSTALLFIRST=
3215 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003216 FRAMEWORKALTINSTALLFIRST=
3217 FRAMEWORKALTINSTALLLAST=
3218 if test "x${prefix}" = "xNONE" ; then
3219 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3220 else
3221 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3222 fi
Jack Jansene578a632001-08-15 01:27:14 +00003223 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003224
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003226fi
3227
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
3229
Michael W. Hudson54241132001-12-07 15:38:26 +00003230
3231
3232
3233
Jack Jansene578a632001-08-15 01:27:14 +00003234
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003235
3236
3237
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003238
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003239
Jack Jansene578a632001-08-15 01:27:14 +00003240##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003241## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003242## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003243##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244# Set name for machine-dependent library files
3245
Matthias Kloseb9621712010-04-24 17:59:49 +00003246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3247$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003248if test -z "$MACHDEP"
3249then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 # avoid using uname for cross builds
3251 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003252 # ac_sys_system and ac_sys_release are used for setting
3253 # a lot of different things including 'define_xopen_source'
3254 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 case "$host" in
3256 *-*-linux*)
3257 ac_sys_system=Linux
3258 ;;
3259 *-*-cygwin*)
3260 ac_sys_system=Cygwin
3261 ;;
3262 *)
3263 # for now, limit cross builds to known configurations
3264 MACHDEP="unknown"
3265 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3266 esac
3267 ac_sys_release=
3268 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003270 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003271 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003276 fi
3277 ac_md_system=`echo $ac_sys_system |
3278 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3279 ac_md_release=`echo $ac_sys_release |
3280 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3281 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003282
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003284 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003285 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003286 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003287 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003288 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290fi
Guido van Rossum91922671997-10-09 20:24:13 +00003291
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003292
3293if test "$cross_compiling" = yes; then
3294 case "$host" in
3295 *-*-linux*)
3296 case "$host_cpu" in
3297 arm*)
3298 _host_cpu=arm
3299 ;;
3300 *)
3301 _host_cpu=$host_cpu
3302 esac
3303 ;;
3304 *-*-cygwin*)
3305 _host_cpu=
3306 ;;
3307 *)
3308 # for now, limit cross builds to known configurations
3309 MACHDEP="unknown"
3310 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3311 esac
3312 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3313fi
3314
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003315# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3316# disable features if it is defined, without any means to access these
3317# features as extensions. For these systems, we skip the definition of
3318# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3319# some feature, make sure there is no alternative way to access this
3320# feature. Also, when using wildcards, make sure you have verified the
3321# need for not defining _XOPEN_SOURCE on all systems matching the
3322# wildcard, and that the wildcard does not include future systems
3323# (which may remove their limitations).
3324case $ac_sys_system/$ac_sys_release in
3325 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3326 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003327 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003328 # In addition, Stefan Krah confirms that issue #1244610 exists through
3329 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003330 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003331 define_xopen_source=no
3332 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3333 # also defined. This can be overridden by defining _BSD_SOURCE
3334 # As this has a different meaning on Linux, only define it on OpenBSD
3335
Matthias Kloseb9621712010-04-24 17:59:49 +00003336$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003337
3338 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003339 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003345
3346 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003347 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3348 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3349 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003350 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 +00003351 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003352 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3353 # request to enable features supported by the standard as a request
3354 # to disable features not supported by the standard. The best way
3355 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3356 # entirely and define __EXTENSIONS__ instead.
3357 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003358 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003359 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3360 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003361 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003362 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 define_xopen_source=no;;
3364 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003365 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003367 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003368 # On FreeBSD 4, the math functions C89 does not cover are never defined
3369 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3370 FreeBSD/4.*)
3371 define_xopen_source=no;;
3372 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3373 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3374 # identifies itself as Darwin/7.*
3375 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3376 # disables platform specific features beyond repair.
3377 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3378 # has no effect, don't bother defining them
3379 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003380 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003381 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003382 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003383 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3384 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3385 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003386 AIX/4)
3387 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003388 AIX/5)
3389 if test `uname -r` -eq 1; then
3390 define_xopen_source=no
3391 fi
3392 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003393 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3394 # defining NI_NUMERICHOST.
3395 QNX/6.3.2)
3396 define_xopen_source=no
3397 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003398
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003399esac
3400
3401if test $define_xopen_source = yes
3402then
Victor Stinner14d098d2011-09-07 22:29:43 +02003403 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
Victor Stinner14d098d2011-09-07 22:29:43 +02003405$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003406
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
3408 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3409 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3410 # several APIs are not declared. Since this is also needed in some
3411 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Matthias Kloseb9621712010-04-24 17:59:49 +00003413$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003414
3415
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003416
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003417$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003419fi
3420
Guido van Rossum91922671997-10-09 20:24:13 +00003421#
3422# SGI compilers allow the specification of the both the ABI and the
3423# ISA on the command line. Depending on the values of these switches,
3424# different and often incompatable code will be generated.
3425#
3426# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3427# thus supply support for various ABI/ISA combinations. The MACHDEP
3428# variable is also adjusted.
3429#
3430
3431if test ! -z "$SGI_ABI"
3432then
3433 CC="cc $SGI_ABI"
3434 LDFLAGS="$SGI_ABI $LDFLAGS"
3435 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3438$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003439
Jack Jansen6b08a402004-06-03 12:41:45 +00003440# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3441# it may influence the way we can build extensions, so distutils
3442# needs to check it
3443
Thomas Wouters477c8d52006-05-27 19:21:47 +00003444
Jack Jansen6b08a402004-06-03 12:41:45 +00003445CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003446EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003447
Guido van Rossum627b2d71993-12-24 10:39:16 +00003448# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003449
3450# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3451# for debug/optimization stuff. BASECFLAGS is for flags that are required
3452# just to get things to compile and link. Users are free to override OPT
3453# when running configure or make. The build should not break if they do.
3454# BASECFLAGS should generally not be messed with, however.
3455
3456# XXX shouldn't some/most/all of this code be merged with the stuff later
3457# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3459$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003462if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003464 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003465 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003466 without_gcc=yes;;
3467 yes) CC=gcc
3468 without_gcc=no;;
3469 *) CC=$withval
3470 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003471 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003472else
Martin v. Löwis11437992002-04-12 09:54:03 +00003473
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003474 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003475 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003476 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003477 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003478 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479fi
3480
Matthias Kloseb9621712010-04-24 17:59:49 +00003481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3482$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003483
Guido van Rossum8b131c51995-03-09 14:10:13 +00003484# If the user switches compilers, we can't believe the cache
3485if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3486then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003487 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003488(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003489fi
3490
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003491# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3492# when the compiler supports them, but we don't always want -O2, and
3493# we set -g later.
3494if test -z "$CFLAGS"; then
3495 CFLAGS=
3496fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003497
3498if test "$ac_sys_system" = "Darwin"
3499then
3500 # Compiler selection on MacOSX is more complicated than
3501 # AC_PROG_CC can handle, see Mac/README.txt for more
3502 # information
3503 if test -z "${CC}"
3504 then
3505 found_gcc=
3506 found_clang=
3507 as_save_IFS=$IFS; IFS=:
3508 for as_dir in $PATH
3509 do
3510 IFS=$as_save_IFS
3511 if test -x $as_dir/gcc; then
3512 if test -z "${found_gcc}"; then
3513 found_gcc=$as_dir/gcc
3514 fi
3515 fi
3516 if test -x $as_dir/clang; then
3517 if test -z "${found_clang}"; then
3518 found_clang=$as_dir/clang
3519 fi
3520 fi
3521 done
3522 IFS=$as_save_IFS
3523
3524 if test -n "$found_gcc" -a -n "$found_clang"
3525 then
3526 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3527 then
3528 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3529$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3530 CC="$found_clang"
3531 CXX="$found_clang++"
3532 fi
3533
3534
3535 elif test -z "$found_gcc" -a -n "$found_clang"
3536 then
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3538$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3539 CC="$found_clang"
3540 CXX="$found_clang++"
3541
3542 elif test -z "$found_gcc" -a -z "$found_clang"
3543 then
3544 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3545 if test -n "${found_clang}"
3546 then
3547 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3548$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3549 CC="${found_clang}"
3550 CXX="`/usr/bin/xcrun -find clang++`"
3551
3552 # else: use default behaviour
3553 fi
3554 fi
3555 fi
3556fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003557ac_ext=c
3558ac_cpp='$CPP $CPPFLAGS'
3559ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3560ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3561ac_compiler_gnu=$ac_cv_c_compiler_gnu
3562if test -n "$ac_tool_prefix"; then
3563 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3564set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3566$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003567if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003569else
3570 if test -n "$CC"; then
3571 ac_cv_prog_CC="$CC" # Let the user override the test.
3572else
Martin v. Löwis11437992002-04-12 09:54:03 +00003573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3574for as_dir in $PATH
3575do
3576 IFS=$as_save_IFS
3577 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003578 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003579 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003580 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003581 $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 +00003582 break 2
3583 fi
3584done
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003586IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003587
Jack Jansendd19cf82001-12-06 22:36:17 +00003588fi
3589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003590CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003591if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3593$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003594else
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3596$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003597fi
3598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599
Martin v. Löwis11437992002-04-12 09:54:03 +00003600fi
3601if test -z "$ac_cv_prog_CC"; then
3602 ac_ct_CC=$CC
3603 # Extract the first word of "gcc", so it can be a program name with args.
3604set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3606$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003607if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003609else
3610 if test -n "$ac_ct_CC"; then
3611 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3612else
3613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3614for as_dir in $PATH
3615do
3616 IFS=$as_save_IFS
3617 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003619 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 $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 +00003622 break 2
3623 fi
3624done
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003627
3628fi
3629fi
3630ac_ct_CC=$ac_cv_prog_ac_ct_CC
3631if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3633$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003634else
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3636$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003637fi
3638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639 if test "x$ac_ct_CC" = x; then
3640 CC=""
3641 else
3642 case $cross_compiling:$ac_tool_warned in
3643yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003644{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3645$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646ac_tool_warned=yes ;;
3647esac
3648 CC=$ac_ct_CC
3649 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003650else
3651 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003652fi
3653
Jack Jansendd19cf82001-12-06 22:36:17 +00003654if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 if test -n "$ac_tool_prefix"; then
3656 # 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 +00003657set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3659$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003660if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003662else
3663 if test -n "$CC"; then
3664 ac_cv_prog_CC="$CC" # Let the user override the test.
3665else
Martin v. Löwis11437992002-04-12 09:54:03 +00003666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 $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 +00003675 break 2
3676 fi
3677done
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003680
3681fi
3682fi
3683CC=$ac_cv_prog_CC
3684if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3686$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003687else
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3689$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690fi
3691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003694fi
3695if test -z "$CC"; then
3696 # Extract the first word of "cc", so it can be a program name with args.
3697set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3699$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003700if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003702else
3703 if test -n "$CC"; then
3704 ac_cv_prog_CC="$CC" # Let the user override the test.
3705else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003706 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003707as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3708for as_dir in $PATH
3709do
3710 IFS=$as_save_IFS
3711 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003714 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3715 ac_prog_rejected=yes
3716 continue
3717 fi
3718 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 $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 +00003720 break 2
3721 fi
3722done
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003725
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003726if test $ac_prog_rejected = yes; then
3727 # We found a bogon in the path, so make sure we never use it.
3728 set dummy $ac_cv_prog_CC
3729 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003731 # We chose a different compiler from the bogus one.
3732 # However, it has the same basename, so the bogon will be chosen
3733 # first if we set CC to just the basename; use the full file name.
3734 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003735 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003736 fi
3737fi
3738fi
3739fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003740CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3743$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744else
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3746$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003747fi
3748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749
Martin v. Löwis11437992002-04-12 09:54:03 +00003750fi
3751if test -z "$CC"; then
3752 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003754 do
3755 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3756set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3758$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003759if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003761else
3762 if test -n "$CC"; then
3763 ac_cv_prog_CC="$CC" # Let the user override the test.
3764else
Martin v. Löwis11437992002-04-12 09:54:03 +00003765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3766for as_dir in $PATH
3767do
3768 IFS=$as_save_IFS
3769 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003772 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 $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 +00003774 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003775 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003776done
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003778IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003779
3780fi
3781fi
3782CC=$ac_cv_prog_CC
3783if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3785$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003786else
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3788$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003789fi
3790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 test -n "$CC" && break
3793 done
3794fi
3795if test -z "$CC"; then
3796 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003798do
3799 # Extract the first word of "$ac_prog", so it can be a program name with args.
3800set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3802$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003803if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003805else
3806 if test -n "$ac_ct_CC"; then
3807 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3808else
3809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3810for as_dir in $PATH
3811do
3812 IFS=$as_save_IFS
3813 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003816 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 $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 +00003818 break 2
3819 fi
3820done
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003823
Martin v. Löwis11437992002-04-12 09:54:03 +00003824fi
3825fi
3826ac_ct_CC=$ac_cv_prog_ac_ct_CC
3827if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3829$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003830else
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3832$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003833fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 test -n "$ac_ct_CC" && break
3837done
Michael W. Hudson54241132001-12-07 15:38:26 +00003838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839 if test "x$ac_ct_CC" = x; then
3840 CC=""
3841 else
3842 case $cross_compiling:$ac_tool_warned in
3843yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003844{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3845$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846ac_tool_warned=yes ;;
3847esac
3848 CC=$ac_ct_CC
3849 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003850fi
3851
3852fi
3853
3854
Matthias Kloseb9621712010-04-24 17:59:49 +00003855test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3856$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003857as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003858See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003859
3860# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003861$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3862set X $ac_compile
3863ac_compiler=$2
3864for ac_option in --version -v -V -qversion; do
3865 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866case "(($ac_try" in
3867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3868 *) ac_try_echo=$ac_try;;
3869esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003870eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3871$as_echo "$ac_try_echo"; } >&5
3872 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003873 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 if test -s conftest.err; then
3875 sed '10a\
3876... rest of stderr output deleted ...
3877 10q' conftest.err >conftest.er1
3878 cat conftest.er1 >&5
3879 fi
3880 rm -f conftest.er1 conftest.err
3881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3882 test $ac_status = 0; }
3883done
Martin v. Löwis11437992002-04-12 09:54:03 +00003884
Matthias Kloseb9621712010-04-24 17:59:49 +00003885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003886/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003887
Martin v. Löwis11437992002-04-12 09:54:03 +00003888int
3889main ()
3890{
3891
3892 ;
3893 return 0;
3894}
3895_ACEOF
3896ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003897ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003898# Try to create an executable without -o first, disregard a.out.
3899# It will help us diagnose broken compilers, and finding out an intuition
3900# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3902$as_echo_n "checking whether the C compiler works... " >&6; }
3903ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3904
3905# The possible output files:
3906ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908ac_rmfiles=
3909for ac_file in $ac_files
3910do
3911 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003912 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3914 esac
3915done
3916rm -f $ac_rmfiles
3917
Matthias Kloseb9621712010-04-24 17:59:49 +00003918if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919case "(($ac_try" in
3920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3921 *) ac_try_echo=$ac_try;;
3922esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003923eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3924$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003926 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3928 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3930# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3931# in a Makefile. We should not override ac_cv_exeext if it was cached,
3932# so that the user can short-circuit this test for compilers unknown to
3933# Autoconf.
3934for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003935do
3936 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003937 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003939 ;;
3940 [ab].out )
3941 # We found the default executable, but exeext='' is most
3942 # certainly right.
3943 break;;
3944 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 then :; else
3947 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3948 fi
3949 # We set ac_cv_exeext here because the later test for it is not
3950 # safe: cross compilers may not add the suffix if given an `-o'
3951 # argument, so we may need to know it at that point already.
3952 # Even if this section looks crufty: it has the advantage of
3953 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003954 break;;
3955 * )
3956 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003957 esac
3958done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959test "$ac_cv_exeext" = no && ac_cv_exeext=
3960
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003961else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962 ac_file=''
3963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003964if test -z "$ac_file"; then :
3965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3966$as_echo "no" >&6; }
3967$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003968sed 's/^/| /' conftest.$ac_ext >&5
3969
Matthias Kloseb9621712010-04-24 17:59:49 +00003970{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003972as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003973See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003974else
3975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3976$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3979$as_echo_n "checking for C compiler default output file name... " >&6; }
3980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3981$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003983
Matthias Kloseb9621712010-04-24 17:59:49 +00003984rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3987$as_echo_n "checking for suffix of executables... " >&6; }
3988if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989case "(($ac_try" in
3990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3991 *) ac_try_echo=$ac_try;;
3992esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003993eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3994$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003996 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003997 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3998 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4000# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4001# work properly (i.e., refer to `conftest.exe'), while it won't with
4002# `rm'.
4003for ac_file in conftest.exe conftest conftest.*; do
4004 test -f "$ac_file" || continue
4005 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004006 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004007 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4008 break;;
4009 * ) break;;
4010 esac
4011done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004012else
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004015as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004016See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004017fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004018rm -f conftest conftest$ac_cv_exeext
4019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4020$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004021
4022rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004023EXEEXT=$ac_cv_exeext
4024ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4026/* end confdefs.h. */
4027#include <stdio.h>
4028int
4029main ()
4030{
4031FILE *f = fopen ("conftest.out", "w");
4032 return ferror (f) || fclose (f) != 0;
4033
4034 ;
4035 return 0;
4036}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004038ac_clean_files="$ac_clean_files conftest.out"
4039# Check that the compiler produces executables we can run. If not, either
4040# the compiler is broken, or we cross compile.
4041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4042$as_echo_n "checking whether we are cross compiling... " >&6; }
4043if test "$cross_compiling" != yes; then
4044 { { ac_try="$ac_link"
4045case "(($ac_try" in
4046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4047 *) ac_try_echo=$ac_try;;
4048esac
4049eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4050$as_echo "$ac_try_echo"; } >&5
4051 (eval "$ac_link") 2>&5
4052 ac_status=$?
4053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4054 test $ac_status = 0; }
4055 if { ac_try='./conftest$ac_cv_exeext'
4056 { { case "(($ac_try" in
4057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4058 *) ac_try_echo=$ac_try;;
4059esac
4060eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4061$as_echo "$ac_try_echo"; } >&5
4062 (eval "$ac_try") 2>&5
4063 ac_status=$?
4064 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4065 test $ac_status = 0; }; }; then
4066 cross_compiling=no
4067 else
4068 if test "$cross_compiling" = maybe; then
4069 cross_compiling=yes
4070 else
4071 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4072$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004073as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004074If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004075See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 fi
4077 fi
4078fi
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4080$as_echo "$cross_compiling" >&6; }
4081
4082rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4083ac_clean_files=$ac_clean_files_save
4084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4085$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004086if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 $as_echo_n "(cached) " >&6
4088else
4089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004090/* end confdefs.h. */
4091
4092int
4093main ()
4094{
4095
4096 ;
4097 return 0;
4098}
4099_ACEOF
4100rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004101if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004102case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4107$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004108 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004109 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4111 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004112 for ac_file in conftest.o conftest.obj conftest.*; do
4113 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004114 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004116 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4117 break;;
4118 esac
4119done
4120else
Matthias Kloseb9621712010-04-24 17:59:49 +00004121 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004122sed 's/^/| /' conftest.$ac_ext >&5
4123
Matthias Kloseb9621712010-04-24 17:59:49 +00004124{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004126as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004127See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004128fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004129rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4132$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004133OBJEXT=$ac_cv_objext
4134ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4136$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004137if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004139else
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004142
Martin v. Löwis11437992002-04-12 09:54:03 +00004143int
4144main ()
4145{
4146#ifndef __GNUC__
4147 choke me
4148#endif
4149
4150 ;
4151 return 0;
4152}
4153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004154if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 ac_compiler_gnu=yes
4156else
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004160ac_cv_c_compiler_gnu=$ac_compiler_gnu
4161
4162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4164$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4165if test $ac_compiler_gnu = yes; then
4166 GCC=yes
4167else
4168 GCC=
4169fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004170ac_test_CFLAGS=${CFLAGS+set}
4171ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4173$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004174if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004176else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004177 ac_save_c_werror_flag=$ac_c_werror_flag
4178 ac_c_werror_flag=yes
4179 ac_cv_prog_cc_g=no
4180 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004183
Martin v. Löwis11437992002-04-12 09:54:03 +00004184int
4185main ()
4186{
4187
4188 ;
4189 return 0;
4190}
4191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004192if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004193 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194else
Matthias Kloseb9621712010-04-24 17:59:49 +00004195 CFLAGS=""
4196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197/* end confdefs.h. */
4198
4199int
4200main ()
4201{
4202
4203 ;
4204 return 0;
4205}
4206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004207if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004208
Matthias Kloseb9621712010-04-24 17:59:49 +00004209else
4210 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004211 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213/* end confdefs.h. */
4214
4215int
4216main ()
4217{
4218
4219 ;
4220 return 0;
4221}
4222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004223if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4231 ac_c_werror_flag=$ac_save_c_werror_flag
4232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4234$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004235if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004236 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004237elif test $ac_cv_prog_cc_g = yes; then
4238 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239 CFLAGS="-g -O2"
4240 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004241 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004242 fi
4243else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004244 if test "$GCC" = yes; then
4245 CFLAGS="-O2"
4246 else
4247 CFLAGS=
4248 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4251$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004252if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004253 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004254else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004256ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004258/* end confdefs.h. */
4259#include <stdarg.h>
4260#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004261struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004262/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4263struct buf { int x; };
4264FILE * (*rcsopen) (struct buf *, struct stat *, int);
4265static char *e (p, i)
4266 char **p;
4267 int i;
4268{
4269 return p[i];
4270}
4271static char *f (char * (*g) (char **, int), char **p, ...)
4272{
4273 char *s;
4274 va_list v;
4275 va_start (v,p);
4276 s = g (p, va_arg (v,int));
4277 va_end (v);
4278 return s;
4279}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004280
4281/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4282 function prototypes and stuff, but not '\xHH' hex character constants.
4283 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004285 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4286 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004288int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4289
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4291 inside strings and character constants. */
4292#define FOO(x) 'x'
4293int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4294
Skip Montanaro6dead952003-09-25 14:50:04 +00004295int test (int i, double x);
4296struct s1 {int (*f) (int a);};
4297struct s2 {int (*f) (double a);};
4298int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4299int argc;
4300char **argv;
4301int
4302main ()
4303{
4304return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4305 ;
4306 return 0;
4307}
4308_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4310 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004311do
4312 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316rm -f core conftest.err conftest.$ac_objext
4317 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004318done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004320CC=$ac_save_CC
4321
4322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323# AC_CACHE_VAL
4324case "x$ac_cv_prog_cc_c89" in
4325 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4327$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4330$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004331 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4334$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004335esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004336if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004337
Matthias Kloseb9621712010-04-24 17:59:49 +00004338fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004339
Martin v. Löwis11437992002-04-12 09:54:03 +00004340ac_ext=c
4341ac_cpp='$CPP $CPPFLAGS'
4342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4344ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004345
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004346
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004347
4348
Matthias Kloseb9621712010-04-24 17:59:49 +00004349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4350$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004353if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004355
4356 case $withval in
4357 no) with_cxx_main=no
4358 MAINCC='$(CC)';;
4359 yes) with_cxx_main=yes
4360 MAINCC='$(CXX)';;
4361 *) with_cxx_main=yes
4362 MAINCC=$withval
4363 if test -z "$CXX"
4364 then
4365 CXX=$withval
4366 fi;;
4367 esac
4368else
4369
4370 with_cxx_main=no
4371 MAINCC='$(CC)'
4372
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373fi
4374
Matthias Kloseb9621712010-04-24 17:59:49 +00004375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4376$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004377
4378preset_cxx="$CXX"
4379if test -z "$CXX"
4380then
4381 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004382 gcc) if test -n "$ac_tool_prefix"; then
4383 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4384set dummy ${ac_tool_prefix}g++; ac_word=$2
4385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4386$as_echo_n "checking for $ac_word... " >&6; }
4387if ${ac_cv_path_CXX+:} false; then :
4388 $as_echo_n "(cached) " >&6
4389else
4390 case $CXX in
4391 [\\/]* | ?:[\\/]*)
4392 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4393 ;;
4394 *)
4395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4396for as_dir in notfound
4397do
4398 IFS=$as_save_IFS
4399 test -z "$as_dir" && as_dir=.
4400 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004401 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004402 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4403 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4404 break 2
4405 fi
4406done
4407 done
4408IFS=$as_save_IFS
4409
4410 ;;
4411esac
4412fi
4413CXX=$ac_cv_path_CXX
4414if test -n "$CXX"; then
4415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4416$as_echo "$CXX" >&6; }
4417else
4418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4419$as_echo "no" >&6; }
4420fi
4421
4422
4423fi
4424if test -z "$ac_cv_path_CXX"; then
4425 ac_pt_CXX=$CXX
4426 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004427set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4429$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004430if ${ac_cv_path_ac_pt_CXX+:} false; then :
4431 $as_echo_n "(cached) " >&6
4432else
4433 case $ac_pt_CXX in
4434 [\\/]* | ?:[\\/]*)
4435 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4436 ;;
4437 *)
4438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4439for as_dir in notfound
4440do
4441 IFS=$as_save_IFS
4442 test -z "$as_dir" && as_dir=.
4443 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004444 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004445 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4446 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4447 break 2
4448 fi
4449done
4450 done
4451IFS=$as_save_IFS
4452
4453 ;;
4454esac
4455fi
4456ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4457if test -n "$ac_pt_CXX"; then
4458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4459$as_echo "$ac_pt_CXX" >&6; }
4460else
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4462$as_echo "no" >&6; }
4463fi
4464
4465 if test "x$ac_pt_CXX" = x; then
4466 CXX="g++"
4467 else
4468 case $cross_compiling:$ac_tool_warned in
4469yes:)
4470{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4471$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4472ac_tool_warned=yes ;;
4473esac
4474 CXX=$ac_pt_CXX
4475 fi
4476else
4477 CXX="$ac_cv_path_CXX"
4478fi
4479 ;;
4480 cc) if test -n "$ac_tool_prefix"; then
4481 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4482set dummy ${ac_tool_prefix}c++; ac_word=$2
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4484$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004485if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004486 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004487else
4488 case $CXX in
4489 [\\/]* | ?:[\\/]*)
4490 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4491 ;;
4492 *)
4493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4494for as_dir in notfound
4495do
4496 IFS=$as_save_IFS
4497 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004498 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004499 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004500 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004501 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004502 break 2
4503 fi
4504done
Matthias Kloseb9621712010-04-24 17:59:49 +00004505 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004506IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004507
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004508 ;;
4509esac
4510fi
4511CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004512if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4514$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004515else
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4517$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004519
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004520
4521fi
4522if test -z "$ac_cv_path_CXX"; then
4523 ac_pt_CXX=$CXX
4524 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004525set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4527$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004528if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004529 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004530else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004531 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004532 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004533 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 +00004534 ;;
4535 *)
4536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4537for as_dir in notfound
4538do
4539 IFS=$as_save_IFS
4540 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004541 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004542 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004543 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004545 break 2
4546 fi
4547done
Matthias Kloseb9621712010-04-24 17:59:49 +00004548 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004549IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004551 ;;
4552esac
4553fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004554ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4555if test -n "$ac_pt_CXX"; then
4556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4557$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004558else
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4560$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004562
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004563 if test "x$ac_pt_CXX" = x; then
4564 CXX="c++"
4565 else
4566 case $cross_compiling:$ac_tool_warned in
4567yes:)
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4569$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4570ac_tool_warned=yes ;;
4571esac
4572 CXX=$ac_pt_CXX
4573 fi
4574else
4575 CXX="$ac_cv_path_CXX"
4576fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004577 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004578 clang|*/clang) if test -n "$ac_tool_prefix"; then
4579 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4580set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4582$as_echo_n "checking for $ac_word... " >&6; }
4583if ${ac_cv_path_CXX+:} false; then :
4584 $as_echo_n "(cached) " >&6
4585else
4586 case $CXX in
4587 [\\/]* | ?:[\\/]*)
4588 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4589 ;;
4590 *)
4591 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4592for as_dir in notfound
4593do
4594 IFS=$as_save_IFS
4595 test -z "$as_dir" && as_dir=.
4596 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004597 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004598 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4599 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4600 break 2
4601 fi
4602done
4603 done
4604IFS=$as_save_IFS
4605
Ned Deilycbfb9a52012-06-23 16:02:19 -07004606 ;;
4607esac
4608fi
4609CXX=$ac_cv_path_CXX
4610if test -n "$CXX"; then
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4612$as_echo "$CXX" >&6; }
4613else
4614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4615$as_echo "no" >&6; }
4616fi
4617
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004618
4619fi
4620if test -z "$ac_cv_path_CXX"; then
4621 ac_pt_CXX=$CXX
4622 # Extract the first word of "clang++", so it can be a program name with args.
4623set dummy clang++; ac_word=$2
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625$as_echo_n "checking for $ac_word... " >&6; }
4626if ${ac_cv_path_ac_pt_CXX+:} false; then :
4627 $as_echo_n "(cached) " >&6
4628else
4629 case $ac_pt_CXX in
4630 [\\/]* | ?:[\\/]*)
4631 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4632 ;;
4633 *)
4634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635for as_dir in notfound
4636do
4637 IFS=$as_save_IFS
4638 test -z "$as_dir" && as_dir=.
4639 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004641 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643 break 2
4644 fi
4645done
4646 done
4647IFS=$as_save_IFS
4648
4649 ;;
4650esac
4651fi
4652ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4653if test -n "$ac_pt_CXX"; then
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4655$as_echo "$ac_pt_CXX" >&6; }
4656else
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
4659fi
4660
4661 if test "x$ac_pt_CXX" = x; then
4662 CXX="clang++"
4663 else
4664 case $cross_compiling:$ac_tool_warned in
4665yes:)
4666{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4667$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4668ac_tool_warned=yes ;;
4669esac
4670 CXX=$ac_pt_CXX
4671 fi
4672else
4673 CXX="$ac_cv_path_CXX"
4674fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004675 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004676 esac
4677 if test "$CXX" = "notfound"
4678 then
4679 CXX=""
4680 fi
4681fi
4682if test -z "$CXX"
4683then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004684 if test -n "$ac_tool_prefix"; then
4685 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4686 do
4687 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4688set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4690$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004691if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004692 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004693else
4694 if test -n "$CXX"; then
4695 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4696else
4697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4698for as_dir in $PATH
4699do
4700 IFS=$as_save_IFS
4701 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004702 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004704 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004706 break 2
4707 fi
4708done
Matthias Kloseb9621712010-04-24 17:59:49 +00004709 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004710IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004711
4712fi
4713fi
4714CXX=$ac_cv_prog_CXX
4715if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4717$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004718else
Matthias Kloseb9621712010-04-24 17:59:49 +00004719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004721fi
4722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004723
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004724 test -n "$CXX" && break
4725 done
4726fi
4727if test -z "$CXX"; then
4728 ac_ct_CXX=$CXX
4729 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4730do
4731 # Extract the first word of "$ac_prog", so it can be a program name with args.
4732set dummy $ac_prog; ac_word=$2
4733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4734$as_echo_n "checking for $ac_word... " >&6; }
4735if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4736 $as_echo_n "(cached) " >&6
4737else
4738 if test -n "$ac_ct_CXX"; then
4739 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4740else
4741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4742for as_dir in $PATH
4743do
4744 IFS=$as_save_IFS
4745 test -z "$as_dir" && as_dir=.
4746 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004748 ac_cv_prog_ac_ct_CXX="$ac_prog"
4749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4750 break 2
4751 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004753 done
4754IFS=$as_save_IFS
4755
4756fi
4757fi
4758ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4759if test -n "$ac_ct_CXX"; then
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4761$as_echo "$ac_ct_CXX" >&6; }
4762else
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4764$as_echo "no" >&6; }
4765fi
4766
4767
4768 test -n "$ac_ct_CXX" && break
4769done
4770
4771 if test "x$ac_ct_CXX" = x; then
4772 CXX="notfound"
4773 else
4774 case $cross_compiling:$ac_tool_warned in
4775yes:)
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4778ac_tool_warned=yes ;;
4779esac
4780 CXX=$ac_ct_CXX
4781 fi
4782fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783
4784 if test "$CXX" = "notfound"
4785 then
4786 CXX=""
4787 fi
4788fi
4789if test "$preset_cxx" != "$CXX"
4790then
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792
4793 By default, distutils will build C++ extension modules with \"$CXX\".
4794 If this is not intended, then set CXX on the configure command line.
4795 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004796$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797
4798 By default, distutils will build C++ extension modules with \"$CXX\".
4799 If this is not intended, then set CXX on the configure command line.
4800 " >&2;}
4801fi
4802
4803
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4805$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4806save_LDFLAGS="$LDFLAGS"
4807LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004808
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4810/* end confdefs.h. */
4811
4812int
4813main ()
4814{
4815
4816 ;
4817 return 0;
4818}
4819_ACEOF
4820if ac_fn_c_try_link "$LINENO"; then :
4821 NO_AS_NEEDED="-Wl,--no-as-needed"
4822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4823$as_echo "yes" >&6; }
4824else
4825 NO_AS_NEEDED=""
4826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4827$as_echo "no" >&6; }
4828fi
4829rm -f core conftest.err conftest.$ac_objext \
4830 conftest$ac_exeext conftest.$ac_ext
4831LDFLAGS="$save_LDFLAGS"
4832
4833
4834
4835# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004836ac_ext=c
4837ac_cpp='$CPP $CPPFLAGS'
4838ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4839ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4840ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4842$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004843# On Suns, sometimes $CPP names a directory.
4844if test -n "$CPP" && test -d "$CPP"; then
4845 CPP=
4846fi
4847if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004848 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004850else
Martin v. Löwis11437992002-04-12 09:54:03 +00004851 # Double quotes because CPP needs to be expanded
4852 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4853 do
4854 ac_preproc_ok=false
4855for ac_c_preproc_warn_flag in '' yes
4856do
4857 # Use a header file that comes with gcc, so configuring glibc
4858 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004859 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4860 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004861 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004862 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004864/* end confdefs.h. */
4865#ifdef __STDC__
4866# include <limits.h>
4867#else
4868# include <assert.h>
4869#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004870 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004872if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004873
Matthias Kloseb9621712010-04-24 17:59:49 +00004874else
Martin v. Löwis11437992002-04-12 09:54:03 +00004875 # Broken: fails on valid input.
4876continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004877fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004878rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004880 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004881 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004884#include <ac_nonexistent.h>
4885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004886if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004887 # Broken: success on invalid input.
4888continue
4889else
Martin v. Löwis11437992002-04-12 09:54:03 +00004890 # Passes both tests.
4891ac_preproc_ok=:
4892break
4893fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004894rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004895
4896done
4897# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004898rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004899if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004900 break
4901fi
4902
4903 done
4904 ac_cv_prog_CPP=$CPP
4905
4906fi
4907 CPP=$ac_cv_prog_CPP
4908else
4909 ac_cv_prog_CPP=$CPP
4910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4912$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004913ac_preproc_ok=false
4914for ac_c_preproc_warn_flag in '' yes
4915do
4916 # Use a header file that comes with gcc, so configuring glibc
4917 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004918 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4919 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004920 # On the NeXT, cc -E runs the code through the compiler's parser,
4921 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004923/* end confdefs.h. */
4924#ifdef __STDC__
4925# include <limits.h>
4926#else
4927# include <assert.h>
4928#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004929 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004931if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004932
Matthias Kloseb9621712010-04-24 17:59:49 +00004933else
Martin v. Löwis11437992002-04-12 09:54:03 +00004934 # Broken: fails on valid input.
4935continue
4936fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004937rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004939 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004940 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004943#include <ac_nonexistent.h>
4944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004945if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 # Broken: success on invalid input.
4947continue
4948else
Martin v. Löwis11437992002-04-12 09:54:03 +00004949 # Passes both tests.
4950ac_preproc_ok=:
4951break
4952fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004953rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004954
4955done
4956# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004957rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004958if $ac_preproc_ok; then :
4959
Martin v. Löwis11437992002-04-12 09:54:03 +00004960else
Matthias Kloseb9621712010-04-24 17:59:49 +00004961 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4962$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004963as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004964See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004965fi
4966
4967ac_ext=c
4968ac_cpp='$CPP $CPPFLAGS'
4969ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4970ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4971ac_compiler_gnu=$ac_cv_c_compiler_gnu
4972
4973
Matthias Kloseb9621712010-04-24 17:59:49 +00004974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4975$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004976if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004978else
Matthias Kloseb9621712010-04-24 17:59:49 +00004979 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004980 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 # Loop through the user's path and test for each of PROGNAME-LIST
4982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004983for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4984do
4985 IFS=$as_save_IFS
4986 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004987 for ac_prog in grep ggrep; do
4988 for ac_exec_ext in '' $ac_executable_extensions; do
4989 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004990 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004991# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004992 # Check for GNU $ac_path_GREP
4993case `"$ac_path_GREP" --version 2>&1` in
4994*GNU*)
4995 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4996*)
4997 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004998 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004999 while :
5000 do
5001 cat "conftest.in" "conftest.in" >"conftest.tmp"
5002 mv "conftest.tmp" "conftest.in"
5003 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005005 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5006 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005007 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005008 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5009 # Best one so far, save it but keep looking for a better one
5010 ac_cv_path_GREP="$ac_path_GREP"
5011 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005012 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005013 # 10*(2^10) chars as input seems more than enough
5014 test $ac_count -gt 10 && break
5015 done
5016 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5017esac
5018
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 $ac_path_GREP_found && break 3
5020 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005021 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005023IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005025 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 +00005026 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005027else
5028 ac_cv_path_GREP=$GREP
5029fi
5030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5033$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005034 GREP="$ac_cv_path_GREP"
5035
5036
Matthias Kloseb9621712010-04-24 17:59:49 +00005037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5038$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005039if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005041else
5042 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5043 then ac_cv_path_EGREP="$GREP -E"
5044 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 # Loop through the user's path and test for each of PROGNAME-LIST
5048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5050do
5051 IFS=$as_save_IFS
5052 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 for ac_prog in egrep; do
5054 for ac_exec_ext in '' $ac_executable_extensions; do
5055 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005056 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005057# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005058 # Check for GNU $ac_path_EGREP
5059case `"$ac_path_EGREP" --version 2>&1` in
5060*GNU*)
5061 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5062*)
5063 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005065 while :
5066 do
5067 cat "conftest.in" "conftest.in" >"conftest.tmp"
5068 mv "conftest.tmp" "conftest.in"
5069 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005071 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5072 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005074 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5075 # Best one so far, save it but keep looking for a better one
5076 ac_cv_path_EGREP="$ac_path_EGREP"
5077 ac_path_EGREP_max=$ac_count
5078 fi
5079 # 10*(2^10) chars as input seems more than enough
5080 test $ac_count -gt 10 && break
5081 done
5082 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5083esac
5084
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $ac_path_EGREP_found && break 3
5086 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005091 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 +00005092 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005093else
5094 ac_cv_path_EGREP=$EGREP
5095fi
5096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005097 fi
5098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5100$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005102
5103
Matthias Kloseb9621712010-04-24 17:59:49 +00005104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5105$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005106if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 $as_echo_n "(cached) " >&6
5108else
5109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005110/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005111#include <stdlib.h>
5112#include <stdarg.h>
5113#include <string.h>
5114#include <float.h>
5115
5116int
5117main ()
5118{
5119
5120 ;
5121 return 0;
5122}
5123_ACEOF
5124if ac_fn_c_try_compile "$LINENO"; then :
5125 ac_cv_header_stdc=yes
5126else
5127 ac_cv_header_stdc=no
5128fi
5129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5130
5131if test $ac_cv_header_stdc = yes; then
5132 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5134/* end confdefs.h. */
5135#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005136
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005137_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005140
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005141else
Matthias Kloseb9621712010-04-24 17:59:49 +00005142 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005143fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005144rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145
Matthias Kloseb9621712010-04-24 17:59:49 +00005146fi
5147
5148if test $ac_cv_header_stdc = yes; then
5149 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5151/* end confdefs.h. */
5152#include <stdlib.h>
5153
5154_ACEOF
5155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5156 $EGREP "free" >/dev/null 2>&1; then :
5157
5158else
5159 ac_cv_header_stdc=no
5160fi
5161rm -f conftest*
5162
5163fi
5164
5165if test $ac_cv_header_stdc = yes; then
5166 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5167 if test "$cross_compiling" = yes; then :
5168 :
5169else
5170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5171/* end confdefs.h. */
5172#include <ctype.h>
5173#include <stdlib.h>
5174#if ((' ' & 0x0FF) == 0x020)
5175# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5176# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5177#else
5178# define ISLOWER(c) \
5179 (('a' <= (c) && (c) <= 'i') \
5180 || ('j' <= (c) && (c) <= 'r') \
5181 || ('s' <= (c) && (c) <= 'z'))
5182# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5183#endif
5184
5185#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5186int
5187main ()
5188{
5189 int i;
5190 for (i = 0; i < 256; i++)
5191 if (XOR (islower (i), ISLOWER (i))
5192 || toupper (i) != TOUPPER (i))
5193 return 2;
5194 return 0;
5195}
5196_ACEOF
5197if ac_fn_c_try_run "$LINENO"; then :
5198
5199else
5200 ac_cv_header_stdc=no
5201fi
5202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5203 conftest.$ac_objext conftest.beam conftest.$ac_ext
5204fi
5205
5206fi
5207fi
5208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5209$as_echo "$ac_cv_header_stdc" >&6; }
5210if test $ac_cv_header_stdc = yes; then
5211
5212$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5213
5214fi
5215
5216# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5217for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5218 inttypes.h stdint.h unistd.h
5219do :
5220 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5221ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5222"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005223if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005224 cat >>confdefs.h <<_ACEOF
5225#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5226_ACEOF
5227
5228fi
5229
5230done
5231
5232
5233
5234 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 +02005235if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005236 MINIX=yes
5237else
5238 MINIX=
5239fi
5240
5241
5242 if test "$MINIX" = yes; then
5243
5244$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5245
5246
5247$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5248
5249
5250$as_echo "#define _MINIX 1" >>confdefs.h
5251
5252 fi
5253
5254
5255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5256$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005257if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005258 $as_echo_n "(cached) " >&6
5259else
5260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5261/* end confdefs.h. */
5262
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005263# define __EXTENSIONS__ 1
5264 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005265int
5266main ()
5267{
5268
5269 ;
5270 return 0;
5271}
5272_ACEOF
5273if ac_fn_c_try_compile "$LINENO"; then :
5274 ac_cv_safe_to_define___extensions__=yes
5275else
5276 ac_cv_safe_to_define___extensions__=no
5277fi
5278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5279fi
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5281$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5282 test $ac_cv_safe_to_define___extensions__ = yes &&
5283 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5284
5285 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5286
5287 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5288
5289 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5290
5291 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5292
5293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005294
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295# Check for unsupported systems
5296case $ac_sys_system/$ac_sys_release in
5297atheos*|Linux*/1*)
5298 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5299 echo See README for details.
5300 exit 1;;
5301esac
5302
5303
Matthias Kloseb9621712010-04-24 17:59:49 +00005304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5305$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306
5307# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005308if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309 withval=$with_suffix;
5310 case $withval in
5311 no) EXEEXT=;;
5312 yes) EXEEXT=.exe;;
5313 *) EXEEXT=$withval;;
5314 esac
5315fi
5316
Matthias Kloseb9621712010-04-24 17:59:49 +00005317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5318$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005319
5320# Test whether we're running on a non-case-sensitive system, in which
5321# case we give a warning if no ext is given
5322
Matthias Kloseb9621712010-04-24 17:59:49 +00005323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5324$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005325if test ! -d CaseSensitiveTestDir; then
5326mkdir CaseSensitiveTestDir
5327fi
5328
5329if test -d casesensitivetestdir
5330then
Matthias Kloseb9621712010-04-24 17:59:49 +00005331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5332$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005333 BUILDEXEEXT=.exe
5334else
Matthias Kloseb9621712010-04-24 17:59:49 +00005335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5336$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337 BUILDEXEEXT=$EXEEXT
5338fi
5339rmdir CaseSensitiveTestDir
5340
5341case $MACHDEP in
5342bsdos*)
5343 case $CC in
5344 gcc) CC="$CC -D_HAVE_BSDI";;
5345 esac;;
5346esac
5347
5348case $ac_sys_system in
5349hp*|HP*)
5350 case $CC in
5351 cc|*/cc) CC="$CC -Ae";;
5352 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005353esac
5354
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005355MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5356
5357
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358
5359
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5361$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362if test -z "$LIBRARY"
5363then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005364 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5367$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368
5369# LDLIBRARY is the name of the library to link against (as opposed to the
5370# name of the library into which to insert object files). BLDLIBRARY is also
5371# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5372# is blank as the main program is not linked directly against LDLIBRARY.
5373# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5374# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5375# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5376# DLLLIBRARY is the shared (i.e., DLL) library.
5377#
5378# RUNSHARED is used to run shared python without installed libraries
5379#
5380# INSTSONAME is the name of the shared library that will be use to install
5381# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005382#
5383# LDVERSION is the shared library version number, normally the Python version
5384# with the ABI build flags appended.
5385
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386
5387
5388
5389
5390
5391
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005392
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393LDLIBRARY="$LIBRARY"
5394BLDLIBRARY='$(LDLIBRARY)'
5395INSTSONAME='$(LDLIBRARY)'
5396DLLLIBRARY=''
5397LDLIBRARYDIR=''
5398RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005399LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005400
5401# LINKCC is the command that links the python executable -- default is $(CC).
5402# If CXX is set, and if it is needed to link a main function that was
5403# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5404# python might then depend on the C++ runtime
5405# This is altered for AIX in order to build the export list before
5406# linking.
5407
Matthias Kloseb9621712010-04-24 17:59:49 +00005408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5409$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410if test -z "$LINKCC"
5411then
5412 LINKCC='$(PURIFY) $(MAINCC)'
5413 case $ac_sys_system in
5414 AIX*)
5415 exp_extra="\"\""
5416 if test $ac_sys_release -ge 5 -o \
5417 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5418 exp_extra="."
5419 fi
5420 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005421 QNX*)
5422 # qcc must be used because the other compilers do not
5423 # support -N.
5424 LINKCC=qcc;;
5425 esac
5426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5428$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429
5430# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5431# make sure we default having it set to "no": this is used by
5432# distutils.unixccompiler to know if it should add --enable-new-dtags
5433# to linker command lines, and failing to detect GNU ld simply results
5434# in the same bahaviour as before.
5435
Matthias Kloseb9621712010-04-24 17:59:49 +00005436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5437$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005438ac_prog=ld
5439if test "$GCC" = yes; then
5440 ac_prog=`$CC -print-prog-name=ld`
5441fi
5442case `"$ac_prog" -V 2>&1 < /dev/null` in
5443 *GNU*)
5444 GNULD=yes;;
5445 *)
5446 GNULD=no;;
5447esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5449$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5452$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005453if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005454 $as_echo_n "(cached) " >&6
5455else
5456 ac_cv_c_inline=no
5457for ac_kw in inline __inline__ __inline; do
5458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5459/* end confdefs.h. */
5460#ifndef __cplusplus
5461typedef int foo_t;
5462static $ac_kw foo_t static_foo () {return 0; }
5463$ac_kw foo_t foo () {return 0; }
5464#endif
5465
5466_ACEOF
5467if ac_fn_c_try_compile "$LINENO"; then :
5468 ac_cv_c_inline=$ac_kw
5469fi
5470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5471 test "$ac_cv_c_inline" != no && break
5472done
5473
5474fi
5475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5476$as_echo "$ac_cv_c_inline" >&6; }
5477
5478case $ac_cv_c_inline in
5479 inline | yes) ;;
5480 *)
5481 case $ac_cv_c_inline in
5482 no) ac_val=;;
5483 *) ac_val=$ac_cv_c_inline;;
5484 esac
5485 cat >>confdefs.h <<_ACEOF
5486#ifndef __cplusplus
5487#define inline $ac_val
5488#endif
5489_ACEOF
5490 ;;
5491esac
5492
5493if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005494
5495$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005496
5497
5498fi
5499
5500
Matthias Kloseb9621712010-04-24 17:59:49 +00005501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5502$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005504if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505 enableval=$enable_shared;
5506fi
5507
5508
5509if test -z "$enable_shared"
5510then
5511 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005512 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513 enable_shared="yes";;
5514 *)
5515 enable_shared="no";;
5516 esac
5517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5519$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520
Matthias Kloseb9621712010-04-24 17:59:49 +00005521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5522$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005523# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005524if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005525 enableval=$enable_profiling;
5526fi
5527
5528if test "x$enable_profiling" = xyes; then
5529 ac_save_cc="$CC"
5530 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005532/* end confdefs.h. */
5533int main() { return 0; }
5534_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005535if ac_fn_c_try_link "$LINENO"; then :
5536
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005538 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005540rm -f core conftest.err conftest.$ac_objext \
5541 conftest$ac_exeext conftest.$ac_ext
5542 CC="$ac_save_cc"
5543else
5544 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5547$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548
doko@ubuntu.comba015832012-06-30 16:52:05 +02005549if test "x$enable_profiling" = xyes; then
5550 BASECFLAGS="-pg $BASECFLAGS"
5551 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552fi
5553
Matthias Kloseb9621712010-04-24 17:59:49 +00005554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5555$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556
5557# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5558# library that we build, but we do not want to link against it (we
5559# will find it with a -framework option). For this reason there is an
5560# extra variable BLDLIBRARY against which Python and the extension
5561# modules are linked, BLDLIBRARY. This is normally the same as
5562# LDLIBRARY, but empty for MacOSX framework builds.
5563if test "$enable_framework"
5564then
5565 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5566 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5567 BLDLIBRARY=''
5568else
5569 BLDLIBRARY='$(LDLIBRARY)'
5570fi
5571
5572# Other platforms follow
5573if test $enable_shared = "yes"; then
5574
Matthias Kloseb9621712010-04-24 17:59:49 +00005575$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005576
5577 case $ac_sys_system in
5578 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005579 LDLIBRARY='libpython$(LDVERSION).dll.a'
5580 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581 ;;
5582 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005583 LDLIBRARY='libpython$(LDVERSION).so'
5584 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5586 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005587 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005588 then
5589 PY3LIBRARY=libpython3.so
5590 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005592 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005593 LDLIBRARY='libpython$(LDVERSION).so'
5594 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5596 case $ac_sys_system in
5597 FreeBSD*)
5598 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5599 ;;
5600 esac
5601 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005602 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005603 then
5604 PY3LIBRARY=libpython3.so
5605 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606 ;;
5607 hp*|HP*)
5608 case `uname -m` in
5609 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005610 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 ;;
5612 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005613 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614 ;;
5615 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005616 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5618 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005620 LDLIBRARY='libpython$(LDVERSION).dylib'
5621 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5623 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005624 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005625 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005626 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5627 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628
5629 esac
5630else # shared is disabled
5631 case $ac_sys_system in
5632 CYGWIN*)
5633 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005634 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635 ;;
5636 esac
5637fi
5638
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005639if test "$cross_compiling" = yes; then
5640 RUNSHARED=
5641fi
5642
Matthias Kloseb9621712010-04-24 17:59:49 +00005643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5644$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645
5646if test -n "$ac_tool_prefix"; then
5647 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5648set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5650$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005651if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005652 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653else
5654 if test -n "$RANLIB"; then
5655 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5656else
5657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5658for as_dir in $PATH
5659do
5660 IFS=$as_save_IFS
5661 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005662 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 break 2
5667 fi
5668done
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670IFS=$as_save_IFS
5671
5672fi
5673fi
5674RANLIB=$ac_cv_prog_RANLIB
5675if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5677$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678else
Matthias Kloseb9621712010-04-24 17:59:49 +00005679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5680$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681fi
5682
5683
5684fi
5685if test -z "$ac_cv_prog_RANLIB"; then
5686 ac_ct_RANLIB=$RANLIB
5687 # Extract the first word of "ranlib", so it can be a program name with args.
5688set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5690$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005691if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005692 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693else
5694 if test -n "$ac_ct_RANLIB"; then
5695 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5696else
5697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5698for as_dir in $PATH
5699do
5700 IFS=$as_save_IFS
5701 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005702 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706 break 2
5707 fi
5708done
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710IFS=$as_save_IFS
5711
5712fi
5713fi
5714ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5715if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5717$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718else
Matthias Kloseb9621712010-04-24 17:59:49 +00005719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5720$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721fi
5722
5723 if test "x$ac_ct_RANLIB" = x; then
5724 RANLIB=":"
5725 else
5726 case $cross_compiling:$ac_tool_warned in
5727yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730ac_tool_warned=yes ;;
5731esac
5732 RANLIB=$ac_ct_RANLIB
5733 fi
5734else
5735 RANLIB="$ac_cv_prog_RANLIB"
5736fi
5737
5738
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005739if test -n "$ac_tool_prefix"; then
5740 for ac_prog in ar aal
5741 do
5742 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5743set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5745$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005746if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005747 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748else
5749 if test -n "$AR"; then
5750 ac_cv_prog_AR="$AR" # Let the user override the test.
5751else
5752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5753for as_dir in $PATH
5754do
5755 IFS=$as_save_IFS
5756 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005758 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005759 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761 break 2
5762 fi
5763done
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765IFS=$as_save_IFS
5766
5767fi
5768fi
5769AR=$ac_cv_prog_AR
5770if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5772$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773else
Matthias Kloseb9621712010-04-24 17:59:49 +00005774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5775$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776fi
5777
5778
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005779 test -n "$AR" && break
5780 done
5781fi
5782if test -z "$AR"; then
5783 ac_ct_AR=$AR
5784 for ac_prog in ar aal
5785do
5786 # Extract the first word of "$ac_prog", so it can be a program name with args.
5787set dummy $ac_prog; ac_word=$2
5788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5789$as_echo_n "checking for $ac_word... " >&6; }
5790if ${ac_cv_prog_ac_ct_AR+:} false; then :
5791 $as_echo_n "(cached) " >&6
5792else
5793 if test -n "$ac_ct_AR"; then
5794 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5795else
5796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5797for as_dir in $PATH
5798do
5799 IFS=$as_save_IFS
5800 test -z "$as_dir" && as_dir=.
5801 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005802 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005803 ac_cv_prog_ac_ct_AR="$ac_prog"
5804 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5805 break 2
5806 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005808 done
5809IFS=$as_save_IFS
5810
5811fi
5812fi
5813ac_ct_AR=$ac_cv_prog_ac_ct_AR
5814if test -n "$ac_ct_AR"; then
5815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5816$as_echo "$ac_ct_AR" >&6; }
5817else
5818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5819$as_echo "no" >&6; }
5820fi
5821
5822
5823 test -n "$ac_ct_AR" && break
5824done
5825
5826 if test "x$ac_ct_AR" = x; then
5827 AR="ar"
5828 else
5829 case $cross_compiling:$ac_tool_warned in
5830yes:)
5831{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5832$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5833ac_tool_warned=yes ;;
5834esac
5835 AR=$ac_ct_AR
5836 fi
5837fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838
5839
5840# tweak ARFLAGS only if the user didn't set it on the command line
5841
5842if test -z "$ARFLAGS"
5843then
5844 ARFLAGS="rc"
5845fi
5846
doko@ubuntu.com58844492012-06-30 18:25:32 +02005847if test -n "$ac_tool_prefix"; then
5848 for ac_prog in readelf
5849 do
5850 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5851set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5853$as_echo_n "checking for $ac_word... " >&6; }
5854if ${ac_cv_prog_READELF+:} false; then :
5855 $as_echo_n "(cached) " >&6
5856else
5857 if test -n "$READELF"; then
5858 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5859else
5860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5861for as_dir in $PATH
5862do
5863 IFS=$as_save_IFS
5864 test -z "$as_dir" && as_dir=.
5865 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005866 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005867 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5868 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5869 break 2
5870 fi
5871done
5872 done
5873IFS=$as_save_IFS
5874
5875fi
5876fi
5877READELF=$ac_cv_prog_READELF
5878if test -n "$READELF"; then
5879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5880$as_echo "$READELF" >&6; }
5881else
5882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5883$as_echo "no" >&6; }
5884fi
5885
5886
5887 test -n "$READELF" && break
5888 done
5889fi
5890if test -z "$READELF"; then
5891 ac_ct_READELF=$READELF
5892 for ac_prog in readelf
5893do
5894 # Extract the first word of "$ac_prog", so it can be a program name with args.
5895set dummy $ac_prog; ac_word=$2
5896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5897$as_echo_n "checking for $ac_word... " >&6; }
5898if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5899 $as_echo_n "(cached) " >&6
5900else
5901 if test -n "$ac_ct_READELF"; then
5902 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5903else
5904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5905for as_dir in $PATH
5906do
5907 IFS=$as_save_IFS
5908 test -z "$as_dir" && as_dir=.
5909 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005910 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005911 ac_cv_prog_ac_ct_READELF="$ac_prog"
5912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5913 break 2
5914 fi
5915done
5916 done
5917IFS=$as_save_IFS
5918
5919fi
5920fi
5921ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5922if test -n "$ac_ct_READELF"; then
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5924$as_echo "$ac_ct_READELF" >&6; }
5925else
5926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5927$as_echo "no" >&6; }
5928fi
5929
5930
5931 test -n "$ac_ct_READELF" && break
5932done
5933
5934 if test "x$ac_ct_READELF" = x; then
5935 READELF=":"
5936 else
5937 case $cross_compiling:$ac_tool_warned in
5938yes:)
5939{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5940$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5941ac_tool_warned=yes ;;
5942esac
5943 READELF=$ac_ct_READELF
5944 fi
5945fi
5946
5947if test "$cross_compiling" = yes; then
5948 case "$READELF" in
5949 readelf|:)
5950 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5951 ;;
5952 esac
5953fi
5954
5955
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956
Matthias Klosec4c48422012-10-21 23:05:35 +02005957for ac_prog in python$PACKAGE_VERSION python3 python
5958do
5959 # Extract the first word of "$ac_prog", so it can be a program name with args.
5960set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5962$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005963if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005964 $as_echo_n "(cached) " >&6
5965else
Matthias Klosec4c48422012-10-21 23:05:35 +02005966 if test -n "$PYTHON"; then
5967 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005968else
5969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5970for as_dir in $PATH
5971do
5972 IFS=$as_save_IFS
5973 test -z "$as_dir" && as_dir=.
5974 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005975 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005976 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005977 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5978 break 2
5979 fi
5980done
5981 done
5982IFS=$as_save_IFS
5983
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005984fi
5985fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005986PYTHON=$ac_cv_prog_PYTHON
5987if test -n "$PYTHON"; then
5988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5989$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005990else
5991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5992$as_echo "no" >&6; }
5993fi
5994
5995
Matthias Klosec4c48422012-10-21 23:05:35 +02005996 test -n "$PYTHON" && break
5997done
5998test -n "$PYTHON" || PYTHON="not-found"
5999
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006000if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006001 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6002else
6003 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006004fi
6005
6006
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007case $MACHDEP in
6008bsdos*|hp*|HP*)
6009 # install -d does not work on BSDI or HP-UX
6010 if test -z "$INSTALL"
6011 then
6012 INSTALL="${srcdir}/install-sh -c"
6013 fi
6014esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015# Find a good install program. We prefer a C program (faster),
6016# so one script is as good as another. But avoid the broken or
6017# incompatible versions:
6018# SysV /etc/install, /usr/sbin/install
6019# SunOS /usr/etc/install
6020# IRIX /sbin/install
6021# AIX /bin/install
6022# AmigaOS /C/install, which installs bootblocks on floppy discs
6023# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6024# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6025# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6026# OS/2's system install, which has a completely different semantic
6027# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006028# Reject install programs that cannot install multiple files.
6029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6030$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006032if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034else
6035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6036for as_dir in $PATH
6037do
6038 IFS=$as_save_IFS
6039 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 # Account for people who put trailing slashes in PATH elements.
6041case $as_dir/ in #((
6042 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006044 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045 /usr/ucb/* ) ;;
6046 *)
6047 # OSF1 and SCO ODT 3.0 have their own names for install.
6048 # Don't use installbsd from OSF since it installs stuff as root
6049 # by default.
6050 for ac_prog in ginstall scoinst install; do
6051 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006052 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053 if test $ac_prog = install &&
6054 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6055 # AIX install. It has an incompatible calling convention.
6056 :
6057 elif test $ac_prog = install &&
6058 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6059 # program-specific install script used by HP pwplus--don't use.
6060 :
6061 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006062 rm -rf conftest.one conftest.two conftest.dir
6063 echo one > conftest.one
6064 echo two > conftest.two
6065 mkdir conftest.dir
6066 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6067 test -s conftest.one && test -s conftest.two &&
6068 test -s conftest.dir/conftest.one &&
6069 test -s conftest.dir/conftest.two
6070 then
6071 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6072 break 3
6073 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074 fi
6075 fi
6076 done
6077 done
6078 ;;
6079esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006080
6081 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006082IFS=$as_save_IFS
6083
Matthias Kloseb9621712010-04-24 17:59:49 +00006084rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006085
6086fi
6087 if test "${ac_cv_path_install+set}" = set; then
6088 INSTALL=$ac_cv_path_install
6089 else
6090 # As a last resort, use the slow shell script. Don't cache a
6091 # value for INSTALL within a source directory, because that will
6092 # break other packages using the cache if that directory is
6093 # removed, or if the value is a relative name.
6094 INSTALL=$ac_install_sh
6095 fi
6096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6098$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099
6100# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6101# It thinks the first close brace ends the variable substitution.
6102test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6103
6104test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6105
6106test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6107
Matthias Klose93a0ef12012-03-15 18:08:34 +01006108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6109$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6110if test -z "$MKDIR_P"; then
6111 if ${ac_cv_path_mkdir+:} false; then :
6112 $as_echo_n "(cached) " >&6
6113else
6114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6115for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6116do
6117 IFS=$as_save_IFS
6118 test -z "$as_dir" && as_dir=.
6119 for ac_prog in mkdir gmkdir; do
6120 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006121 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006122 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6123 'mkdir (GNU coreutils) '* | \
6124 'mkdir (coreutils) '* | \
6125 'mkdir (fileutils) '4.1*)
6126 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6127 break 3;;
6128 esac
6129 done
6130 done
6131 done
6132IFS=$as_save_IFS
6133
6134fi
6135
6136 test -d ./--version && rmdir ./--version
6137 if test "${ac_cv_path_mkdir+set}" = set; then
6138 MKDIR_P="$ac_cv_path_mkdir -p"
6139 else
6140 # As a last resort, use the slow shell script. Don't cache a
6141 # value for MKDIR_P within a source directory, because that will
6142 # break other packages using the cache if that directory is
6143 # removed, or if the value is a relative name.
6144 MKDIR_P="$ac_install_sh -d"
6145 fi
6146fi
6147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6148$as_echo "$MKDIR_P" >&6; }
6149
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006150
6151# Not every filesystem supports hard links
6152
6153if test -z "$LN" ; then
6154 case $ac_sys_system in
6155 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156 *) LN=ln;;
6157 esac
6158fi
6159
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006160# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006161
6162ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006163
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6166$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167
6168# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006169if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170 withval=$with_pydebug;
6171if test "$withval" != no
6172then
6173
Matthias Kloseb9621712010-04-24 17:59:49 +00006174$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175
Matthias Kloseb9621712010-04-24 17:59:49 +00006176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6177$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006178 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006179 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006180else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6181$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182fi
6183else
Matthias Kloseb9621712010-04-24 17:59:49 +00006184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6185$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006186fi
6187
6188
6189# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6190# merged with this chunk of code?
6191
6192# Optimizer/debugger flags
6193# ------------------------
6194# (The following bit of code is complicated enough - please keep things
6195# indented properly. Just pretend you're editing Python code. ;-)
6196
6197# There are two parallel sets of case statements below, one that checks to
6198# see if OPT was set and one that does BASECFLAGS setting based upon
6199# compiler and platform. BASECFLAGS tweaks need to be made even if the
6200# user set OPT.
6201
6202# tweak OPT based on compiler and platform, only if the user didn't set
6203# it on the command line
6204
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006205if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006206then
6207 case $GCC in
6208 yes)
6209 if test "$CC" != 'g++' ; then
6210 STRICT_PROTO="-Wstrict-prototypes"
6211 fi
6212 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6213 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6214 WRAP="-fwrapv"
6215 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006216
6217 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006218 case $CC in
6219 *clang*) WRAP="-fwrapv"
6220 ;;
6221 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006222
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223 case $ac_cv_prog_cc_g in
6224 yes)
6225 if test "$Py_DEBUG" = 'true' ; then
6226 # Optimization messes up debuggers, so turn it off for
6227 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006228 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006229 else
6230 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6231 fi
6232 ;;
6233 *)
6234 OPT="-O3 -Wall $STRICT_PROTO"
6235 ;;
6236 esac
6237 case $ac_sys_system in
6238 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6239 ;;
6240 esac
6241 ;;
6242
6243 *)
6244 OPT="-O"
6245 ;;
6246 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006247fi
6248
6249
6250
6251# The -arch flags for universal builds on OSX
6252UNIVERSAL_ARCH_FLAGS=
6253
6254
6255# tweak BASECFLAGS based on compiler and platform
6256case $GCC in
6257yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006258 # Python doesn't violate C99 aliasing rules, but older versions of
6259 # GCC produce warnings for legal Python code. Enable
6260 # -fno-strict-aliasing on versions of GCC that support but produce
6261 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6263$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264 ac_save_cc="$CC"
6265 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006266 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006267 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006268 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006269else
Matthias Kloseb9621712010-04-24 17:59:49 +00006270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006272
Matthias Kloseb159a552010-04-25 21:00:44 +00006273
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006274int
6275main ()
6276{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006277
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006278 ;
6279 return 0;
6280}
Matthias Kloseb159a552010-04-25 21:00:44 +00006281
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006283if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006284
6285 CC="$ac_save_cc -fstrict-aliasing"
6286 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006288/* end confdefs.h. */
6289
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006290 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006291int
6292main ()
6293{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006294double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006295 ;
6296 return 0;
6297}
Matthias Kloseb159a552010-04-25 21:00:44 +00006298
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006300if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006301
6302 ac_cv_no_strict_aliasing=no
6303
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006304else
Matthias Kloseb159a552010-04-25 21:00:44 +00006305
6306 ac_cv_no_strict_aliasing=yes
6307
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006308fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006310
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006311else
Matthias Kloseb159a552010-04-25 21:00:44 +00006312
6313 ac_cv_no_strict_aliasing=no
6314
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006317fi
6318
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006319 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6322$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006323 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324 then
6325 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6326 fi
6327
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6329$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6330 ac_save_cc="$CC"
6331 CC="$CC -Wunused-result -Werror"
6332 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006333 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006334 $as_echo_n "(cached) " >&6
6335else
6336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6337/* end confdefs.h. */
6338
6339
6340int
6341main ()
6342{
6343
6344 ;
6345 return 0;
6346}
6347
6348_ACEOF
6349if ac_fn_c_try_compile "$LINENO"; then :
6350
6351 ac_cv_disable_unused_result_warning=yes
6352
6353else
6354
6355 ac_cv_disable_unused_result_warning=no
6356
6357fi
6358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6359fi
6360
6361 CFLAGS="$save_CFLAGS"
6362 CC="$ac_save_cc"
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6364$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6365
6366 if test $ac_cv_disable_unused_result_warning = yes
6367 then
6368 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6369 fi
6370
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6372 # support. Without this, treatment of subnormals doesn't follow
6373 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006374 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375 alpha*)
6376 BASECFLAGS="$BASECFLAGS -mieee"
6377 ;;
6378 esac
6379
6380 case $ac_sys_system in
6381 SCO_SV*)
6382 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6383 ;;
6384 # is there any other compiler on Darwin besides gcc?
6385 Darwin*)
6386 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6387 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006388 if test "${CC}" = gcc
6389 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6391$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006392 case "${UNIVERSALSDK}" in
6393 */MacOSX10.4u.sdk)
6394 # Build using 10.4 SDK, force usage of gcc when the
6395 # compiler is gcc, otherwise the user will get very
6396 # confusing error messages when building on OSX 10.6
6397 CC=gcc-4.0
6398 CPP=cpp-4.0
6399 ;;
6400 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6402$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006403 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006404
6405
6406 if test "${enable_universalsdk}"; then
6407 UNIVERSAL_ARCH_FLAGS=""
6408 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6409 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6410 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006411 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6413 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006414 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006415 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006416
6417 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6418 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006419 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006420 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006422 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6423 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006424 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006425 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006426
6427 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6428 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006429 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006430 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006432 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006433 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 +00006434
6435 fi
6436
6437
Ronald Oussoren666028b2010-04-18 19:07:43 +00006438 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6439 if test "${UNIVERSALSDK}" != "/"
6440 then
6441 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6442 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006443 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444 fi
6445 fi
6446
6447 # Calculate the right deployment target for this build.
6448 #
6449 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006450 if test ${cur_target} '>' 10.2 && \
6451 test ${cur_target} '<' 10.6
6452 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006453 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006454 if test ${enable_universalsdk}; then
6455 if test "${UNIVERSAL_ARCHS}" = "all"; then
6456 # Ensure that the default platform for a
6457 # 4-way universal build is OSX 10.5,
6458 # that's the first OS release where
6459 # 4-way builds make sense.
6460 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006461
6462 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6463 cur_target='10.5'
6464
6465 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6466 cur_target='10.5'
6467
6468 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6469 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006470 fi
6471 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006472 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006473 # On Intel macs default to a deployment
6474 # target of 10.4, that's the first OSX
6475 # release with Intel support.
6476 cur_target="10.4"
6477 fi
6478 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006479 fi
6480 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6481
6482 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6483 # environment with a value that is the same as what we'll use
6484 # in the Makefile to ensure that we'll get the same compiler
6485 # environment during configure and build time.
6486 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6487 export MACOSX_DEPLOYMENT_TARGET
6488 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6489
6490 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006491 esac
6492 ;;
6493
6494*)
6495 case $ac_sys_system in
6496 OpenUNIX*|UnixWare*)
6497 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6498 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006499 SCO_SV*)
6500 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6501 ;;
6502 esac
6503 ;;
6504esac
6505
6506if test "$Py_DEBUG" = 'true'; then
6507 :
6508else
6509 OPT="-DNDEBUG $OPT"
6510fi
6511
6512if test "$ac_arch_flags"
6513then
6514 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6515fi
6516
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006517# Check whether GCC supports PyArg_ParseTuple format
6518if test "$GCC" = "yes"
6519then
Matthias Kloseb9621712010-04-24 17:59:49 +00006520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6521$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006522 save_CFLAGS=$CFLAGS
6523 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006525/* end confdefs.h. */
6526
6527 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006528int
6529main ()
6530{
6531
6532 ;
6533 return 0;
6534}
Matthias Kloseb159a552010-04-25 21:00:44 +00006535
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006537if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006538
Matthias Kloseb159a552010-04-25 21:00:44 +00006539
Matthias Kloseb9621712010-04-24 17:59:49 +00006540$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006541
Matthias Kloseb159a552010-04-25 21:00:44 +00006542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006543$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006544
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545else
Matthias Kloseb159a552010-04-25 21:00:44 +00006546
6547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006548$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006549
6550fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6552 CFLAGS=$save_CFLAGS
6553fi
6554
6555# On some compilers, pthreads are available without further options
6556# (e.g. MacOS X). On some of these systems, the compiler will not
6557# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6558# So we have to see first whether pthreads are available without
6559# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6561$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006562if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006563 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006564else
Matthias Kloseb9621712010-04-24 17:59:49 +00006565 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006566 ac_cv_pthread_is_default=no
6567else
Matthias Kloseb9621712010-04-24 17:59:49 +00006568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006569/* end confdefs.h. */
6570
Stefan Krah7dba5942012-11-22 22:49:11 +01006571#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006572#include <pthread.h>
6573
6574void* routine(void* p){return NULL;}
6575
6576int main(){
6577 pthread_t p;
6578 if(pthread_create(&p,NULL,routine,NULL)!=0)
6579 return 1;
6580 (void)pthread_detach(p);
6581 return 0;
6582}
6583
6584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006585if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006586
6587 ac_cv_pthread_is_default=yes
6588 ac_cv_kthread=no
6589 ac_cv_pthread=no
6590
6591else
Matthias Kloseb9621712010-04-24 17:59:49 +00006592 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6595 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006596fi
6597
6598
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006599fi
6600
Matthias Kloseb9621712010-04-24 17:59:49 +00006601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6602$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006603
6604
6605if test $ac_cv_pthread_is_default = yes
6606then
6607 ac_cv_kpthread=no
6608else
6609# -Kpthread, if available, provides the right #defines
6610# and linker options to make pthread_create available
6611# Some compilers won't report that they do not support -Kpthread,
6612# so we need to run a program to see whether it really made the
6613# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6615$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006616if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006617 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006618else
6619 ac_save_cc="$CC"
6620CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006621if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006622 ac_cv_kpthread=no
6623else
Matthias Kloseb9621712010-04-24 17:59:49 +00006624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006625/* end confdefs.h. */
6626
Stefan Krah7dba5942012-11-22 22:49:11 +01006627#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006628#include <pthread.h>
6629
6630void* routine(void* p){return NULL;}
6631
6632int main(){
6633 pthread_t p;
6634 if(pthread_create(&p,NULL,routine,NULL)!=0)
6635 return 1;
6636 (void)pthread_detach(p);
6637 return 0;
6638}
6639
6640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006641if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006642 ac_cv_kpthread=yes
6643else
Matthias Kloseb9621712010-04-24 17:59:49 +00006644 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006648fi
6649
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006650CC="$ac_save_cc"
6651fi
6652
Matthias Kloseb9621712010-04-24 17:59:49 +00006653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6654$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006655fi
6656
6657if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6658then
6659# -Kthread, if available, provides the right #defines
6660# and linker options to make pthread_create available
6661# Some compilers won't report that they do not support -Kthread,
6662# so we need to run a program to see whether it really made the
6663# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6665$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006666if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006667 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006668else
6669 ac_save_cc="$CC"
6670CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006671if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006672 ac_cv_kthread=no
6673else
Matthias Kloseb9621712010-04-24 17:59:49 +00006674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006675/* end confdefs.h. */
6676
Stefan Krah7dba5942012-11-22 22:49:11 +01006677#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678#include <pthread.h>
6679
6680void* routine(void* p){return NULL;}
6681
6682int main(){
6683 pthread_t p;
6684 if(pthread_create(&p,NULL,routine,NULL)!=0)
6685 return 1;
6686 (void)pthread_detach(p);
6687 return 0;
6688}
6689
6690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006691if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006692 ac_cv_kthread=yes
6693else
Matthias Kloseb9621712010-04-24 17:59:49 +00006694 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006698fi
6699
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006700CC="$ac_save_cc"
6701fi
6702
Matthias Kloseb9621712010-04-24 17:59:49 +00006703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6704$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006705fi
6706
6707if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6708then
6709# -pthread, if available, provides the right #defines
6710# and linker options to make pthread_create available
6711# Some compilers won't report that they do not support -pthread,
6712# so we need to run a program to see whether it really made the
6713# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6715$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006716if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006717 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006718else
6719 ac_save_cc="$CC"
6720CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006721if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006722 ac_cv_pthread=no
6723else
Matthias Kloseb9621712010-04-24 17:59:49 +00006724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006725/* end confdefs.h. */
6726
Stefan Krah7dba5942012-11-22 22:49:11 +01006727#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006728#include <pthread.h>
6729
6730void* routine(void* p){return NULL;}
6731
6732int main(){
6733 pthread_t p;
6734 if(pthread_create(&p,NULL,routine,NULL)!=0)
6735 return 1;
6736 (void)pthread_detach(p);
6737 return 0;
6738}
6739
6740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006741if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006742 ac_cv_pthread=yes
6743else
Matthias Kloseb9621712010-04-24 17:59:49 +00006744 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6747 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006748fi
6749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006750CC="$ac_save_cc"
6751fi
6752
Matthias Kloseb9621712010-04-24 17:59:49 +00006753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6754$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006755fi
6756
6757# If we have set a CC compiler flag for thread support then
6758# check if it works for CXX, too.
6759ac_cv_cxx_thread=no
6760if test ! -z "$CXX"
6761then
Matthias Kloseb9621712010-04-24 17:59:49 +00006762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6763$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764ac_save_cxx="$CXX"
6765
6766if test "$ac_cv_kpthread" = "yes"
6767then
6768 CXX="$CXX -Kpthread"
6769 ac_cv_cxx_thread=yes
6770elif test "$ac_cv_kthread" = "yes"
6771then
6772 CXX="$CXX -Kthread"
6773 ac_cv_cxx_thread=yes
6774elif test "$ac_cv_pthread" = "yes"
6775then
6776 CXX="$CXX -pthread"
6777 ac_cv_cxx_thread=yes
6778fi
6779
6780if test $ac_cv_cxx_thread = yes
6781then
6782 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6783 $CXX -c conftest.$ac_ext 2>&5
6784 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6785 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6786 then
6787 ac_cv_cxx_thread=yes
6788 else
6789 ac_cv_cxx_thread=no
6790 fi
6791 rm -fr conftest*
6792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6794$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006795fi
6796CXX="$ac_save_cxx"
6797
6798
6799# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6801$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006802if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804else
Matthias Kloseb9621712010-04-24 17:59:49 +00006805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006806/* end confdefs.h. */
6807#include <stdlib.h>
6808#include <stdarg.h>
6809#include <string.h>
6810#include <float.h>
6811
6812int
6813main ()
6814{
6815
6816 ;
6817 return 0;
6818}
6819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006820if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821 ac_cv_header_stdc=yes
6822else
Matthias Kloseb9621712010-04-24 17:59:49 +00006823 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006824fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6826
6827if test $ac_cv_header_stdc = yes; then
6828 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830/* end confdefs.h. */
6831#include <string.h>
6832
6833_ACEOF
6834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006835 $EGREP "memchr" >/dev/null 2>&1; then :
6836
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837else
6838 ac_cv_header_stdc=no
6839fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006840rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006841
6842fi
6843
6844if test $ac_cv_header_stdc = yes; then
6845 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006847/* end confdefs.h. */
6848#include <stdlib.h>
6849
6850_ACEOF
6851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006852 $EGREP "free" >/dev/null 2>&1; then :
6853
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854else
6855 ac_cv_header_stdc=no
6856fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006857rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858
6859fi
6860
6861if test $ac_cv_header_stdc = yes; then
6862 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006863 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864 :
6865else
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867/* end confdefs.h. */
6868#include <ctype.h>
6869#include <stdlib.h>
6870#if ((' ' & 0x0FF) == 0x020)
6871# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6872# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6873#else
6874# define ISLOWER(c) \
6875 (('a' <= (c) && (c) <= 'i') \
6876 || ('j' <= (c) && (c) <= 'r') \
6877 || ('s' <= (c) && (c) <= 'z'))
6878# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6879#endif
6880
6881#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6882int
6883main ()
6884{
6885 int i;
6886 for (i = 0; i < 256; i++)
6887 if (XOR (islower (i), ISLOWER (i))
6888 || toupper (i) != TOUPPER (i))
6889 return 2;
6890 return 0;
6891}
6892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006893if ac_fn_c_try_run "$LINENO"; then :
6894
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895else
Matthias Kloseb9621712010-04-24 17:59:49 +00006896 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6899 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900fi
6901
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006902fi
6903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6905$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906if test $ac_cv_header_stdc = yes; then
6907
Matthias Kloseb9621712010-04-24 17:59:49 +00006908$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909
6910fi
6911
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006912ac_save_cppflags="$CPPFLAGS"
6913CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006914for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006915fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006916ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006917sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006918unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006919poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006920sys/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 +01006921sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006922sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006923sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006924sys/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 -07006925libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006926bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006927do :
6928 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6929ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006930if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006931 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006932#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006933_ACEOF
6934
6935fi
6936
Guido van Rossum627b2d71993-12-24 10:39:16 +00006937done
6938
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006939CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006940ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006941for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006942 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6944$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006945if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006946 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006947else
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006949/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006950#include <sys/types.h>
6951#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006952
Martin v. Löwis11437992002-04-12 09:54:03 +00006953int
6954main ()
6955{
6956if ((DIR *) 0)
6957return 0;
6958 ;
6959 return 0;
6960}
6961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006962if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006963 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006964else
Matthias Kloseb9621712010-04-24 17:59:49 +00006965 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006969eval ac_res=\$$as_ac_Header
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6971$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006972if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006973 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006974#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006975_ACEOF
6976
6977ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006978fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006979
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006980done
6981# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6982if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6984$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006985if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006986 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006987else
Martin v. Löwis11437992002-04-12 09:54:03 +00006988 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006991
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006992/* Override any GCC internal prototype to avoid an error.
6993 Use char because int might match the return type of a GCC
6994 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006995#ifdef __cplusplus
6996extern "C"
6997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006998char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006999int
7000main ()
7001{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007002return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007003 ;
7004 return 0;
7005}
7006_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007007for ac_lib in '' dir; do
7008 if test -z "$ac_lib"; then
7009 ac_res="none required"
7010 else
7011 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007012 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007013 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007014 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007017rm -f core conftest.err conftest.$ac_objext \
7018 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007019 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007020 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007022done
Victor Stinnere0be4232011-10-25 13:06:09 +02007023if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007025else
7026 ac_cv_search_opendir=no
7027fi
7028rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007029LIBS=$ac_func_search_save_LIBS
7030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7032$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007033ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007034if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007037fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007038
Michael W. Hudson54241132001-12-07 15:38:26 +00007039else
Matthias Kloseb9621712010-04-24 17:59:49 +00007040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7041$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007042if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007043 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007044else
7045 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007049/* Override any GCC internal prototype to avoid an error.
7050 Use char because int might match the return type of a GCC
7051 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007052#ifdef __cplusplus
7053extern "C"
7054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007055char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007056int
7057main ()
7058{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007059return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007060 ;
7061 return 0;
7062}
7063_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007064for ac_lib in '' x; do
7065 if test -z "$ac_lib"; then
7066 ac_res="none required"
7067 else
7068 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007069 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007070 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007071 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007072 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007074rm -f core conftest.err conftest.$ac_objext \
7075 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007076 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007079done
Victor Stinnere0be4232011-10-25 13:06:09 +02007080if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082else
7083 ac_cv_search_opendir=no
7084fi
7085rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007086LIBS=$ac_func_search_save_LIBS
7087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7089$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007090ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007091if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007092 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007094fi
7095
7096fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007097
Matthias Kloseb9621712010-04-24 17:59:49 +00007098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7099$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007100if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007101 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007102else
Matthias Kloseb9621712010-04-24 17:59:49 +00007103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007104/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007105#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007106int
7107main ()
7108{
7109return makedev(0, 0);
7110 ;
7111 return 0;
7112}
7113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007114if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007115 ac_cv_header_sys_types_h_makedev=yes
7116else
Matthias Kloseb9621712010-04-24 17:59:49 +00007117 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007119rm -f core conftest.err conftest.$ac_objext \
7120 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007121
7122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7124$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007125
7126if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007127ac_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 +02007128if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007129
Matthias Kloseb9621712010-04-24 17:59:49 +00007130$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007131
7132fi
7133
7134
7135
7136 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007137 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 +02007138if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007139
Matthias Kloseb9621712010-04-24 17:59:49 +00007140$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007141
7142fi
7143
7144
7145 fi
7146fi
7147
Michael W. Hudson54241132001-12-07 15:38:26 +00007148
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007149# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7150for ac_header in net/if.h
7151do :
7152 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7153#ifdef STDC_HEADERS
7154# include <stdlib.h>
7155# include <stddef.h>
7156#else
7157# ifdef HAVE_STDLIB_H
7158# include <stdlib.h>
7159# endif
7160#endif
7161#ifdef HAVE_SYS_SOCKET_H
7162# include <sys/socket.h>
7163#endif
7164
7165"
Victor Stinnere0be4232011-10-25 13:06:09 +02007166if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007167 cat >>confdefs.h <<_ACEOF
7168#define HAVE_NET_IF_H 1
7169_ACEOF
7170
7171fi
7172
7173done
7174
7175
7176
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007177# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007178for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007179do :
7180 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007181#ifdef HAVE_CURSES_H
7182#include <curses.h>
7183#endif
7184
Matthias Kloseb9621712010-04-24 17:59:49 +00007185"
Victor Stinnere0be4232011-10-25 13:06:09 +02007186if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007187 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007188#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007189_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007190
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007191fi
7192
7193done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007194
7195
Martin v. Löwis11017b12006-01-14 18:12:57 +00007196# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007197for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007198do :
7199 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 +00007200#ifdef HAVE_ASM_TYPES_H
7201#include <asm/types.h>
7202#endif
7203#ifdef HAVE_SYS_SOCKET_H
7204#include <sys/socket.h>
7205#endif
7206
Matthias Kloseb9621712010-04-24 17:59:49 +00007207"
Victor Stinnere0be4232011-10-25 13:06:09 +02007208if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007209 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007210#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007211_ACEOF
7212
7213fi
7214
7215done
7216
7217
Charles-François Natali47413c12011-10-06 19:47:44 +02007218# On Linux, can.h and can/raw.h require sys/socket.h
7219for ac_header in linux/can.h linux/can/raw.h
7220do :
7221 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7222ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7223#ifdef HAVE_SYS_SOCKET_H
7224#include <sys/socket.h>
7225#endif
7226
7227"
7228if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7229 cat >>confdefs.h <<_ACEOF
7230#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7231_ACEOF
7232
7233fi
7234
7235done
7236
7237
Guido van Rossum627b2d71993-12-24 10:39:16 +00007238# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007239was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7241$as_echo_n "checking for clock_t in time.h... " >&6; }
7242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007243/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007244#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007245
7246_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007248 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007249 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007250else
Martin v. Löwis11437992002-04-12 09:54:03 +00007251
7252
Matthias Kloseb9621712010-04-24 17:59:49 +00007253$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007254
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007255
Guido van Rossum627b2d71993-12-24 10:39:16 +00007256fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007257rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007258
Matthias Kloseb9621712010-04-24 17:59:49 +00007259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7260$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007261
Matthias Kloseb9621712010-04-24 17:59:49 +00007262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7263$as_echo_n "checking for makedev... " >&6; }
7264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007265/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007266
Jesus Cea740f53a2010-04-28 11:35:30 +00007267#if defined(MAJOR_IN_MKDEV)
7268#include <sys/mkdev.h>
7269#elif defined(MAJOR_IN_SYSMACROS)
7270#include <sys/sysmacros.h>
7271#else
7272#include <sys/types.h>
7273#endif
7274
Neal Norwitz11690112002-07-30 01:08:28 +00007275int
7276main ()
7277{
Jesus Cea740f53a2010-04-28 11:35:30 +00007278
7279 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007280 ;
7281 return 0;
7282}
Matthias Kloseb159a552010-04-25 21:00:44 +00007283
Neal Norwitz11690112002-07-30 01:08:28 +00007284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007285if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007286 ac_cv_has_makedev=yes
7287else
Matthias Kloseb9621712010-04-24 17:59:49 +00007288 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007289fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007290rm -f core conftest.err conftest.$ac_objext \
7291 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7293$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007294if test "$ac_cv_has_makedev" = "yes"; then
7295
Matthias Kloseb9621712010-04-24 17:59:49 +00007296$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007297
7298fi
7299
Martin v. Löwis399a6892002-10-04 10:22:02 +00007300# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7301# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7302# defined, but the compiler does not support pragma redefine_extname,
7303# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7304# structures (such as rlimit64) without declaring them. As a
7305# work-around, disable LFS on such configurations
7306
7307use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7309$as_echo_n "checking Solaris LFS bug... " >&6; }
7310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007311/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007312
7313#define _LARGEFILE_SOURCE 1
7314#define _FILE_OFFSET_BITS 64
7315#include <sys/resource.h>
7316
Martin v. Löwis399a6892002-10-04 10:22:02 +00007317int
7318main ()
7319{
7320struct rlimit foo;
7321 ;
7322 return 0;
7323}
7324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007325if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007326 sol_lfs_bug=no
7327else
Matthias Kloseb9621712010-04-24 17:59:49 +00007328 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7332$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007333if test "$sol_lfs_bug" = "yes"; then
7334 use_lfs=no
7335fi
7336
7337if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007338# Two defines needed to enable largefile support on various platforms
7339# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007340case $ac_sys_system/$ac_sys_release in
7341AIX*)
7342
7343$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7344
7345 ;;
7346esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007347
Matthias Kloseb9621712010-04-24 17:59:49 +00007348$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007349
7350
Matthias Kloseb9621712010-04-24 17:59:49 +00007351$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007352
Martin v. Löwis399a6892002-10-04 10:22:02 +00007353fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007354
Guido van Rossum84e7b241996-08-19 21:59:00 +00007355# Add some code to confdefs.h so that the test for off_t works on SCO
7356cat >> confdefs.h <<\EOF
7357#if defined(SCO_DS)
7358#undef _OFF_T
7359#endif
7360EOF
7361
Guido van Rossumef2255b2000-03-10 22:30:29 +00007362# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007363ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007364if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007365
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007366else
Martin v. Löwis11437992002-04-12 09:54:03 +00007367
7368cat >>confdefs.h <<_ACEOF
7369#define mode_t int
7370_ACEOF
7371
7372fi
7373
Matthias Kloseb9621712010-04-24 17:59:49 +00007374ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007375if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007376
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007377else
Martin v. Löwis11437992002-04-12 09:54:03 +00007378
7379cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007380#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007381_ACEOF
7382
7383fi
7384
Matthias Kloseb9621712010-04-24 17:59:49 +00007385ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007386if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007387
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007388else
Martin v. Löwis11437992002-04-12 09:54:03 +00007389
7390cat >>confdefs.h <<_ACEOF
7391#define pid_t int
7392_ACEOF
7393
7394fi
7395
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007396
Martin v. Löwis11437992002-04-12 09:54:03 +00007397cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007398#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007399_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007400
Matthias Kloseb9621712010-04-24 17:59:49 +00007401ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007402if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007403
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007404else
Martin v. Löwis11437992002-04-12 09:54:03 +00007405
7406cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007407#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007408_ACEOF
7409
7410fi
7411
Matthias Kloseb9621712010-04-24 17:59:49 +00007412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7413$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007414if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007415 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007416else
Matthias Kloseb9621712010-04-24 17:59:49 +00007417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007418/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007419#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007420
7421_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007422if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007423 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007424 ac_cv_type_uid_t=yes
7425else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007426 ac_cv_type_uid_t=no
7427fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007428rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007429
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7432$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007433if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007434
Matthias Kloseb9621712010-04-24 17:59:49 +00007435$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007436
7437
Matthias Kloseb9621712010-04-24 17:59:49 +00007438$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007439
7440fi
7441
Mark Dickinsonce31f662012-12-02 13:20:22 +00007442
7443# There are two separate checks for each of the exact-width integer types we
7444# need. First we check whether the type is available using the usual
7445# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7446# and <stdint.h> where available). We then also use the special type checks of
7447# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7448# directly, #define's uint32_t to be a suitable type.
7449
7450ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7451if test "x$ac_cv_type_uint32_t" = xyes; then :
7452
7453$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7454
7455fi
7456
Matthias Kloseb9621712010-04-24 17:59:49 +00007457ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7458case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007459 no|yes) ;; #(
7460 *)
7461
Matthias Kloseb9621712010-04-24 17:59:49 +00007462$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007463
7464
7465cat >>confdefs.h <<_ACEOF
7466#define uint32_t $ac_cv_c_uint32_t
7467_ACEOF
7468;;
7469 esac
7470
Mark Dickinsonce31f662012-12-02 13:20:22 +00007471
7472ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7473if test "x$ac_cv_type_uint64_t" = xyes; then :
7474
7475$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7476
7477fi
7478
Matthias Kloseb9621712010-04-24 17:59:49 +00007479ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7480case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007481 no|yes) ;; #(
7482 *)
7483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007485
7486
7487cat >>confdefs.h <<_ACEOF
7488#define uint64_t $ac_cv_c_uint64_t
7489_ACEOF
7490;;
7491 esac
7492
Mark Dickinsonce31f662012-12-02 13:20:22 +00007493
7494ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7495if test "x$ac_cv_type_int32_t" = xyes; then :
7496
7497$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7498
7499fi
7500
Matthias Kloseb9621712010-04-24 17:59:49 +00007501ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7502case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007503 no|yes) ;; #(
7504 *)
7505
7506cat >>confdefs.h <<_ACEOF
7507#define int32_t $ac_cv_c_int32_t
7508_ACEOF
7509;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007510esac
7511
Mark Dickinsonce31f662012-12-02 13:20:22 +00007512
7513ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7514if test "x$ac_cv_type_int64_t" = xyes; then :
7515
7516$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7517
7518fi
7519
Matthias Kloseb9621712010-04-24 17:59:49 +00007520ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7521case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007522 no|yes) ;; #(
7523 *)
7524
7525cat >>confdefs.h <<_ACEOF
7526#define int64_t $ac_cv_c_int64_t
7527_ACEOF
7528;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007529esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007530
Mark Dickinsonce31f662012-12-02 13:20:22 +00007531
Matthias Kloseb9621712010-04-24 17:59:49 +00007532ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007533if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007534
Matthias Kloseb9621712010-04-24 17:59:49 +00007535$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007536
7537fi
7538
Stefan Krah1919b7e2012-03-21 18:25:23 +01007539ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7540if test "x$ac_cv_type___uint128_t" = xyes; then :
7541
7542$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7543
7544fi
7545
Jack Jansendd19cf82001-12-06 22:36:17 +00007546
Michael W. Hudson54241132001-12-07 15:38:26 +00007547# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007548# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007549# The cast to long int works around a bug in the HP C Compiler
7550# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7551# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7552# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7554$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007555if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007556 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007557else
Matthias Kloseb9621712010-04-24 17:59:49 +00007558 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 +00007559
Martin v. Löwis11437992002-04-12 09:54:03 +00007560else
Matthias Kloseb9621712010-04-24 17:59:49 +00007561 if test "$ac_cv_type_int" = yes; then
7562 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007564as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007565See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007566 else
7567 ac_cv_sizeof_int=0
7568 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007570
Martin v. Löwis11437992002-04-12 09:54:03 +00007571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7573$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007574
7575
7576
Martin v. Löwis11437992002-04-12 09:54:03 +00007577cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007578#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007579_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007580
7581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007582# The cast to long int works around a bug in the HP C Compiler
7583# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7584# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7585# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7587$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007588if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007589 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007590else
Matthias Kloseb9621712010-04-24 17:59:49 +00007591 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007592
Martin v. Löwis11437992002-04-12 09:54:03 +00007593else
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 if test "$ac_cv_type_long" = yes; then
7595 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007597as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007598See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007599 else
7600 ac_cv_sizeof_long=0
7601 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007603
Martin v. Löwis11437992002-04-12 09:54:03 +00007604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7606$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007607
7608
7609
Martin v. Löwis11437992002-04-12 09:54:03 +00007610cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007611#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007612_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007613
7614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007615# The cast to long int works around a bug in the HP C Compiler
7616# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7617# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7618# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7620$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007621if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007622 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007623else
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007625
Martin v. Löwis11437992002-04-12 09:54:03 +00007626else
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 if test "$ac_cv_type_void_p" = yes; then
7628 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7629$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007630as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007631See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007632 else
7633 ac_cv_sizeof_void_p=0
7634 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007636
Martin v. Löwis11437992002-04-12 09:54:03 +00007637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7639$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007640
7641
7642
Martin v. Löwis11437992002-04-12 09:54:03 +00007643cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007644#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007645_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007646
7647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007648# The cast to long int works around a bug in the HP C Compiler
7649# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7650# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7651# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7653$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007654if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007656else
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007658
Martin v. Löwis11437992002-04-12 09:54:03 +00007659else
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 if test "$ac_cv_type_short" = yes; then
7661 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007663as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007664See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007665 else
7666 ac_cv_sizeof_short=0
7667 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007669
Martin v. Löwis11437992002-04-12 09:54:03 +00007670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7672$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007673
7674
7675
Martin v. Löwis11437992002-04-12 09:54:03 +00007676cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007677#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007678_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007679
7680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681# The cast to long int works around a bug in the HP C Compiler
7682# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7683# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7684# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7686$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007687if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007688 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007689else
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007691
Martin v. Löwis11437992002-04-12 09:54:03 +00007692else
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 if test "$ac_cv_type_float" = yes; then
7694 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007696as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007697See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007698 else
7699 ac_cv_sizeof_float=0
7700 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007702
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7705$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007706
7707
7708
Martin v. Löwis11437992002-04-12 09:54:03 +00007709cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007710#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007711_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007712
7713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714# The cast to long int works around a bug in the HP C Compiler
7715# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7716# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7717# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7719$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007720if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007722else
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007724
Martin v. Löwis11437992002-04-12 09:54:03 +00007725else
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 if test "$ac_cv_type_double" = yes; then
7727 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007729as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007730See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007731 else
7732 ac_cv_sizeof_double=0
7733 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007735
Martin v. Löwis11437992002-04-12 09:54:03 +00007736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7738$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007739
7740
7741
Martin v. Löwis11437992002-04-12 09:54:03 +00007742cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007743#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007744_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007745
7746
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747# The cast to long int works around a bug in the HP C Compiler
7748# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7749# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7750# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7752$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007753if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007754 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007755else
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007757
Martin v. Löwis11437992002-04-12 09:54:03 +00007758else
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 if test "$ac_cv_type_fpos_t" = yes; then
7760 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007762as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007763See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007764 else
7765 ac_cv_sizeof_fpos_t=0
7766 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007768
Martin v. Löwis11437992002-04-12 09:54:03 +00007769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7771$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007772
7773
7774
Martin v. Löwis11437992002-04-12 09:54:03 +00007775cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007776#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007777_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007778
Michael W. Hudson54241132001-12-07 15:38:26 +00007779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007780# The cast to long int works around a bug in the HP C Compiler
7781# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7782# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7783# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7785$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007786if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007788else
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 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 +00007790
Martin v. Löwis18e16552006-02-15 17:27:45 +00007791else
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 if test "$ac_cv_type_size_t" = yes; then
7793 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7794$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007795as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007796See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 else
7798 ac_cv_sizeof_size_t=0
7799 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007801
Martin v. Löwis18e16552006-02-15 17:27:45 +00007802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7804$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805
7806
7807
Martin v. Löwis18e16552006-02-15 17:27:45 +00007808cat >>confdefs.h <<_ACEOF
7809#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7810_ACEOF
7811
7812
Christian Heimes400adb02008-02-01 08:12:03 +00007813# The cast to long int works around a bug in the HP C Compiler
7814# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7815# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7816# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7818$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007819if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007821else
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 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 +00007823
Christian Heimes400adb02008-02-01 08:12:03 +00007824else
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 if test "$ac_cv_type_pid_t" = yes; then
7826 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007828as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007829See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007830 else
7831 ac_cv_sizeof_pid_t=0
7832 fi
7833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007834
Christian Heimes400adb02008-02-01 08:12:03 +00007835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7837$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007838
7839
7840
7841cat >>confdefs.h <<_ACEOF
7842#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7843_ACEOF
7844
7845
Michael W. Hudson54241132001-12-07 15:38:26 +00007846
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7848$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007849have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007851/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007852
Martin v. Löwis11437992002-04-12 09:54:03 +00007853int
7854main ()
7855{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007856long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 ;
7858 return 0;
7859}
7860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007861if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007862
7863
Matthias Kloseb9621712010-04-24 17:59:49 +00007864$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007865
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007866 have_long_long=yes
7867
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7871$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007872if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873# The cast to long int works around a bug in the HP C Compiler
7874# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7875# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7876# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7878$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007879if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007880 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007881else
Matthias Kloseb9621712010-04-24 17:59:49 +00007882 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 +00007883
Martin v. Löwis11437992002-04-12 09:54:03 +00007884else
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 if test "$ac_cv_type_long_long" = yes; then
7886 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7887$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007888as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007889See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890 else
7891 ac_cv_sizeof_long_long=0
7892 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007894
Martin v. Löwis11437992002-04-12 09:54:03 +00007895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7897$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007898
7899
7900
Martin v. Löwis11437992002-04-12 09:54:03 +00007901cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007902#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007903_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007904
Michael W. Hudson54241132001-12-07 15:38:26 +00007905
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007906fi
7907
Matthias Kloseb9621712010-04-24 17:59:49 +00007908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7909$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007910have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007912/* end confdefs.h. */
7913
7914int
7915main ()
7916{
7917long double x; x = (long double)0;
7918 ;
7919 return 0;
7920}
7921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007922if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007923
7924
Matthias Kloseb9621712010-04-24 17:59:49 +00007925$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007926
7927 have_long_double=yes
7928
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007929fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7932$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007933if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007934# The cast to long int works around a bug in the HP C Compiler
7935# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7936# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7937# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7939$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007940if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007941 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007942else
Matthias Kloseb9621712010-04-24 17:59:49 +00007943 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 +00007944
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007945else
Matthias Kloseb9621712010-04-24 17:59:49 +00007946 if test "$ac_cv_type_long_double" = yes; then
7947 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007949as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007950See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007951 else
7952 ac_cv_sizeof_long_double=0
7953 fi
7954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007955
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7958$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007959
7960
7961
7962cat >>confdefs.h <<_ACEOF
7963#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7964_ACEOF
7965
7966
7967fi
7968
7969
Matthias Kloseb9621712010-04-24 17:59:49 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7971$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007972have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007974/* end confdefs.h. */
7975
7976int
7977main ()
7978{
7979_Bool x; x = (_Bool)0;
7980 ;
7981 return 0;
7982}
7983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007984if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007985
7986
Matthias Kloseb9621712010-04-24 17:59:49 +00007987$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007988
7989 have_c99_bool=yes
7990
Thomas Woutersb2137042007-02-01 18:02:27 +00007991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7994$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007995if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996# The cast to long int works around a bug in the HP C Compiler
7997# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7998# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7999# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8001$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008002if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008003 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008004else
Matthias Kloseb9621712010-04-24 17:59:49 +00008005 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 +00008006
Thomas Woutersb2137042007-02-01 18:02:27 +00008007else
Matthias Kloseb9621712010-04-24 17:59:49 +00008008 if test "$ac_cv_type__Bool" = yes; then
8009 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008011as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008012See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013 else
8014 ac_cv_sizeof__Bool=0
8015 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008017
Thomas Woutersb2137042007-02-01 18:02:27 +00008018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8020$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021
8022
8023
Thomas Woutersb2137042007-02-01 18:02:27 +00008024cat >>confdefs.h <<_ACEOF
8025#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8026_ACEOF
8027
8028
8029fi
8030
Matthias Kloseb9621712010-04-24 17:59:49 +00008031ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008032 #include <stdint.h>
8033 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008034 #ifdef HAVE_INTTYPES_H
8035 #include <inttypes.h>
8036 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008037"
Victor Stinnere0be4232011-10-25 13:06:09 +02008038if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008039
8040cat >>confdefs.h <<_ACEOF
8041#define HAVE_UINTPTR_T 1
8042_ACEOF
8043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044# The cast to long int works around a bug in the HP C Compiler
8045# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8046# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8047# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8049$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008050if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008052else
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 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 +00008054
Martin v. Löwis11437992002-04-12 09:54:03 +00008055else
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 if test "$ac_cv_type_uintptr_t" = yes; then
8057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008059as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008060See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061 else
8062 ac_cv_sizeof_uintptr_t=0
8063 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008065
Martin v. Löwis11437992002-04-12 09:54:03 +00008066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8068$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069
8070
8071
Martin v. Löwis11437992002-04-12 09:54:03 +00008072cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008073#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008074_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008075
Michael W. Hudson54241132001-12-07 15:38:26 +00008076
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008077fi
8078
Thomas Wouters89f507f2006-12-13 04:49:30 +00008079
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008080# The cast to long int works around a bug in the HP C Compiler
8081# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8082# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8083# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8085$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008086if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008088else
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008090#ifdef HAVE_SYS_TYPES_H
8091#include <sys/types.h>
8092#endif
8093
Matthias Kloseb9621712010-04-24 17:59:49 +00008094"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008095
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008096else
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 if test "$ac_cv_type_off_t" = yes; then
8098 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8099$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008100as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008101See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008102 else
8103 ac_cv_sizeof_off_t=0
8104 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008106
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8109$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008110
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008111
8112
Martin v. Löwis11437992002-04-12 09:54:03 +00008113cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008114#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008115_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008116
Michael W. Hudson54241132001-12-07 15:38:26 +00008117
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008118
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8120$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008121if test "$have_long_long" = yes
8122then
8123if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008124 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008127
Matthias Kloseb9621712010-04-24 17:59:49 +00008128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8129$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008130else
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8132$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008133fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008134else
Matthias Kloseb9621712010-04-24 17:59:49 +00008135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8136$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008137fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008138
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008139# The cast to long int works around a bug in the HP C Compiler
8140# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8141# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8142# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8144$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008145if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008147else
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008149#ifdef HAVE_SYS_TYPES_H
8150#include <sys/types.h>
8151#endif
8152#ifdef HAVE_TIME_H
8153#include <time.h>
8154#endif
8155
Matthias Kloseb9621712010-04-24 17:59:49 +00008156"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008157
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008158else
Matthias Kloseb9621712010-04-24 17:59:49 +00008159 if test "$ac_cv_type_time_t" = yes; then
8160 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008162as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008163See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008164 else
8165 ac_cv_sizeof_time_t=0
8166 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008168
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8171$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008172
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008173
8174
Martin v. Löwis11437992002-04-12 09:54:03 +00008175cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008176#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008177_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008178
Michael W. Hudson54241132001-12-07 15:38:26 +00008179
8180
Trent Mick635f6fb2000-08-23 21:33:05 +00008181# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008182ac_save_cc="$CC"
8183if test "$ac_cv_kpthread" = "yes"
8184then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008185elif test "$ac_cv_kthread" = "yes"
8186then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008187elif test "$ac_cv_pthread" = "yes"
8188then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008189fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008190
Matthias Kloseb9621712010-04-24 17:59:49 +00008191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8192$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008193have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008195/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008196
8197 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008198int
8199main ()
8200{
Guido van Rossum12580492000-09-24 16:47:19 +00008201pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008202 ;
8203 return 0;
8204}
Matthias Kloseb159a552010-04-25 21:00:44 +00008205
Martin v. Löwis11437992002-04-12 09:54:03 +00008206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008207if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008208 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8212$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008213if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008215# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8216# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8217# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8219$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008220if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008221 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008222else
Matthias Kloseb9621712010-04-24 17:59:49 +00008223 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008224#ifdef HAVE_PTHREAD_H
8225#include <pthread.h>
8226#endif
8227
Matthias Kloseb9621712010-04-24 17:59:49 +00008228"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008229
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008230else
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 if test "$ac_cv_type_pthread_t" = yes; then
8232 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8233$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008234as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008235See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008236 else
8237 ac_cv_sizeof_pthread_t=0
8238 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008240
Trent Mick635f6fb2000-08-23 21:33:05 +00008241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8243$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008244
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008245
8246
Martin v. Löwis11437992002-04-12 09:54:03 +00008247cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008248#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008249_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008250
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008251
Trent Mick635f6fb2000-08-23 21:33:05 +00008252fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008253CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008254
Michael W. Hudson54241132001-12-07 15:38:26 +00008255
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008256case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008257 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008258 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8259 ;;
8260 Darwin/*)
8261 OTHER_LIBTOOL_OPT=""
8262 ;;
8263esac
8264
8265
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008266ARCH_RUN_32BIT=""
8267
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008268case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008269 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008270 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8271 if test "${enable_universalsdk}"; then
8272 :
8273 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008274 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008275 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008276 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008277 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008278 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008279 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008280 if test ${gcc_version} '<' 4.0
8281 then
8282 LIBTOOL_CRUFT="-lcc_dynamic"
8283 else
8284 LIBTOOL_CRUFT=""
8285 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008286 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008287 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008288else
Matthias Kloseb9621712010-04-24 17:59:49 +00008289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008290/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008291
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008292 #include <unistd.h>
8293 int main(int argc, char*argv[])
8294 {
8295 if (sizeof(long) == 4) {
8296 return 0;
8297 } else {
8298 return 1;
8299 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008300 }
8301
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008303if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008304 ac_osx_32bit=yes
8305else
Matthias Kloseb9621712010-04-24 17:59:49 +00008306 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8309 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008310fi
8311
8312
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008313 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008314 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008315 i386)
8316 MACOSX_DEFAULT_ARCH="i386"
8317 ;;
8318 ppc)
8319 MACOSX_DEFAULT_ARCH="ppc"
8320 ;;
8321 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008322 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008323 ;;
8324 esac
8325 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008326 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008327 i386)
8328 MACOSX_DEFAULT_ARCH="x86_64"
8329 ;;
8330 ppc)
8331 MACOSX_DEFAULT_ARCH="ppc64"
8332 ;;
8333 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008334 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008335 ;;
8336 esac
8337
8338 #ARCH_RUN_32BIT="true"
8339 fi
8340
8341 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008342 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008343 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008344esac
8345
Matthias Kloseb9621712010-04-24 17:59:49 +00008346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8347$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008348if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008349then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008350 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008351 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008352 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008353
Matthias Kloseb9621712010-04-24 17:59:49 +00008354$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8357$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008358 if test $enable_shared = "yes"
8359 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008360 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 +00008361 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008362else
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8364$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008365fi
8366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8368$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008369case $ac_sys_system/$ac_sys_release in
8370 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008371
Matthias Kloseb9621712010-04-24 17:59:49 +00008372$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008373
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8375$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008376 ;;
8377 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8379$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008380 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008381esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008382
Guido van Rossum0a516c91994-09-12 10:58:40 +00008383# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008384
Michael W. Hudson54241132001-12-07 15:38:26 +00008385
8386
8387
8388
Benjamin Peterson99f03762010-04-11 22:15:28 +00008389
Thomas Wouters477c8d52006-05-27 19:21:47 +00008390
Guido van Rossum0a516c91994-09-12 10:58:40 +00008391# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008392# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008393# (Shared libraries in this instance are shared modules to be loaded into
8394# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8396$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008397if test -z "$LDSHARED"
8398then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008399 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008400 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008401 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008402 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008403 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008404 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008405 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008406 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008407 if test "$GCC" = "yes" ; then
8408 LDSHARED='$(CC) -shared'
8409 LDCXXSHARED='$(CXX) -shared'
8410 else
8411 LDSHARED='$(CC) -G'
8412 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008413 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008414 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008415 if test "$GCC" = "yes" ; then
8416 LDSHARED='$(CC) -shared'
8417 LDCXXSHARED='$(CXX) -shared'
8418 else
8419 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008420 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008421 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008422 LDSHARED='$(CC) -bundle'
8423 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008424 if test "$enable_framework" ; then
8425 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008426 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8427 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008428 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008429 else
8430 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008431 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008432 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008433 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008434 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008435 LDSHARED='$(CC) -bundle'
8436 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008437 if test "$enable_framework" ; then
8438 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008439 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8440 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008441 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008442 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008443 # No framework, use the Python app as bundle-loader
8444 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008445 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008446 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008447 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008448 Darwin/*)
8449 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8450 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008451
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008452 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008453 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008454 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008455 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008456 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008457 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8458 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008459 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008460 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008461 LDSHARED='$(CC) -bundle'
8462 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008463 if test "$enable_framework" ; then
8464 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008465 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8466 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008467 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008468 else
8469 # No framework, use the Python app as bundle-loader
8470 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8471 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008472 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008473 fi
8474 fi
8475 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008476 Linux*|GNU*|QNX*)
8477 LDSHARED='$(CC) -shared'
8478 LDCXXSHARED='$(CXX) -shared';;
8479 BSD/OS*/4*)
8480 LDSHARED="gcc -shared"
8481 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008482 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008483 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008484 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008485 LDSHARED='$(CC) -shared'
8486 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008487 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008488 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008489 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008490 OpenBSD*)
8491 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8492 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008493 LDSHARED='$(CC) -shared $(CCSHARED)'
8494 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008495 else
8496 case `uname -r` in
8497 [01].* | 2.[0-7] | 2.[0-7].*)
8498 LDSHARED="ld -Bshareable ${LDFLAGS}"
8499 ;;
8500 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008501 LDSHARED='$(CC) -shared $(CCSHARED)'
8502 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008503 ;;
8504 esac
8505 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008506 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008507 LDSHARED='$(CC) -shared'
8508 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008509 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008510 if test "$GCC" = "yes" ; then
8511 LDSHARED='$(CC) -shared'
8512 LDCXXSHARED='$(CXX) -shared'
8513 else
8514 LDSHARED='$(CC) -G'
8515 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008516 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008517 SCO_SV*)
8518 LDSHARED='$(CC) -Wl,-G,-Bexport'
8519 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8520 CYGWIN*)
8521 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8522 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008523 *) LDSHARED="ld";;
8524 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8527$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008528LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008529BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008530# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008531# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8533$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008534if test -z "$CCSHARED"
8535then
Guido van Rossum07397971997-04-29 21:49:50 +00008536 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008537 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008538 then CCSHARED="-fPIC";
8539 elif test `uname -p` = sparc;
8540 then CCSHARED="-xcode=pic32";
8541 else CCSHARED="-Kpic";
8542 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008543 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008544 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008545 else CCSHARED="+z";
8546 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008547 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008548 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008549 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008550 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008551 if test "$GCC" = "yes"
8552 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008553 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008554 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008555 SCO_SV*)
8556 if test "$GCC" = "yes"
8557 then CCSHARED="-fPIC"
8558 else CCSHARED="-Kpic -belf"
8559 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008560 IRIX*/6*) case $CC in
8561 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008562 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008563 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008564 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8567$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008568# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008569# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8571$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008572if test -z "$LINKFORSHARED"
8573then
Guido van Rossum07397971997-04-29 21:49:50 +00008574 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008575 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008576 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008577 LINKFORSHARED="-Wl,-E -Wl,+s";;
8578# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008579 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008580 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008581 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008583 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008584 if test "$enable_framework"
8585 then
Jack Jansenda49e192005-01-07 13:08:22 +00008586 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008587 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008588 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008589 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008590 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008591 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008592 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008593 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8594 then
8595 LINKFORSHARED="-Wl,--export-dynamic"
8596 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008597 SunOS/5*) case $CC in
8598 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008599 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008600 then
8601 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008602 fi;;
8603 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008604 CYGWIN*)
8605 if test $enable_shared = "no"
8606 then
8607 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8608 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008609 QNX*)
8610 # -Wl,-E causes the symbols to be added to the dynamic
8611 # symbol table so that they can be found when a module
8612 # is loaded. -N 2048K causes the stack size to be set
8613 # to 2048 kilobytes so that the stack doesn't overflow
8614 # when running test_compile.py.
8615 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008616 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8619$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008620
Michael W. Hudson54241132001-12-07 15:38:26 +00008621
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008622
Matthias Kloseb9621712010-04-24 17:59:49 +00008623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8624$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008625if test ! "$LIBRARY" = "$LDLIBRARY"
8626then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008627 case $ac_sys_system in
8628 CYGWIN*)
8629 # Cygwin needs CCSHARED when building extension DLLs
8630 # but not when building the interpreter DLL.
8631 CFLAGSFORSHARED='';;
8632 *)
8633 CFLAGSFORSHARED='$(CCSHARED)'
8634 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8637$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008638
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008639# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8640# library (with --enable-shared).
8641# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008642# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8643# if it is not required, since it creates a dependency of the shared library
8644# to LIBS. This, in turn, means that applications linking the shared libpython
8645# don't need to link LIBS explicitly. The default should be only changed
8646# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008647
Matthias Kloseb9621712010-04-24 17:59:49 +00008648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8649$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008650case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008651 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008652 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008653esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8655$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008656
8657
Guido van Rossum627b2d71993-12-24 10:39:16 +00008658# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8660$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008661if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008662 $as_echo_n "(cached) " >&6
8663else
8664 ac_check_lib_save_LIBS=$LIBS
8665LIBS="-lsendfile $LIBS"
8666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8667/* end confdefs.h. */
8668
8669/* Override any GCC internal prototype to avoid an error.
8670 Use char because int might match the return type of a GCC
8671 builtin and then its argument prototype would still apply. */
8672#ifdef __cplusplus
8673extern "C"
8674#endif
8675char sendfile ();
8676int
8677main ()
8678{
8679return sendfile ();
8680 ;
8681 return 0;
8682}
8683_ACEOF
8684if ac_fn_c_try_link "$LINENO"; then :
8685 ac_cv_lib_sendfile_sendfile=yes
8686else
8687 ac_cv_lib_sendfile_sendfile=no
8688fi
8689rm -f core conftest.err conftest.$ac_objext \
8690 conftest$ac_exeext conftest.$ac_ext
8691LIBS=$ac_check_lib_save_LIBS
8692fi
8693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8694$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008695if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008696 cat >>confdefs.h <<_ACEOF
8697#define HAVE_LIBSENDFILE 1
8698_ACEOF
8699
8700 LIBS="-lsendfile $LIBS"
8701
8702fi
8703
Matthias Kloseb9621712010-04-24 17:59:49 +00008704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8705$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008706if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008708else
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008710LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714/* Override any GCC internal prototype to avoid an error.
8715 Use char because int might match the return type of a GCC
8716 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008717#ifdef __cplusplus
8718extern "C"
8719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008720char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008721int
8722main ()
8723{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ;
8726 return 0;
8727}
8728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008729if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008731else
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734rm -f core conftest.err conftest.$ac_objext \
8735 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008736LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8739$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008740if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008741 cat >>confdefs.h <<_ACEOF
8742#define HAVE_LIBDL 1
8743_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008744
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008745 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008746
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008747fi
8748 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8750$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008751if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008752 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008753else
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008755LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008759/* Override any GCC internal prototype to avoid an error.
8760 Use char because int might match the return type of a GCC
8761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008762#ifdef __cplusplus
8763extern "C"
8764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008765char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008766int
8767main ()
8768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 ;
8771 return 0;
8772}
8773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008774if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008776else
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008779rm -f core conftest.err conftest.$ac_objext \
8780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008781LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8784$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008785if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 cat >>confdefs.h <<_ACEOF
8787#define HAVE_LIBDLD 1
8788_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008789
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008790 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008791
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008792fi
8793 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008794
Georg Brandlb1441c72009-01-03 22:33:39 +00008795# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008796if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8798$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008799if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008801else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008802 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806/* Override any GCC internal prototype to avoid an error.
8807 Use char because int might match the return type of a GCC
8808 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008809#ifdef __cplusplus
8810extern "C"
8811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008812char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008813int
8814main ()
8815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 ;
8818 return 0;
8819}
8820_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821for ac_lib in '' pthread rt posix4; do
8822 if test -z "$ac_lib"; then
8823 ac_res="none required"
8824 else
8825 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008826 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008829 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008831rm -f core conftest.err conftest.$ac_objext \
8832 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008833 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008834 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836done
Victor Stinnere0be4232011-10-25 13:06:09 +02008837if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008839else
8840 ac_cv_search_sem_init=no
8841fi
8842rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008843LIBS=$ac_func_search_save_LIBS
8844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8846$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008847ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008848if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008849 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008850
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008851fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008852 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008853 # posix4 on Solaris 2.6
8854 # pthread (first!) on Linux
8855fi
8856
Martin v. Löwis19d17342003-06-14 21:03:05 +00008857# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8859$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008860if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008862else
8863 ac_check_lib_save_LIBS=$LIBS
8864LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008866/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868/* Override any GCC internal prototype to avoid an error.
8869 Use char because int might match the return type of a GCC
8870 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008871#ifdef __cplusplus
8872extern "C"
8873#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008874char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008875int
8876main ()
8877{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008878return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008879 ;
8880 return 0;
8881}
8882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008883if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008884 ac_cv_lib_intl_textdomain=yes
8885else
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008888rm -f core conftest.err conftest.$ac_objext \
8889 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008890LIBS=$ac_check_lib_save_LIBS
8891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8893$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008894if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008895
Matthias Kloseb9621712010-04-24 17:59:49 +00008896$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008897
Brett Cannonc6d936e2009-06-07 20:09:53 +00008898 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008899fi
8900
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008901
8902# checks for system dependent C++ extensions support
8903case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8905$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008907/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008908
Georg Brandl59e87bd2011-02-15 19:48:59 +00008909 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008910int
8911main ()
8912{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008913loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008914 ;
8915 return 0;
8916}
Matthias Kloseb159a552010-04-25 21:00:44 +00008917
Martin v. Löwis11437992002-04-12 09:54:03 +00008918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008919if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008920
Matthias Kloseb159a552010-04-25 21:00:44 +00008921
Matthias Kloseb9621712010-04-24 17:59:49 +00008922$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008923
Matthias Kloseb159a552010-04-25 21:00:44 +00008924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008925$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008926
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008927else
Matthias Kloseb159a552010-04-25 21:00:44 +00008928
8929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008930$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008931
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008933rm -f core conftest.err conftest.$ac_objext \
8934 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008935 *) ;;
8936esac
8937
Guido van Rossum70c7f481998-03-26 18:44:10 +00008938# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8940$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008941if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008942 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008943else
Martin v. Löwis11437992002-04-12 09:54:03 +00008944 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008945LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949/* Override any GCC internal prototype to avoid an error.
8950 Use char because int might match the return type of a GCC
8951 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008952#ifdef __cplusplus
8953extern "C"
8954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008955char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008956int
8957main ()
8958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008959return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008960 ;
8961 return 0;
8962}
8963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008964if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008966else
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008969rm -f core conftest.err conftest.$ac_objext \
8970 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008971LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8974$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008975if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008976 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008977fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008978 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8980$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008981if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008983else
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008985LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008989/* Override any GCC internal prototype to avoid an error.
8990 Use char because int might match the return type of a GCC
8991 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008992#ifdef __cplusplus
8993extern "C"
8994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008995char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008996int
8997main ()
8998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008999return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009000 ;
9001 return 0;
9002}
9003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009004if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009005 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009006else
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009009rm -f core conftest.err conftest.$ac_objext \
9010 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009011LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9014$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009015if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009016 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009017fi
9018 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009019
Matthias Kloseb9621712010-04-24 17:59:49 +00009020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9021$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009023# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009024if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009025 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9027$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009028LIBS="$withval $LIBS"
9029
9030else
Matthias Kloseb9621712010-04-24 17:59:49 +00009031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9032$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009033fi
9034
Guido van Rossum7f43da71994-08-01 12:15:30 +00009035
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009036if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009037 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9038set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9040$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009041if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009043else
9044 case $PKG_CONFIG in
9045 [\\/]* | ?:[\\/]*)
9046 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9047 ;;
9048 *)
9049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9050for as_dir in $PATH
9051do
9052 IFS=$as_save_IFS
9053 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009055 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009056 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009058 break 2
9059 fi
9060done
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009062IFS=$as_save_IFS
9063
9064 ;;
9065esac
9066fi
9067PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9068if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9070$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009071else
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9073$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009074fi
9075
9076
9077fi
9078if test -z "$ac_cv_path_PKG_CONFIG"; then
9079 ac_pt_PKG_CONFIG=$PKG_CONFIG
9080 # Extract the first word of "pkg-config", so it can be a program name with args.
9081set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9083$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009084if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009086else
9087 case $ac_pt_PKG_CONFIG in
9088 [\\/]* | ?:[\\/]*)
9089 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9090 ;;
9091 *)
9092 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9093for as_dir in $PATH
9094do
9095 IFS=$as_save_IFS
9096 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009098 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009099 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009100 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009101 break 2
9102 fi
9103done
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009105IFS=$as_save_IFS
9106
9107 ;;
9108esac
9109fi
9110ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9111if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9113$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009114else
Matthias Kloseb9621712010-04-24 17:59:49 +00009115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9116$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009117fi
9118
9119 if test "x$ac_pt_PKG_CONFIG" = x; then
9120 PKG_CONFIG=""
9121 else
9122 case $cross_compiling:$ac_tool_warned in
9123yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009124{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9125$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009126ac_tool_warned=yes ;;
9127esac
9128 PKG_CONFIG=$ac_pt_PKG_CONFIG
9129 fi
9130else
9131 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9132fi
9133
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009134
9135# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9137$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009138
9139# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009140if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009141 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009142else
9143 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009144fi
9145
9146
Matthias Kloseb9621712010-04-24 17:59:49 +00009147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9148$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009149
9150# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9152$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009153
9154# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009155if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009156 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009157else
9158 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009159fi
9160
9161
9162if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009163 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9164else
9165 LIBFFI_INCLUDEDIR=""
9166fi
9167
9168
Matthias Kloseb9621712010-04-24 17:59:49 +00009169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9170$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009171
Stefan Krah60187b52012-03-23 19:06:27 +01009172# Check for use of the system libmpdec library
9173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9174$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9175
9176# Check whether --with-system_libmpdec was given.
9177if test "${with_system_libmpdec+set}" = set; then :
9178 withval=$with_system_libmpdec;
9179else
9180 with_system_libmpdec="no"
9181fi
9182
9183
9184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9185$as_echo "$with_system_libmpdec" >&6; }
9186
Benjamin Peterson076ed002010-10-31 17:11:02 +00009187# Check for support for loadable sqlite extensions
9188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9189$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9190# Check whether --enable-loadable-sqlite-extensions was given.
9191if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9192 enableval=$enable_loadable_sqlite_extensions;
9193else
9194 enable_loadable_sqlite_extensions="no"
9195fi
9196
9197
9198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9199$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9200
Matthias Klose55708cc2009-04-30 08:06:49 +00009201# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9203$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009204
9205# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009206if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009207 withval=$with_dbmliborder;
9208if test x$with_dbmliborder = xyes
9209then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009210as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009211else
9212 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9213 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9214 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009215 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009216 fi
9217 done
9218fi
9219fi
9220
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9222$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009223
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009224# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009225
9226
Matthias Kloseb9621712010-04-24 17:59:49 +00009227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9228$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009230# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009231if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009232 withval=$with_signal_module;
9233fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009234
9235
9236if test -z "$with_signal_module"
9237then with_signal_module="yes"
9238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9240$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009241
9242if test "${with_signal_module}" = "yes"; then
9243 USE_SIGNAL_MODULE=""
9244 SIGNAL_OBJS=""
9245else
9246 USE_SIGNAL_MODULE="#"
9247 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9248fi
9249
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009250# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009251
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009252USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009254
Martin v. Löwis11437992002-04-12 09:54:03 +00009255
9256# Templates for things AC_DEFINEd more than once.
9257# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009258
9259
Martin v. Löwis11437992002-04-12 09:54:03 +00009260
Matthias Kloseb9621712010-04-24 17:59:49 +00009261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9262$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009265if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009266 withval=$with_threads;
9267fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009268
9269
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009270# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009272# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009273if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009274 withval=$with_thread; with_threads=$with_thread
9275fi
9276
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009277
9278if test -z "$with_threads"
9279then with_threads="yes"
9280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9282$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009283
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009284
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009285if test "$with_threads" = "no"
9286then
9287 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009288elif test "$ac_cv_pthread_is_default" = yes
9289then
Matthias Kloseb9621712010-04-24 17:59:49 +00009290 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009291
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009292 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009293 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009294
9295 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009296 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009297elif test "$ac_cv_kpthread" = "yes"
9298then
9299 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009300 if test "$ac_cv_cxx_thread" = "yes"; then
9301 CXX="$CXX -Kpthread"
9302 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009303 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009304
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009305 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009306 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009307elif test "$ac_cv_kthread" = "yes"
9308then
9309 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009310 if test "$ac_cv_cxx_thread" = "yes"; then
9311 CXX="$CXX -Kthread"
9312 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009313 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009314
9315 posix_threads=yes
9316 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009317elif test "$ac_cv_pthread" = "yes"
9318then
9319 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009320 if test "$ac_cv_cxx_thread" = "yes"; then
9321 CXX="$CXX -pthread"
9322 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009323 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009324
9325 posix_threads=yes
9326 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009327else
9328 if test ! -z "$with_threads" -a -d "$with_threads"
9329 then LDFLAGS="$LDFLAGS -L$with_threads"
9330 fi
9331 if test ! -z "$withval" -a -d "$withval"
9332 then LDFLAGS="$LDFLAGS -L$withval"
9333 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009334
9335 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009336 # define _POSIX_THREADS in unistd.h. Some apparently don't
9337 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9339$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009341/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009342
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009343#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009344#ifdef _POSIX_THREADS
9345yes
9346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009347
9348_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009349if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009350 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009351 unistd_defines_pthreads=yes
9352else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009353 unistd_defines_pthreads=no
9354fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009355rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009356
Matthias Kloseb9621712010-04-24 17:59:49 +00009357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9358$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009359
Matthias Kloseb9621712010-04-24 17:59:49 +00009360 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009361
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009362 # Just looking for pthread_create in libpthread is not enough:
9363 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9364 # So we really have to include pthread.h, and then link.
9365 _libs=$LIBS
9366 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9368$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009370/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009371
9372#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009373#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009374
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009375void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009376int
9377main ()
9378{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009379
9380pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ;
9382 return 0;
9383}
9384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009385if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009386
Matthias Kloseb9621712010-04-24 17:59:49 +00009387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9388$as_echo "yes" >&6; }
9389 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009390
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009391 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009392 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009393else
Martin v. Löwis11437992002-04-12 09:54:03 +00009394
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009395 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009396 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009397if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009398 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009399
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009400 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009401 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009402else
Guido van Rossumad678af1998-10-02 14:42:15 +00009403
Matthias Kloseb9621712010-04-24 17:59:49 +00009404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9405$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009406if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009407 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009408else
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009410LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414/* Override any GCC internal prototype to avoid an error.
9415 Use char because int might match the return type of a GCC
9416 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009417#ifdef __cplusplus
9418extern "C"
9419#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009420char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009421int
9422main ()
9423{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 ;
9426 return 0;
9427}
9428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009429if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009431else
Matthias Kloseb9621712010-04-24 17:59:49 +00009432 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009434rm -f core conftest.err conftest.$ac_objext \
9435 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009436LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9439$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009440if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009441 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009442
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009443 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009444 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009445 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009446else
Greg Steinadf63d62000-07-05 10:38:09 +00009447
Matthias Kloseb9621712010-04-24 17:59:49 +00009448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9449$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009450if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009451 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009452else
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009454LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009458/* Override any GCC internal prototype to avoid an error.
9459 Use char because int might match the return type of a GCC
9460 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009461#ifdef __cplusplus
9462extern "C"
9463#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009464char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009465int
9466main ()
9467{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009468return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 ;
9470 return 0;
9471}
9472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009473if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009474 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009475else
Matthias Kloseb9621712010-04-24 17:59:49 +00009476 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009478rm -f core conftest.err conftest.$ac_objext \
9479 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009480LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9483$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009484if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009485 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009486
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009487 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009488 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009489 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009490else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009491
Matthias Kloseb9621712010-04-24 17:59:49 +00009492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9493$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009494if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009495 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009496else
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009498LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009502/* Override any GCC internal prototype to avoid an error.
9503 Use char because int might match the return type of a GCC
9504 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009505#ifdef __cplusplus
9506extern "C"
9507#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009508char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009509int
9510main ()
9511{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 ;
9514 return 0;
9515}
9516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009517if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009519else
Matthias Kloseb9621712010-04-24 17:59:49 +00009520 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009522rm -f core conftest.err conftest.$ac_objext \
9523 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009524LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9527$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009528if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009529 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009530
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009531 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009532 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009533 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009534else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009535
Matthias Kloseb9621712010-04-24 17:59:49 +00009536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9537$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009538if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009539 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009540else
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009542LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009545
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009546/* Override any GCC internal prototype to avoid an error.
9547 Use char because int might match the return type of a GCC
9548 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009549#ifdef __cplusplus
9550extern "C"
9551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009552char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009553int
9554main ()
9555{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009556return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009557 ;
9558 return 0;
9559}
9560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009561if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009562 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009563else
Matthias Kloseb9621712010-04-24 17:59:49 +00009564 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009566rm -f core conftest.err conftest.$ac_objext \
9567 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009568LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9571$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009572if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009573 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009574
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009575 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009576 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009577 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009578else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009579
Martin v. Löwis130fb172001-07-19 11:00:41 +00009580 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009581fi
9582
Guido van Rossum627b2d71993-12-24 10:39:16 +00009583
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009584fi
9585
Guido van Rossum0be3e491997-05-22 20:33:33 +00009586fi
9587
Guido van Rossum49545951997-12-02 19:28:29 +00009588fi
9589
Guido van Rossumb93a8621998-05-07 13:27:32 +00009590fi
9591
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009593rm -f core conftest.err conftest.$ac_objext \
9594 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009595
Matthias Kloseb9621712010-04-24 17:59:49 +00009596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9597$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009598if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009599 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009600else
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009602LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606/* Override any GCC internal prototype to avoid an error.
9607 Use char because int might match the return type of a GCC
9608 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009609#ifdef __cplusplus
9610extern "C"
9611#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009612char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009613int
9614main ()
9615{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 ;
9618 return 0;
9619}
9620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009621if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009623else
Matthias Kloseb9621712010-04-24 17:59:49 +00009624 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009626rm -f core conftest.err conftest.$ac_objext \
9627 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009628LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9631$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009632if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009633 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009634
Martin v. Löwis130fb172001-07-19 11:00:41 +00009635 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009636 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009637 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009638fi
9639
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009640
Neal Norwitza978ab02002-11-02 16:58:05 +00009641 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9643$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009644if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009645 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009646else
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009648LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652/* Override any GCC internal prototype to avoid an error.
9653 Use char because int might match the return type of a GCC
9654 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009655#ifdef __cplusplus
9656extern "C"
9657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009658char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009659int
9660main ()
9661{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009662return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009663 ;
9664 return 0;
9665}
9666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009667if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009669else
Matthias Kloseb9621712010-04-24 17:59:49 +00009670 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009672rm -f core conftest.err conftest.$ac_objext \
9673 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009674LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9677$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009678if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009679 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009680
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009681 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009682 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009683 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009684fi
9685
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009686 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009687fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009688
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009689if test "$posix_threads" = "yes"; then
9690 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009691
Matthias Kloseb9621712010-04-24 17:59:49 +00009692$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009693
9694 fi
9695
9696 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9697 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009698 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009699$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009700
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009701 ;;
9702 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009703$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009704
9705 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009706 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009707$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009708
9709 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009710 esac
9711
Matthias Kloseb9621712010-04-24 17:59:49 +00009712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9713$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009714 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009715 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009716else
Matthias Kloseb9621712010-04-24 17:59:49 +00009717 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009718 ac_cv_pthread_system_supported=no
9719else
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009721/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009722
9723 #include <stdio.h>
9724 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009725 void *foo(void *parm) {
9726 return NULL;
9727 }
9728 main() {
9729 pthread_attr_t attr;
9730 pthread_t id;
9731 if (pthread_attr_init(&attr)) exit(-1);
9732 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9733 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9734 exit(0);
9735 }
9736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009737if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009738 ac_cv_pthread_system_supported=yes
9739else
Matthias Kloseb9621712010-04-24 17:59:49 +00009740 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9743 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009744fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009746
Guido van Rossum627b2d71993-12-24 10:39:16 +00009747fi
9748
Matthias Kloseb9621712010-04-24 17:59:49 +00009749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9750$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009751 if test "$ac_cv_pthread_system_supported" = "yes"; then
9752
Matthias Kloseb9621712010-04-24 17:59:49 +00009753$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009754
9755 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 for ac_func in pthread_sigmask
9757do :
9758 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009759if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009760 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009761#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009762_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009763 case $ac_sys_system in
9764 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009765
Matthias Kloseb9621712010-04-24 17:59:49 +00009766$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009767
9768 ;;
9769 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009770fi
9771done
9772
9773fi
9774
9775
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009776# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009777
Matthias Kloseb9621712010-04-24 17:59:49 +00009778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9779$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009780# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009781if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009783 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9785$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009786 ipv6=no
9787 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9789$as_echo "yes" >&6; }
9790 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009791
9792 ipv6=yes
9793 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009795else
Martin v. Löwis11437992002-04-12 09:54:03 +00009796
Matthias Kloseb9621712010-04-24 17:59:49 +00009797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009798/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009799 /* AF_INET6 available check */
9800#include <sys/types.h>
9801#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009802int
9803main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009804{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009805int domain = AF_INET6;
9806 ;
9807 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009808}
Martin v. Löwis11437992002-04-12 09:54:03 +00009809_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009810if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009811
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9813$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009814 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009815
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009816else
Matthias Kloseb159a552010-04-25 21:00:44 +00009817
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9819$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009820 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009821
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009822fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009824
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009825if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9827$as_echo_n "checking if RFC2553 API is available... " >&6; }
9828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009829/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009830
9831 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009832#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009833int
9834main ()
9835{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009836struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009837 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ;
9839 return 0;
9840}
Matthias Kloseb159a552010-04-25 21:00:44 +00009841
Martin v. Löwis11437992002-04-12 09:54:03 +00009842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009843if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009844
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009846$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009847 ipv6=yes
9848
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009849else
Matthias Kloseb159a552010-04-25 21:00:44 +00009850
9851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009852$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009853 ipv6=no
9854
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009857fi
9858
9859if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009860 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009861
9862fi
9863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864fi
9865
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009866
9867ipv6type=unknown
9868ipv6lib=none
9869ipv6trylibc=no
9870
9871if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9873$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009874 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9875 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009876 case $i in
9877 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009879/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009880
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009881#include <netinet/in.h>
9882#ifdef IPV6_INRIA_VERSION
9883yes
9884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009885_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009886if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009887 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009888 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009889fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009890rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009891
9892 ;;
9893 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009895/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009896
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009897#include <netinet/in.h>
9898#ifdef __KAME__
9899yes
9900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009901_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009902if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009904 ipv6type=$i;
9905 ipv6lib=inet6
9906 ipv6libdir=/usr/local/v6/lib
9907 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009908fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009909rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009910
9911 ;;
9912 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009914/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009915
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009916#include <features.h>
9917#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9918yes
9919#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009920_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009921if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009922 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009923 ipv6type=$i;
9924 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009925fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009926rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009927
9928 ;;
9929 linux-inet6)
9930 if test -d /usr/inet6; then
9931 ipv6type=$i
9932 ipv6lib=inet6
9933 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009934 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009935 fi
9936 ;;
9937 solaris)
9938 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009939 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009940 ipv6type=$i
9941 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009942 fi
9943 fi
9944 ;;
9945 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009947/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009948
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009949#include <sys/param.h>
9950#ifdef _TOSHIBA_INET6
9951yes
9952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009953_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009955 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009956 ipv6type=$i;
9957 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009958 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009959fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009960rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009961
9962 ;;
9963 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009965/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009966
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009967#include </usr/local/v6/include/sys/v6config.h>
9968#ifdef __V6D__
9969yes
9970#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009971_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009973 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009974 ipv6type=$i;
9975 ipv6lib=v6;
9976 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009977 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009978fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009979rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009980
9981 ;;
9982 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009984/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009985
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009986#include <sys/param.h>
9987#ifdef _ZETA_MINAMI_INET6
9988yes
9989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009990_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009991if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009992 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009993 ipv6type=$i;
9994 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009995 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009996fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009997rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009998
9999 ;;
10000 esac
10001 if test "$ipv6type" != "unknown"; then
10002 break
10003 fi
10004 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10006$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010007fi
10008
10009if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10010 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10011 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10012 echo "using lib$ipv6lib"
10013 else
10014 if test $ipv6trylibc = "yes"; then
10015 echo "using libc"
10016 else
10017 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10018 echo "You need to fetch lib$ipv6lib.a from appropriate"
10019 echo 'ipv6 kit and compile beforehand.'
10020 exit 1
10021 fi
10022 fi
10023fi
10024
Matthias Kloseb9621712010-04-24 17:59:49 +000010025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10026$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010028/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010029
10030 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010031int
10032main ()
10033{
10034FSIORefNum fRef = 0
10035 ;
10036 return 0;
10037}
Matthias Kloseb159a552010-04-25 21:00:44 +000010038
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010040if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010041
Matthias Kloseb159a552010-04-25 21:00:44 +000010042
Matthias Kloseb9621712010-04-24 17:59:49 +000010043$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010044
Matthias Kloseb9621712010-04-24 17:59:49 +000010045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10046$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010047
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010048else
Matthias Kloseb159a552010-04-25 21:00:44 +000010049
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10051$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010052
10053fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10055
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010056# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10058$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010060# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010061if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062 withval=$with_doc_strings;
10063fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010064
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010065
10066if test -z "$with_doc_strings"
10067then with_doc_strings="yes"
10068fi
10069if test "$with_doc_strings" != "no"
10070then
10071
Matthias Kloseb9621712010-04-24 17:59:49 +000010072$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010073
10074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10076$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010077
Antoine Pitrou042b1282010-08-13 21:15:58 +000010078# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10080$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010082# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010083if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010084 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010085if test "$withval" != no
10086then
10087
Matthias Kloseb9621712010-04-24 17:59:49 +000010088$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010089
Matthias Kloseb9621712010-04-24 17:59:49 +000010090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10091$as_echo "yes" >&6; }
10092else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10093$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010094fi
10095else
Matthias Kloseb9621712010-04-24 17:59:49 +000010096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10097$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098fi
10099
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010100
10101# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10103$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010105# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010106if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010107 withval=$with_pymalloc;
10108fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010109
Neil Schemenauera35c6882001-02-27 04:45:05 +000010110
Neil Schemenauer16c22972002-03-22 15:34:49 +000010111if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010112then
10113 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010114fi
10115if test "$with_pymalloc" != "no"
10116then
Martin v. Löwis11437992002-04-12 09:54:03 +000010117
Matthias Kloseb9621712010-04-24 17:59:49 +000010118$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010119
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010120 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10123$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010124
Benjamin Peterson05159c42009-12-03 03:01:27 +000010125# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10127$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010128
10129# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010130if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010131 withval=$with_valgrind;
10132else
10133 with_valgrind=no
10134fi
10135
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10137$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010138if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 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 +020010140if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010141
Matthias Kloseb9621712010-04-24 17:59:49 +000010142$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010143
10144else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010145 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010146
10147fi
10148
10149
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010150 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010151fi
10152
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010153# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010154
Guido van Rossum98935bf2001-09-05 19:13:16 +000010155DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010156
Guido van Rossume97ee181999-12-20 21:27:22 +000010157# the dlopen() function means we might want to use dynload_shlib.o. some
10158# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010159for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010160do :
10161 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010162if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010164#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010165_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010166
Guido van Rossume97ee181999-12-20 21:27:22 +000010167fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010168done
Guido van Rossume97ee181999-12-20 21:27:22 +000010169
Michael W. Hudson54241132001-12-07 15:38:26 +000010170
Guido van Rossume97ee181999-12-20 21:27:22 +000010171# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10172# loading of modules.
10173
Matthias Kloseb9621712010-04-24 17:59:49 +000010174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10175$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010176if test -z "$DYNLOADFILE"
10177then
10178 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010179 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10180 if test "$ac_cv_func_dlopen" = yes
10181 then DYNLOADFILE="dynload_shlib.o"
10182 else DYNLOADFILE="dynload_aix.o"
10183 fi
10184 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010185 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010186 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10187 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010188 *)
10189 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10190 # out any dynamic loading
10191 if test "$ac_cv_func_dlopen" = yes
10192 then DYNLOADFILE="dynload_shlib.o"
10193 else DYNLOADFILE="dynload_stub.o"
10194 fi
10195 ;;
10196 esac
10197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10199$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010200if test "$DYNLOADFILE" != "dynload_stub.o"
10201then
Martin v. Löwis11437992002-04-12 09:54:03 +000010202
Matthias Kloseb9621712010-04-24 17:59:49 +000010203$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010204
10205fi
10206
Neil Schemenauer4e425612001-06-19 15:44:15 +000010207# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10208
Michael W. Hudson54241132001-12-07 15:38:26 +000010209
Matthias Kloseb9621712010-04-24 17:59:49 +000010210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10211$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010212if test -z "$MACHDEP_OBJS"
10213then
Jack Jansene578a632001-08-15 01:27:14 +000010214 MACHDEP_OBJS=$extra_machdep_objs
10215else
10216 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010217fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010218if test -z "$MACHDEP_OBJS"; then
10219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10220$as_echo "none" >&6; }
10221else
10222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10223$as_echo "$MACHDEP_OBJS" >&6; }
10224fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010225
Guido van Rossum627b2d71993-12-24 10:39:16 +000010226# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010227for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010228 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010229 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010230 futimens futimes gai_strerror \
10231 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010232 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010233 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010234 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10235 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010236 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010237 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010238 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010239 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010240 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010241 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010242 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10243 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010244 sigaction sigaltstack siginterrupt sigpending sigrelse \
10245 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010246 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010247 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10248 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010249do :
10250 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10251ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010252if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010254#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010255_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010256
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010257fi
10258done
10259
Michael W. Hudson54241132001-12-07 15:38:26 +000010260
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010261ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10262 #include <dirent.h>
10263"
10264if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10265
10266$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10267
10268fi
10269
10270
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010271# For some functions, having a definition is not sufficient, since
10272# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10274$as_echo_n "checking for chroot... " >&6; }
10275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010276/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010277#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010278int
10279main ()
10280{
10281void *x=chroot
10282 ;
10283 return 0;
10284}
10285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010286if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010287
Matthias Kloseb9621712010-04-24 17:59:49 +000010288$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010289
Matthias Kloseb159a552010-04-25 21:00:44 +000010290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010291$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010292else
Matthias Kloseb9621712010-04-24 17:59:49 +000010293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10294$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010295
10296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10299$as_echo_n "checking for link... " >&6; }
10300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010301/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010302#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010303int
10304main ()
10305{
10306void *x=link
10307 ;
10308 return 0;
10309}
10310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010311if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010312
Matthias Kloseb9621712010-04-24 17:59:49 +000010313$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010314
Matthias Kloseb159a552010-04-25 21:00:44 +000010315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010316$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010317else
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10319$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010320
10321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10324$as_echo_n "checking for symlink... " >&6; }
10325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010326/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010327#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010328int
10329main ()
10330{
10331void *x=symlink
10332 ;
10333 return 0;
10334}
10335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010336if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010337
Matthias Kloseb9621712010-04-24 17:59:49 +000010338$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010339
Matthias Kloseb159a552010-04-25 21:00:44 +000010340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010341$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010342else
Matthias Kloseb9621712010-04-24 17:59:49 +000010343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10344$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010345
10346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10349$as_echo_n "checking for fchdir... " >&6; }
10350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010351/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010352#include <unistd.h>
10353int
10354main ()
10355{
10356void *x=fchdir
10357 ;
10358 return 0;
10359}
10360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010361if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010362
Matthias Kloseb9621712010-04-24 17:59:49 +000010363$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010364
Matthias Kloseb159a552010-04-25 21:00:44 +000010365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010366$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010367else
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10369$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010370
10371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10374$as_echo_n "checking for fsync... " >&6; }
10375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010376/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010377#include <unistd.h>
10378int
10379main ()
10380{
10381void *x=fsync
10382 ;
10383 return 0;
10384}
10385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010386if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010387
Matthias Kloseb9621712010-04-24 17:59:49 +000010388$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010389
Matthias Kloseb159a552010-04-25 21:00:44 +000010390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010391$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010392else
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010395
10396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10399$as_echo_n "checking for fdatasync... " >&6; }
10400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010401/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010402#include <unistd.h>
10403int
10404main ()
10405{
10406void *x=fdatasync
10407 ;
10408 return 0;
10409}
10410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010412
Matthias Kloseb9621712010-04-24 17:59:49 +000010413$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010414
Matthias Kloseb159a552010-04-25 21:00:44 +000010415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010416$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010417else
Matthias Kloseb9621712010-04-24 17:59:49 +000010418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10419$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010420
10421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10424$as_echo_n "checking for epoll... " >&6; }
10425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010426/* end confdefs.h. */
10427#include <sys/epoll.h>
10428int
10429main ()
10430{
10431void *x=epoll_create
10432 ;
10433 return 0;
10434}
10435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010436if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010437
Matthias Kloseb9621712010-04-24 17:59:49 +000010438$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010439
Matthias Kloseb159a552010-04-25 21:00:44 +000010440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010441$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010442else
Matthias Kloseb9621712010-04-24 17:59:49 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010445
10446fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10449$as_echo_n "checking for epoll_create1... " >&6; }
10450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10451/* end confdefs.h. */
10452#include <sys/epoll.h>
10453int
10454main ()
10455{
10456void *x=epoll_create1
10457 ;
10458 return 0;
10459}
10460_ACEOF
10461if ac_fn_c_try_compile "$LINENO"; then :
10462
10463$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10464
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10466$as_echo "yes" >&6; }
10467else
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10469$as_echo "no" >&6; }
10470
10471fi
10472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10474$as_echo_n "checking for kqueue... " >&6; }
10475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010476/* end confdefs.h. */
10477
10478#include <sys/types.h>
10479#include <sys/event.h>
10480
10481int
10482main ()
10483{
10484int x=kqueue()
10485 ;
10486 return 0;
10487}
10488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010489if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010490
Matthias Kloseb9621712010-04-24 17:59:49 +000010491$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010492
Matthias Kloseb159a552010-04-25 21:00:44 +000010493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010494$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010495else
Matthias Kloseb9621712010-04-24 17:59:49 +000010496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10497$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010498
10499fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010501# On some systems (eg. FreeBSD 5), we would find a definition of the
10502# functions ctermid_r, setgroups in the library, but no prototype
10503# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10504# address to avoid compiler warnings and potential miscompilations
10505# because of the missing prototypes.
10506
Matthias Kloseb9621712010-04-24 17:59:49 +000010507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10508$as_echo_n "checking for ctermid_r... " >&6; }
10509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010510/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010511
Martin v. Löwisd5843682002-11-21 20:41:28 +000010512#include <stdio.h>
10513
Martin v. Löwisd5843682002-11-21 20:41:28 +000010514int
10515main ()
10516{
10517void* p = ctermid_r
10518 ;
10519 return 0;
10520}
10521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010522if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010523
Matthias Kloseb9621712010-04-24 17:59:49 +000010524$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010525
Matthias Kloseb159a552010-04-25 21:00:44 +000010526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010527$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010528else
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10530$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010531
10532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10534
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10536$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010537if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010538 $as_echo_n "(cached) " >&6
10539else
10540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010541/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010542#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010543int
10544main ()
10545{
10546void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010547
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010548 ;
10549 return 0;
10550}
10551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010552if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010553 ac_cv_flock_decl=yes
10554else
10555 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010556
10557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010559
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010560fi
10561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10562$as_echo "$ac_cv_flock_decl" >&6; }
10563if test "x${ac_cv_flock_decl}" = xyes; then
10564 for ac_func in flock
10565do :
10566 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010567if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010568 cat >>confdefs.h <<_ACEOF
10569#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010570_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010571
Antoine Pitroua3000072010-09-07 14:52:42 +000010572else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010574$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010575if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010576 $as_echo_n "(cached) " >&6
10577else
10578 ac_check_lib_save_LIBS=$LIBS
10579LIBS="-lbsd $LIBS"
10580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10581/* end confdefs.h. */
10582
10583/* Override any GCC internal prototype to avoid an error.
10584 Use char because int might match the return type of a GCC
10585 builtin and then its argument prototype would still apply. */
10586#ifdef __cplusplus
10587extern "C"
10588#endif
10589char flock ();
10590int
10591main ()
10592{
10593return flock ();
10594 ;
10595 return 0;
10596}
10597_ACEOF
10598if ac_fn_c_try_link "$LINENO"; then :
10599 ac_cv_lib_bsd_flock=yes
10600else
10601 ac_cv_lib_bsd_flock=no
10602fi
10603rm -f core conftest.err conftest.$ac_objext \
10604 conftest$ac_exeext conftest.$ac_ext
10605LIBS=$ac_check_lib_save_LIBS
10606fi
10607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10608$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010609if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010610 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010611
10612
10613$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10614
10615
10616fi
10617
10618
10619fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010620done
10621
Antoine Pitroua3000072010-09-07 14:52:42 +000010622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623
Matthias Kloseb9621712010-04-24 17:59:49 +000010624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10625$as_echo_n "checking for getpagesize... " >&6; }
10626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010627/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010628
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010629#include <unistd.h>
10630
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010631int
10632main ()
10633{
10634void* p = getpagesize
10635 ;
10636 return 0;
10637}
10638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010639if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010640
Matthias Kloseb9621712010-04-24 17:59:49 +000010641$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010642
Matthias Kloseb159a552010-04-25 21:00:44 +000010643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010644$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010645else
Matthias Kloseb9621712010-04-24 17:59:49 +000010646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10647$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010648
10649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010651
Victor Stinner984890f2011-11-24 13:53:38 +010010652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10653$as_echo_n "checking for broken unsetenv... " >&6; }
10654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10655/* end confdefs.h. */
10656
10657#include <stdlib.h>
10658
10659int
10660main ()
10661{
10662int res = unsetenv("DUMMY")
10663 ;
10664 return 0;
10665}
10666_ACEOF
10667if ac_fn_c_try_compile "$LINENO"; then :
10668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10669$as_echo "no" >&6; }
10670else
10671
10672$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10673
10674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10675$as_echo "yes" >&6; }
10676
10677fi
10678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10679
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010680for ac_prog in true
10681do
10682 # Extract the first word of "$ac_prog", so it can be a program name with args.
10683set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10685$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010686if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010688else
10689 if test -n "$TRUE"; then
10690 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10691else
10692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10693for as_dir in $PATH
10694do
10695 IFS=$as_save_IFS
10696 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010699 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 $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 +000010701 break 2
10702 fi
10703done
Matthias Kloseb9621712010-04-24 17:59:49 +000010704 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010706
10707fi
10708fi
10709TRUE=$ac_cv_prog_TRUE
10710if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10712$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010713else
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10715$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010716fi
10717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010719 test -n "$TRUE" && break
10720done
10721test -n "$TRUE" || TRUE="/bin/true"
10722
10723
Matthias Kloseb9621712010-04-24 17:59:49 +000010724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10725$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010726if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010728else
10729 ac_check_lib_save_LIBS=$LIBS
10730LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734/* Override any GCC internal prototype to avoid an error.
10735 Use char because int might match the return type of a GCC
10736 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010737#ifdef __cplusplus
10738extern "C"
10739#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010740char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010741int
10742main ()
10743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010744return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010745 ;
10746 return 0;
10747}
10748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010750 ac_cv_lib_c_inet_aton=yes
10751else
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010754rm -f core conftest.err conftest.$ac_objext \
10755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010756LIBS=$ac_check_lib_save_LIBS
10757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10759$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010760if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010761 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010762else
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10764$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010765if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010767else
10768 ac_check_lib_save_LIBS=$LIBS
10769LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010771/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010773/* Override any GCC internal prototype to avoid an error.
10774 Use char because int might match the return type of a GCC
10775 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010776#ifdef __cplusplus
10777extern "C"
10778#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010779char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010780int
10781main ()
10782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010783return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010784 ;
10785 return 0;
10786}
10787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010788if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010789 ac_cv_lib_resolv_inet_aton=yes
10790else
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010793rm -f core conftest.err conftest.$ac_objext \
10794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010795LIBS=$ac_check_lib_save_LIBS
10796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10798$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010799if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010800 cat >>confdefs.h <<_ACEOF
10801#define HAVE_LIBRESOLV 1
10802_ACEOF
10803
10804 LIBS="-lresolv $LIBS"
10805
10806fi
10807
10808
10809fi
10810
10811
Christian Heimesd0764e22007-12-04 15:00:33 +000010812# On Tru64, chflags seems to be present, but calling it will
10813# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10815$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010816if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010818else
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010820 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010821else
Matthias Kloseb9621712010-04-24 17:59:49 +000010822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010823/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010824
Christian Heimesd0764e22007-12-04 15:00:33 +000010825#include <sys/stat.h>
10826#include <unistd.h>
10827int main(int argc, char*argv[])
10828{
10829 if(chflags(argv[0], 0) != 0)
10830 return 1;
10831 return 0;
10832}
Ned Deily3eb67d52011-06-28 00:00:28 -070010833
Christian Heimesd0764e22007-12-04 15:00:33 +000010834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010835if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010836 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010837else
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10841 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010842fi
10843
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010844
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10847$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010848if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010850if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010851 ac_cv_have_chflags="yes"
10852else
10853 ac_cv_have_chflags="no"
10854fi
10855
10856fi
10857if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010858
Matthias Kloseb9621712010-04-24 17:59:49 +000010859$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010860
10861fi
10862
Matthias Kloseb9621712010-04-24 17:59:49 +000010863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10864$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010865if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010867else
Matthias Kloseb9621712010-04-24 17:59:49 +000010868 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010869 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010870else
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010872/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010873
Christian Heimesd0764e22007-12-04 15:00:33 +000010874#include <sys/stat.h>
10875#include <unistd.h>
10876int main(int argc, char*argv[])
10877{
10878 if(lchflags(argv[0], 0) != 0)
10879 return 1;
10880 return 0;
10881}
Ned Deily3eb67d52011-06-28 00:00:28 -070010882
Christian Heimesd0764e22007-12-04 15:00:33 +000010883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010884if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010885 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010886else
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10890 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010891fi
10892
10893
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10896$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010897if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010899if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010900 ac_cv_have_lchflags="yes"
10901else
10902 ac_cv_have_lchflags="no"
10903fi
10904
10905fi
10906if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010909
10910fi
10911
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010912case $ac_sys_system/$ac_sys_release in
10913Darwin/*)
10914 _CUR_CFLAGS="${CFLAGS}"
10915 _CUR_LDFLAGS="${LDFLAGS}"
10916 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10917 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10918 ;;
10919esac
10920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10922$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010923if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010925else
10926 ac_check_lib_save_LIBS=$LIBS
10927LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010929/* end confdefs.h. */
10930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010931/* Override any GCC internal prototype to avoid an error.
10932 Use char because int might match the return type of a GCC
10933 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010934#ifdef __cplusplus
10935extern "C"
10936#endif
10937char inflateCopy ();
10938int
10939main ()
10940{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010941return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010942 ;
10943 return 0;
10944}
10945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010946if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010947 ac_cv_lib_z_inflateCopy=yes
10948else
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010951rm -f core conftest.err conftest.$ac_objext \
10952 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010953LIBS=$ac_check_lib_save_LIBS
10954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10956$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010957if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010958
Matthias Kloseb9621712010-04-24 17:59:49 +000010959$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010960
10961fi
10962
10963
10964case $ac_sys_system/$ac_sys_release in
10965Darwin/*)
10966 CFLAGS="${_CUR_CFLAGS}"
10967 LDFLAGS="${_CUR_LDFLAGS}"
10968 ;;
10969esac
10970
Matthias Kloseb9621712010-04-24 17:59:49 +000010971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10972$as_echo_n "checking for hstrerror... " >&6; }
10973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010974/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010975
Martin v. Löwise9416172003-05-03 10:12:45 +000010976#include <netdb.h>
10977
Martin v. Löwise9416172003-05-03 10:12:45 +000010978int
10979main ()
10980{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010981void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010982 ;
10983 return 0;
10984}
10985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010986if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010989
Matthias Kloseb159a552010-04-25 21:00:44 +000010990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010991$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010992else
Matthias Kloseb9621712010-04-24 17:59:49 +000010993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10994$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010995
10996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010997rm -f core conftest.err conftest.$ac_objext \
10998 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999
Matthias Kloseb9621712010-04-24 17:59:49 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11001$as_echo_n "checking for inet_aton... " >&6; }
11002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011003/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011004
Martin v. Löwis86d66262006-02-17 08:40:11 +000011005#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011006#include <sys/socket.h>
11007#include <netinet/in.h>
11008#include <arpa/inet.h>
11009
Martin v. Löwise9416172003-05-03 10:12:45 +000011010int
11011main ()
11012{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011013void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011014 ;
11015 return 0;
11016}
11017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011018if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011019
Matthias Kloseb9621712010-04-24 17:59:49 +000011020$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011021
Matthias Kloseb159a552010-04-25 21:00:44 +000011022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011023$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011024else
Matthias Kloseb9621712010-04-24 17:59:49 +000011025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11026$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011027
11028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011029rm -f core conftest.err conftest.$ac_objext \
11030 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011031
Matthias Kloseb9621712010-04-24 17:59:49 +000011032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11033$as_echo_n "checking for inet_pton... " >&6; }
11034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011035/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011036
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011037#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011038#include <sys/socket.h>
11039#include <netinet/in.h>
11040#include <arpa/inet.h>
11041
Martin v. Löwise9416172003-05-03 10:12:45 +000011042int
11043main ()
11044{
11045void* p = inet_pton
11046 ;
11047 return 0;
11048}
11049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011050if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011051
Matthias Kloseb9621712010-04-24 17:59:49 +000011052$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011053
Matthias Kloseb159a552010-04-25 21:00:44 +000011054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011055$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011056else
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11058$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011059
11060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011062
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011063# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11065$as_echo_n "checking for setgroups... " >&6; }
11066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011067/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011068
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011069#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011070#ifdef HAVE_GRP_H
11071#include <grp.h>
11072#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011073
Martin v. Löwisd5843682002-11-21 20:41:28 +000011074int
11075main ()
11076{
11077void* p = setgroups
11078 ;
11079 return 0;
11080}
11081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011082if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011083
Matthias Kloseb9621712010-04-24 17:59:49 +000011084$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011085
Matthias Kloseb159a552010-04-25 21:00:44 +000011086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011087$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011088else
Matthias Kloseb9621712010-04-24 17:59:49 +000011089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11090$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011091
11092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011094
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011095# check for openpty and forkpty
11096
11097for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011098do :
11099 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011100if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011101 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011102#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011103_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011104
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011105else
Matthias Kloseb9621712010-04-24 17:59:49 +000011106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11107$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011108if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011110else
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011112LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011116/* Override any GCC internal prototype to avoid an error.
11117 Use char because int might match the return type of a GCC
11118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011119#ifdef __cplusplus
11120extern "C"
11121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011122char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011123int
11124main ()
11125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 ;
11128 return 0;
11129}
11130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011131if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011132 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011133else
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011136rm -f core conftest.err conftest.$ac_objext \
11137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011138LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11141$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011142if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011143 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011144 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011145else
Matthias Kloseb9621712010-04-24 17:59:49 +000011146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11147$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011148if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011149 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011150else
11151 ac_check_lib_save_LIBS=$LIBS
11152LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011154/* end confdefs.h. */
11155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011156/* Override any GCC internal prototype to avoid an error.
11157 Use char because int might match the return type of a GCC
11158 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011159#ifdef __cplusplus
11160extern "C"
11161#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011162char openpty ();
11163int
11164main ()
11165{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011166return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011167 ;
11168 return 0;
11169}
11170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011171if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011172 ac_cv_lib_bsd_openpty=yes
11173else
Matthias Kloseb9621712010-04-24 17:59:49 +000011174 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011176rm -f core conftest.err conftest.$ac_objext \
11177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011178LIBS=$ac_check_lib_save_LIBS
11179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11181$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011182if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011183 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011184 LIBS="$LIBS -lbsd"
11185fi
11186
11187
11188fi
11189
Fred Drake8cef4cf2000-06-28 16:40:38 +000011190
11191fi
11192done
11193
11194for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011195do :
11196 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011197if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011198 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011199#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011200_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011201
Fred Drake8cef4cf2000-06-28 16:40:38 +000011202else
Matthias Kloseb9621712010-04-24 17:59:49 +000011203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11204$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011205if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011206 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011207else
Martin v. Löwis11437992002-04-12 09:54:03 +000011208 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011209LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011213/* Override any GCC internal prototype to avoid an error.
11214 Use char because int might match the return type of a GCC
11215 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011216#ifdef __cplusplus
11217extern "C"
11218#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011219char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011220int
11221main ()
11222{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011223return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011224 ;
11225 return 0;
11226}
11227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011228if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011229 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011230else
Matthias Kloseb9621712010-04-24 17:59:49 +000011231 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011233rm -f core conftest.err conftest.$ac_objext \
11234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011235LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11238$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011239if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011240 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011241 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011242else
Matthias Kloseb9621712010-04-24 17:59:49 +000011243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11244$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011245if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011246 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011247else
11248 ac_check_lib_save_LIBS=$LIBS
11249LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011251/* end confdefs.h. */
11252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011253/* Override any GCC internal prototype to avoid an error.
11254 Use char because int might match the return type of a GCC
11255 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011256#ifdef __cplusplus
11257extern "C"
11258#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011259char forkpty ();
11260int
11261main ()
11262{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011264 ;
11265 return 0;
11266}
11267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011268if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011269 ac_cv_lib_bsd_forkpty=yes
11270else
Matthias Kloseb9621712010-04-24 17:59:49 +000011271 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011273rm -f core conftest.err conftest.$ac_objext \
11274 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011275LIBS=$ac_check_lib_save_LIBS
11276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11278$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011279if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011280 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011281 LIBS="$LIBS -lbsd"
11282fi
11283
11284
11285fi
11286
Fred Drake8cef4cf2000-06-28 16:40:38 +000011287
11288fi
11289done
11290
Jack Jansendd19cf82001-12-06 22:36:17 +000011291
Christian Heimesb186d002008-03-18 15:15:01 +000011292# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011293for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011294do :
11295 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011296if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011297 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011298#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011299_ACEOF
11300
11301fi
11302done
11303
11304
Michael W. Hudson54241132001-12-07 15:38:26 +000011305# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011306for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011307do :
11308 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11309ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011310if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011312#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011313_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011314
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011315fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011316done
11317
Michael W. Hudson54241132001-12-07 15:38:26 +000011318
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011319ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011320if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011321 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011322
Martin v. Löwis1142de32002-03-29 16:28:31 +000011323else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011324 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011325 *" dup2.$ac_objext "* ) ;;
11326 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011327 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011328esac
11329
Martin v. Löwis1142de32002-03-29 16:28:31 +000011330fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011331
11332ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011333if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011334 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11335
11336else
11337 case " $LIBOBJS " in
11338 *" getcwd.$ac_objext "* ) ;;
11339 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11340 ;;
11341esac
11342
11343fi
11344
11345ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011346if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011347 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11348
11349else
11350 case " $LIBOBJS " in
11351 *" strdup.$ac_objext "* ) ;;
11352 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11353 ;;
11354esac
11355
11356fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011357
11358
11359for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011360do :
11361 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011362if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011363 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011364#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011367/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011368#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011369int
11370main ()
11371{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011372getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 ;
11374 return 0;
11375}
11376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011378
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011380
Guido van Rossum627b2d71993-12-24 10:39:16 +000011381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011383
Guido van Rossum627b2d71993-12-24 10:39:16 +000011384fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011385done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011386
Jack Jansen150753c2003-03-29 22:07:47 +000011387for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011388do :
11389 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011390if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011391 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011392#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011395/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011396#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011397int
11398main ()
11399{
11400setpgrp(0,0);
11401 ;
11402 return 0;
11403}
11404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011405if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011406
Matthias Kloseb9621712010-04-24 17:59:49 +000011407$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011408
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011411
11412fi
11413done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011414
Thomas Wouters3a584202000-08-05 23:28:51 +000011415for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011416do :
11417 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011418if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011419 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011420#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011423/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011424#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011425int
11426main ()
11427{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011428gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011429 ;
11430 return 0;
11431}
11432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011433if ac_fn_c_try_compile "$LINENO"; then :
11434
Guido van Rossum627b2d71993-12-24 10:39:16 +000011435else
Skip Montanaro6dead952003-09-25 14:50:04 +000011436
Matthias Kloseb9621712010-04-24 17:59:49 +000011437$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011438
Martin v. Löwis11437992002-04-12 09:54:03 +000011439
Guido van Rossum627b2d71993-12-24 10:39:16 +000011440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011442
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011443fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011444done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011445
Michael W. Hudson54241132001-12-07 15:38:26 +000011446
Victor Stinnere0be4232011-10-25 13:06:09 +020011447for ac_func in clock_gettime
11448do :
11449 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11450if test "x$ac_cv_func_clock_gettime" = xyes; then :
11451 cat >>confdefs.h <<_ACEOF
11452#define HAVE_CLOCK_GETTIME 1
11453_ACEOF
11454
11455else
11456
11457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11458$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11459if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11460 $as_echo_n "(cached) " >&6
11461else
11462 ac_check_lib_save_LIBS=$LIBS
11463LIBS="-lrt $LIBS"
11464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11465/* end confdefs.h. */
11466
11467/* Override any GCC internal prototype to avoid an error.
11468 Use char because int might match the return type of a GCC
11469 builtin and then its argument prototype would still apply. */
11470#ifdef __cplusplus
11471extern "C"
11472#endif
11473char clock_gettime ();
11474int
11475main ()
11476{
11477return clock_gettime ();
11478 ;
11479 return 0;
11480}
11481_ACEOF
11482if ac_fn_c_try_link "$LINENO"; then :
11483 ac_cv_lib_rt_clock_gettime=yes
11484else
11485 ac_cv_lib_rt_clock_gettime=no
11486fi
11487rm -f core conftest.err conftest.$ac_objext \
11488 conftest$ac_exeext conftest.$ac_ext
11489LIBS=$ac_check_lib_save_LIBS
11490fi
11491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11492$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11493if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11494
11495 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11496
11497
11498$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11499
11500
11501fi
11502
11503
11504fi
11505done
11506
11507
11508for ac_func in clock_getres
11509do :
11510 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11511if test "x$ac_cv_func_clock_getres" = xyes; then :
11512 cat >>confdefs.h <<_ACEOF
11513#define HAVE_CLOCK_GETRES 1
11514_ACEOF
11515
11516else
11517
11518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11519$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11520if ${ac_cv_lib_rt_clock_getres+:} false; then :
11521 $as_echo_n "(cached) " >&6
11522else
11523 ac_check_lib_save_LIBS=$LIBS
11524LIBS="-lrt $LIBS"
11525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11526/* end confdefs.h. */
11527
11528/* Override any GCC internal prototype to avoid an error.
11529 Use char because int might match the return type of a GCC
11530 builtin and then its argument prototype would still apply. */
11531#ifdef __cplusplus
11532extern "C"
11533#endif
11534char clock_getres ();
11535int
11536main ()
11537{
11538return clock_getres ();
11539 ;
11540 return 0;
11541}
11542_ACEOF
11543if ac_fn_c_try_link "$LINENO"; then :
11544 ac_cv_lib_rt_clock_getres=yes
11545else
11546 ac_cv_lib_rt_clock_getres=no
11547fi
11548rm -f core conftest.err conftest.$ac_objext \
11549 conftest$ac_exeext conftest.$ac_ext
11550LIBS=$ac_check_lib_save_LIBS
11551fi
11552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11553$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11554if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11555
11556 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11557
11558
11559fi
11560
11561
11562fi
11563done
11564
11565
Matthias Kloseb9621712010-04-24 17:59:49 +000011566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11567$as_echo_n "checking for major... " >&6; }
11568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011569/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011570
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011571#if defined(MAJOR_IN_MKDEV)
11572#include <sys/mkdev.h>
11573#elif defined(MAJOR_IN_SYSMACROS)
11574#include <sys/sysmacros.h>
11575#else
11576#include <sys/types.h>
11577#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011578
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011579int
11580main ()
11581{
11582
11583 makedev(major(0),minor(0));
11584
11585 ;
11586 return 0;
11587}
11588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011589if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011590
11591
Matthias Kloseb9621712010-04-24 17:59:49 +000011592$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11595$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011596
11597else
Skip Montanaro6dead952003-09-25 14:50:04 +000011598
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11600$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011601
11602fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011603rm -f core conftest.err conftest.$ac_objext \
11604 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011605
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011606# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011607# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11609$as_echo_n "checking for getaddrinfo... " >&6; }
11610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011611/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011612
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011613#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011614#include <sys/socket.h>
11615#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011616#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011617
Martin v. Löwis11437992002-04-12 09:54:03 +000011618int
11619main ()
11620{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011621getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011622 ;
11623 return 0;
11624}
11625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011626if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011627 have_getaddrinfo=yes
11628else
Matthias Kloseb9621712010-04-24 17:59:49 +000011629 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011631rm -f core conftest.err conftest.$ac_objext \
11632 conftest$ac_exeext conftest.$ac_ext
11633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11634$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011635if test $have_getaddrinfo = yes
11636then
Matthias Kloseb9621712010-04-24 17:59:49 +000011637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11638$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011639 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011640 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011641else
Matthias Kloseb9621712010-04-24 17:59:49 +000011642 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011643
11644if test "${enable_ipv6+set}" = set; then
11645 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11646else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011647 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011648fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011649else
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011651/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011652
Stefan Krah19c21392012-11-22 23:47:32 +010011653#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011654#include <sys/types.h>
11655#include <netdb.h>
11656#include <string.h>
11657#include <sys/socket.h>
11658#include <netinet/in.h>
11659
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011660int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011661{
11662 int passive, gaierr, inet4 = 0, inet6 = 0;
11663 struct addrinfo hints, *ai, *aitop;
11664 char straddr[INET6_ADDRSTRLEN], strport[16];
11665
11666 for (passive = 0; passive <= 1; passive++) {
11667 memset(&hints, 0, sizeof(hints));
11668 hints.ai_family = AF_UNSPEC;
11669 hints.ai_flags = passive ? AI_PASSIVE : 0;
11670 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011671 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011672 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11673 (void)gai_strerror(gaierr);
11674 goto bad;
11675 }
11676 for (ai = aitop; ai; ai = ai->ai_next) {
11677 if (ai->ai_addr == NULL ||
11678 ai->ai_addrlen == 0 ||
11679 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11680 straddr, sizeof(straddr), strport, sizeof(strport),
11681 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11682 goto bad;
11683 }
11684 switch (ai->ai_family) {
11685 case AF_INET:
11686 if (strcmp(strport, "54321") != 0) {
11687 goto bad;
11688 }
11689 if (passive) {
11690 if (strcmp(straddr, "0.0.0.0") != 0) {
11691 goto bad;
11692 }
11693 } else {
11694 if (strcmp(straddr, "127.0.0.1") != 0) {
11695 goto bad;
11696 }
11697 }
11698 inet4++;
11699 break;
11700 case AF_INET6:
11701 if (strcmp(strport, "54321") != 0) {
11702 goto bad;
11703 }
11704 if (passive) {
11705 if (strcmp(straddr, "::") != 0) {
11706 goto bad;
11707 }
11708 } else {
11709 if (strcmp(straddr, "::1") != 0) {
11710 goto bad;
11711 }
11712 }
11713 inet6++;
11714 break;
11715 case AF_UNSPEC:
11716 goto bad;
11717 break;
11718 default:
11719 /* another family support? */
11720 break;
11721 }
11722 }
11723 }
11724
11725 if (!(inet4 == 0 || inet4 == 2))
11726 goto bad;
11727 if (!(inet6 == 0 || inet6 == 2))
11728 goto bad;
11729
11730 if (aitop)
11731 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011732 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011733
11734 bad:
11735 if (aitop)
11736 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011737 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011738}
11739
Martin v. Löwis11437992002-04-12 09:54:03 +000011740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011741if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011742 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011743else
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11747 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011749
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011750fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011751
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011753
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11755$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11756
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011757if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011758then
11759 if test $ipv6 = yes
11760 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011761 echo 'Fatal: You must get working getaddrinfo() function.'
11762 echo ' or you can specify "--disable-ipv6"'.
11763 exit 1
11764 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011765else
Martin v. Löwis11437992002-04-12 09:54:03 +000011766
Matthias Kloseb9621712010-04-24 17:59:49 +000011767$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011768
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011769fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011770
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011771for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011772do :
11773 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011774if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011775 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011776#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011777_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011778
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011779fi
11780done
11781
Michael W. Hudson54241132001-12-07 15:38:26 +000011782
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011783# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11785$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011786if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011790/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011791#include <sys/types.h>
11792#include <sys/time.h>
11793#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011794
Martin v. Löwis11437992002-04-12 09:54:03 +000011795int
11796main ()
11797{
11798if ((struct tm *) 0)
11799return 0;
11800 ;
11801 return 0;
11802}
11803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011804if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011805 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011806else
Matthias Kloseb9621712010-04-24 17:59:49 +000011807 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11812$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011813if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011814
Matthias Kloseb9621712010-04-24 17:59:49 +000011815$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011816
11817fi
11818
Matthias Kloseb9621712010-04-24 17:59:49 +000011819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11820$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011821if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011822 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011823else
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011825/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011826#include <sys/types.h>
11827#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011828
Martin v. Löwis11437992002-04-12 09:54:03 +000011829int
11830main ()
11831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011832struct tm tm;
11833 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011835 ;
11836 return 0;
11837}
11838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011839if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011840 ac_cv_struct_tm=time.h
11841else
Matthias Kloseb9621712010-04-24 17:59:49 +000011842 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11847$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011848if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011851
11852fi
11853
Matthias Kloseb9621712010-04-24 17:59:49 +000011854ac_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 +000011855#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011856
Matthias Kloseb9621712010-04-24 17:59:49 +000011857"
Victor Stinnere0be4232011-10-25 13:06:09 +020011858if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011859
11860cat >>confdefs.h <<_ACEOF
11861#define HAVE_STRUCT_TM_TM_ZONE 1
11862_ACEOF
11863
11864
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011865fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011866
Martin v. Löwis11437992002-04-12 09:54:03 +000011867if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11868
Matthias Kloseb9621712010-04-24 17:59:49 +000011869$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011870
11871else
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11873"
Victor Stinnere0be4232011-10-25 13:06:09 +020011874if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011876else
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011878fi
11879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011880cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011881#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011882_ACEOF
11883
Matthias Kloseb9621712010-04-24 17:59:49 +000011884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11885$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011886if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011890/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011891#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011892#if !HAVE_DECL_TZNAME
11893extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011895
Martin v. Löwis11437992002-04-12 09:54:03 +000011896int
11897main ()
11898{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011899return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011900 ;
11901 return 0;
11902}
11903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011904if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011905 ac_cv_var_tzname=yes
11906else
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011909rm -f core conftest.err conftest.$ac_objext \
11910 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11913$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011914 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011915
Matthias Kloseb9621712010-04-24 17:59:49 +000011916$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011917
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011918 fi
11919fi
11920
Matthias Kloseb9621712010-04-24 17:59:49 +000011921ac_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 +020011922if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011923
11924cat >>confdefs.h <<_ACEOF
11925#define HAVE_STRUCT_STAT_ST_RDEV 1
11926_ACEOF
11927
11928
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011929fi
11930
Matthias Kloseb9621712010-04-24 17:59:49 +000011931ac_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 +020011932if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011933
Martin v. Löwis11437992002-04-12 09:54:03 +000011934cat >>confdefs.h <<_ACEOF
11935#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11936_ACEOF
11937
11938
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011939fi
11940
Matthias Kloseb9621712010-04-24 17:59:49 +000011941ac_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 +020011942if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011943
11944cat >>confdefs.h <<_ACEOF
11945#define HAVE_STRUCT_STAT_ST_FLAGS 1
11946_ACEOF
11947
11948
11949fi
11950
Matthias Kloseb9621712010-04-24 17:59:49 +000011951ac_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 +020011952if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011953
11954cat >>confdefs.h <<_ACEOF
11955#define HAVE_STRUCT_STAT_ST_GEN 1
11956_ACEOF
11957
11958
11959fi
11960
Matthias Kloseb9621712010-04-24 17:59:49 +000011961ac_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 +020011962if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011963
11964cat >>confdefs.h <<_ACEOF
11965#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11966_ACEOF
11967
11968
11969fi
11970
Matthias Kloseb9621712010-04-24 17:59:49 +000011971ac_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 +020011972if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011973
Martin v. Löwis11437992002-04-12 09:54:03 +000011974cat >>confdefs.h <<_ACEOF
11975#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11976_ACEOF
11977
11978
Matthias Kloseb9621712010-04-24 17:59:49 +000011979$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011980
11981else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011982 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011983 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011984 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11985 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011986esac
11987
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011988fi
11989
Michael W. Hudson54241132001-12-07 15:38:26 +000011990
Martin v. Löwis11437992002-04-12 09:54:03 +000011991
Matthias Kloseb9621712010-04-24 17:59:49 +000011992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11993$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011994if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011995 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011996else
Matthias Kloseb159a552010-04-25 21:00:44 +000011997
Matthias Kloseb9621712010-04-24 17:59:49 +000011998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011999/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012000#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012001int
12002main ()
12003{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012004return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 ;
12006 return 0;
12007}
12008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012009if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012010 ac_cv_header_time_altzone=yes
12011else
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012016fi
12017
Matthias Kloseb9621712010-04-24 17:59:49 +000012018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12019$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012020if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012021
Matthias Kloseb9621712010-04-24 17:59:49 +000012022$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012023
12024fi
12025
Guido van Rossumda88dad1995-01-26 00:46:29 +000012026was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12028$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012030/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012031
12032#include <sys/types.h>
12033#include <sys/select.h>
12034#include <sys/time.h>
12035
Martin v. Löwis11437992002-04-12 09:54:03 +000012036int
12037main ()
12038{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012039;
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 ;
12041 return 0;
12042}
12043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012045
12046
Matthias Kloseb9621712010-04-24 17:59:49 +000012047$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012048
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012049 was_it_defined=yes
12050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12054$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012055
Matthias Kloseb9621712010-04-24 17:59:49 +000012056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12057$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012058if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012059 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012060else
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012062/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012063#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012064int
12065main ()
12066{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012067struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 ;
12069 return 0;
12070}
12071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012072if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012073 ac_cv_struct_addrinfo=yes
12074else
Matthias Kloseb9621712010-04-24 17:59:49 +000012075 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12078fi
12079
Matthias Kloseb9621712010-04-24 17:59:49 +000012080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12081$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012082if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012083
Matthias Kloseb9621712010-04-24 17:59:49 +000012084$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012085
12086fi
12087
Matthias Kloseb9621712010-04-24 17:59:49 +000012088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12089$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012090if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012092else
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012094/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012095
12096# include <sys/types.h>
12097# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012098int
12099main ()
12100{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012101struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 ;
12103 return 0;
12104}
12105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012106if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012107 ac_cv_struct_sockaddr_storage=yes
12108else
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12112fi
12113
Matthias Kloseb9621712010-04-24 17:59:49 +000012114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12115$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012116if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012117
Matthias Kloseb9621712010-04-24 17:59:49 +000012118$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012119
12120fi
12121
Guido van Rossum627b2d71993-12-24 10:39:16 +000012122# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012123
Matthias Kloseb9621712010-04-24 17:59:49 +000012124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12125$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012126if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012128else
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012131$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012132int
12133main ()
12134{
12135static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012136test_array [0] = 0;
12137return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012138
12139 ;
12140 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012141}
Martin v. Löwis11437992002-04-12 09:54:03 +000012142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012143if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012144 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12151$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012152if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012154
12155fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012156
Matthias Kloseb9621712010-04-24 17:59:49 +000012157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12158$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012159if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012161else
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012163/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012164
Martin v. Löwis11437992002-04-12 09:54:03 +000012165int
12166main ()
12167{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012168
Martin v. Löwis11437992002-04-12 09:54:03 +000012169#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012170 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012172 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012173 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012174 char const *const *pcpcc;
12175 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012176 /* NEC SVR4.0.2 mips cc rejects this. */
12177 struct point {int x, y;};
12178 static struct point const zero = {0,0};
12179 /* AIX XL C 1.02.0.0 rejects this.
12180 It does not let you subtract one const X* pointer from another in
12181 an arm of an if-expression whose if-part is not a constant
12182 expression */
12183 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012184 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012185 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012186 ++pcpcc;
12187 ppc = (char**) pcpcc;
12188 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012189 { /* SCO 3.2v4 cc rejects this sort of thing. */
12190 char tx;
12191 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012192 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012193
Martin v. Löwis11437992002-04-12 09:54:03 +000012194 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012195 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 }
12197 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12198 int x[] = {25, 17};
12199 const int *foo = &x[0];
12200 ++foo;
12201 }
12202 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12203 typedef const int *iptr;
12204 iptr p = 0;
12205 ++p;
12206 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012207 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012209 struct s { int j; const int *ap[3]; } bx;
12210 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012211 }
12212 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12213 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012215 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012216 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012217#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012218
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 ;
12220 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012221}
Martin v. Löwis11437992002-04-12 09:54:03 +000012222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012223if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012224 ac_cv_c_const=yes
12225else
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12231$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012232if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012233
Matthias Kloseb9621712010-04-24 17:59:49 +000012234$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012235
12236fi
12237
Michael W. Hudson54241132001-12-07 15:38:26 +000012238
Guido van Rossumda88dad1995-01-26 00:46:29 +000012239works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12241$as_echo_n "checking for working volatile... " >&6; }
12242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012243/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012244
Martin v. Löwis11437992002-04-12 09:54:03 +000012245int
12246main ()
12247{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012248volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012249 ;
12250 return 0;
12251}
12252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012253if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012254 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012255else
Skip Montanaro6dead952003-09-25 14:50:04 +000012256
Matthias Kloseb9621712010-04-24 17:59:49 +000012257$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012258
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012259
Guido van Rossum627b2d71993-12-24 10:39:16 +000012260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12263$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012264
Guido van Rossumda88dad1995-01-26 00:46:29 +000012265works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12267$as_echo_n "checking for working signed char... " >&6; }
12268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012269/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012270
Martin v. Löwis11437992002-04-12 09:54:03 +000012271int
12272main ()
12273{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012274signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012275 ;
12276 return 0;
12277}
12278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012279if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012280 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012281else
Skip Montanaro6dead952003-09-25 14:50:04 +000012282
Matthias Kloseb9621712010-04-24 17:59:49 +000012283$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012284
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012285
Guido van Rossum7f43da71994-08-01 12:15:30 +000012286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12289$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012290
Guido van Rossumda88dad1995-01-26 00:46:29 +000012291have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12293$as_echo_n "checking for prototypes... " >&6; }
12294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012295/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012296int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012297int
12298main ()
12299{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012300return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012301 ;
12302 return 0;
12303}
12304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012306
Matthias Kloseb9621712010-04-24 17:59:49 +000012307$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012308
Matthias Kloseb159a552010-04-25 21:00:44 +000012309 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12313$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012314
Guido van Rossumda88dad1995-01-26 00:46:29 +000012315works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12317$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012319/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012320
12321#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012322int foo(int x, ...) {
12323 va_list va;
12324 va_start(va, x);
12325 va_arg(va, int);
12326 va_arg(va, char *);
12327 va_arg(va, double);
12328 return 0;
12329}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012330
Martin v. Löwis11437992002-04-12 09:54:03 +000012331int
12332main ()
12333{
Guido van Rossum90eea071996-08-30 20:58:57 +000012334return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 ;
12336 return 0;
12337}
12338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012340
12341
Matthias Kloseb9621712010-04-24 17:59:49 +000012342$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012343
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012344 works=yes
12345
Guido van Rossum627b2d71993-12-24 10:39:16 +000012346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12349$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012350
Martin v. Löwisd6320502004-08-12 13:45:08 +000012351# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12353$as_echo_n "checking for socketpair... " >&6; }
12354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012355/* end confdefs.h. */
12356
12357#include <sys/types.h>
12358#include <sys/socket.h>
12359
12360int
12361main ()
12362{
12363void *x=socketpair
12364 ;
12365 return 0;
12366}
12367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012371
Matthias Kloseb159a552010-04-25 21:00:44 +000012372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012373$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012374else
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12376$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012377
12378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012380
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012381# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12383$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012385/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012386#include <sys/types.h>
12387#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012388int
12389main ()
12390{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012391struct sockaddr x;
12392x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012393 ;
12394 return 0;
12395}
12396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012397if ac_fn_c_try_compile "$LINENO"; then :
12398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12399$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012400
Matthias Kloseb9621712010-04-24 17:59:49 +000012401$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012402
12403else
Matthias Kloseb9621712010-04-24 17:59:49 +000012404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12405$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012406
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012409
Guido van Rossumda88dad1995-01-26 00:46:29 +000012410va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12412$as_echo_n "checking whether va_list is an array... " >&6; }
12413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012414/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012415
12416#ifdef HAVE_STDARG_PROTOTYPES
12417#include <stdarg.h>
12418#else
12419#include <varargs.h>
12420#endif
12421
Martin v. Löwis11437992002-04-12 09:54:03 +000012422int
12423main ()
12424{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012425va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012426 ;
12427 return 0;
12428}
12429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012430if ac_fn_c_try_compile "$LINENO"; then :
12431
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012432else
Skip Montanaro6dead952003-09-25 14:50:04 +000012433
Martin v. Löwis11437992002-04-12 09:54:03 +000012434
Matthias Kloseb9621712010-04-24 17:59:49 +000012435$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012436
Guido van Rossumda88dad1995-01-26 00:46:29 +000012437 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012438
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12442$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012443
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012444# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012445
12446
Matthias Kloseb9621712010-04-24 17:59:49 +000012447ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012448if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012449
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012451
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12453$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012454 OLD_CFLAGS=$CFLAGS
12455 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012457/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012458
12459# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012460
Martin v. Löwis11437992002-04-12 09:54:03 +000012461int
12462main ()
12463{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012464
12465 char *name;
12466 struct hostent *he, *res;
12467 char buffer[2048];
12468 int buflen = 2048;
12469 int h_errnop;
12470
12471 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012472
12473 ;
12474 return 0;
12475}
12476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012477if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012480
Martin v. Löwis11437992002-04-12 09:54:03 +000012481
Matthias Kloseb9621712010-04-24 17:59:49 +000012482$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012483
Matthias Kloseb9621712010-04-24 17:59:49 +000012484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12485$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012487else
Skip Montanaro6dead952003-09-25 14:50:04 +000012488
Matthias Kloseb9621712010-04-24 17:59:49 +000012489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12490$as_echo "no" >&6; }
12491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12492$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012494/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012495
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012496# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012497
Martin v. Löwis11437992002-04-12 09:54:03 +000012498int
12499main ()
12500{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012501
12502 char *name;
12503 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012504 char buffer[2048];
12505 int buflen = 2048;
12506 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012507
Matthias Kloseb159a552010-04-25 21:00:44 +000012508 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012509
12510 ;
12511 return 0;
12512}
12513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012515
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012517
Martin v. Löwis11437992002-04-12 09:54:03 +000012518
Matthias Kloseb159a552010-04-25 21:00:44 +000012519$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012520
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12522$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012523
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012524else
Skip Montanaro6dead952003-09-25 14:50:04 +000012525
Matthias Kloseb9621712010-04-24 17:59:49 +000012526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12527$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12529$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12531/* end confdefs.h. */
12532
12533# include <netdb.h>
12534
12535int
12536main ()
12537{
12538
12539 char *name;
12540 struct hostent *he;
12541 struct hostent_data data;
12542
12543 (void) gethostbyname_r(name, he, &data);
12544
12545 ;
12546 return 0;
12547}
12548_ACEOF
12549if ac_fn_c_try_compile "$LINENO"; then :
12550
12551 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12552
12553
12554$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12555
12556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12557$as_echo "yes" >&6; }
12558
12559else
12560
12561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12562$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012563
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012566
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012569
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012572 CFLAGS=$OLD_CFLAGS
12573
12574else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012575
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 for ac_func in gethostbyname
12577do :
12578 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012579if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012580 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012581#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012582_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012583
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012584fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012585done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012586
Michael W. Hudson54241132001-12-07 15:38:26 +000012587
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012588fi
12589
Michael W. Hudson54241132001-12-07 15:38:26 +000012590
12591
12592
12593
12594
12595
Guido van Rossum627b2d71993-12-24 10:39:16 +000012596# checks for system services
12597# (none yet)
12598
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012599# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012600ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012601if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012602
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012603else
Matthias Kloseb9621712010-04-24 17:59:49 +000012604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12605$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012606if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012607 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012608else
Martin v. Löwis11437992002-04-12 09:54:03 +000012609 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012610LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012614/* Override any GCC internal prototype to avoid an error.
12615 Use char because int might match the return type of a GCC
12616 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012617#ifdef __cplusplus
12618extern "C"
12619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012620char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012621int
12622main ()
12623{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012624return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012625 ;
12626 return 0;
12627}
12628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012629if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012630 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012631else
Matthias Kloseb9621712010-04-24 17:59:49 +000012632 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012634rm -f core conftest.err conftest.$ac_objext \
12635 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012636LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12639$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012640if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012641 cat >>confdefs.h <<_ACEOF
12642#define HAVE_LIBIEEE 1
12643_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012644
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012645 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012646
Guido van Rossum627b2d71993-12-24 10:39:16 +000012647fi
12648
Michael W. Hudson54241132001-12-07 15:38:26 +000012649
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012650fi
12651
Michael W. Hudson54241132001-12-07 15:38:26 +000012652
Guido van Rossum7f253911997-05-09 02:42:48 +000012653# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12655$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012658if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012659 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012660if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012661then
12662
Matthias Kloseb9621712010-04-24 17:59:49 +000012663$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012664
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12666$as_echo "yes" >&6; }
12667else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12668$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012669fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012670else
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12672$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673fi
12674
Guido van Rossum7f253911997-05-09 02:42:48 +000012675
Guido van Rossum7f43da71994-08-01 12:15:30 +000012676# check for --with-libm=...
12677
Guido van Rossum563e7081996-09-10 18:20:48 +000012678case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012679Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012680*) LIBM=-lm
12681esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12683$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012686if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012688if test "$withval" = no
12689then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12691$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012692elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012693then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12695$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012696else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012697fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012698else
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12700$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701fi
12702
Guido van Rossum7f43da71994-08-01 12:15:30 +000012703
12704# check for --with-libc=...
12705
Matthias Kloseb9621712010-04-24 17:59:49 +000012706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12707$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012710if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012712if test "$withval" = no
12713then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12715$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012716elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012717then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12719$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012720else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012721fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012722else
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12724$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725fi
12726
Guido van Rossum7f43da71994-08-01 12:15:30 +000012727
Stefan Krah1919b7e2012-03-21 18:25:23 +010012728# **************************************
12729# * Check for gcc x64 inline assembler *
12730# **************************************
12731
12732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12733$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12735/* end confdefs.h. */
12736
12737int
12738main ()
12739{
12740
12741 __asm__ __volatile__ ("movq %rcx, %rax");
12742
12743 ;
12744 return 0;
12745}
12746_ACEOF
12747if ac_fn_c_try_compile "$LINENO"; then :
12748 have_gcc_asm_for_x64=yes
12749else
12750 have_gcc_asm_for_x64=no
12751fi
12752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12754$as_echo "$have_gcc_asm_for_x64" >&6; }
12755if test "$have_gcc_asm_for_x64" = yes
12756then
12757
12758$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12759
12760fi
12761
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012762# **************************************************
12763# * Check for various properties of floating point *
12764# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012765
Matthias Kloseb9621712010-04-24 17:59:49 +000012766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12767$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012768if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012769 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012770else
12771
Matthias Kloseb9621712010-04-24 17:59:49 +000012772if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012773 ac_cv_little_endian_double=no
12774else
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012776/* end confdefs.h. */
12777
12778#include <string.h>
12779int main() {
12780 double x = 9006104071832581.0;
12781 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12782 return 0;
12783 else
12784 return 1;
12785}
12786
12787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012788if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012789 ac_cv_little_endian_double=yes
12790else
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12794 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012795fi
12796
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012797fi
12798
Matthias Kloseb9621712010-04-24 17:59:49 +000012799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12800$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012801if test "$ac_cv_little_endian_double" = yes
12802then
12803
Matthias Kloseb9621712010-04-24 17:59:49 +000012804$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012805
12806fi
12807
Matthias Kloseb9621712010-04-24 17:59:49 +000012808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12809$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012810if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012812else
12813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012815 ac_cv_big_endian_double=no
12816else
Matthias Kloseb9621712010-04-24 17:59:49 +000012817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012818/* end confdefs.h. */
12819
12820#include <string.h>
12821int main() {
12822 double x = 9006104071832581.0;
12823 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12824 return 0;
12825 else
12826 return 1;
12827}
12828
12829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012830if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012831 ac_cv_big_endian_double=yes
12832else
Matthias Kloseb9621712010-04-24 17:59:49 +000012833 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012837fi
12838
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012839fi
12840
Matthias Kloseb9621712010-04-24 17:59:49 +000012841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12842$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012843if test "$ac_cv_big_endian_double" = yes
12844then
12845
Matthias Kloseb9621712010-04-24 17:59:49 +000012846$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012847
12848fi
12849
12850# Some ARM platforms use a mixed-endian representation for doubles.
12851# While Python doesn't currently have full support for these platforms
12852# (see e.g., issue 1762561), we can at least make sure that float <-> string
12853# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12855$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012856if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012858else
12859
Matthias Kloseb9621712010-04-24 17:59:49 +000012860if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012861 ac_cv_mixed_endian_double=no
12862else
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012864/* end confdefs.h. */
12865
12866#include <string.h>
12867int main() {
12868 double x = 9006104071832581.0;
12869 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12870 return 0;
12871 else
12872 return 1;
12873}
12874
12875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012876if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012877 ac_cv_mixed_endian_double=yes
12878else
Matthias Kloseb9621712010-04-24 17:59:49 +000012879 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012883fi
12884
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012885fi
12886
Matthias Kloseb9621712010-04-24 17:59:49 +000012887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12888$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012889if test "$ac_cv_mixed_endian_double" = yes
12890then
12891
Matthias Kloseb9621712010-04-24 17:59:49 +000012892$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012893
12894fi
12895
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012896# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012897# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012898# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012899# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012900# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012901# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012902
12903# This inline assembler syntax may also work for suncc and icc,
12904# so we try it on all platforms.
12905
Matthias Kloseb9621712010-04-24 17:59:49 +000012906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12907$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012909/* end confdefs.h. */
12910
12911int
12912main ()
12913{
12914
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012915 unsigned short cw;
12916 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12917 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012918
12919 ;
12920 return 0;
12921}
12922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012923if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012924 have_gcc_asm_for_x87=yes
12925else
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012927fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12930$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012931if test "$have_gcc_asm_for_x87" = yes
12932then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012933
Matthias Kloseb9621712010-04-24 17:59:49 +000012934$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012935
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012936fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012937
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012938# Detect whether system arithmetic is subject to x87-style double
12939# rounding issues. The result of this test has little meaning on non
12940# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12941# mode is round-to-nearest and double rounding issues are present, and
12942# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12944$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012945# $BASECFLAGS may affect the result
12946ac_save_cc="$CC"
12947CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012948if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012949 ac_cv_x87_double_rounding=no
12950else
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012952/* end confdefs.h. */
12953
12954#include <stdlib.h>
12955#include <math.h>
12956int main() {
12957 volatile double x, y, z;
12958 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12959 x = 0.99999999999999989; /* 1-2**-53 */
12960 y = 1./x;
12961 if (y != 1.)
12962 exit(0);
12963 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12964 x = 1e16;
12965 y = 2.99999;
12966 z = x + y;
12967 if (z != 1e16+4.)
12968 exit(0);
12969 /* both tests show evidence of double rounding */
12970 exit(1);
12971}
12972
12973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012974if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012975 ac_cv_x87_double_rounding=no
12976else
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12980 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012981fi
12982
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012983CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12985$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012986if test "$ac_cv_x87_double_rounding" = yes
12987then
12988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012990
12991fi
12992
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012993# ************************************
12994# * Check for mathematical functions *
12995# ************************************
12996
12997LIBS_SAVE=$LIBS
12998LIBS="$LIBS $LIBM"
12999
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013000for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13001do :
13002 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13003ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013004if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013005 cat >>confdefs.h <<_ACEOF
13006#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13007_ACEOF
13008
13009fi
13010done
13011
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013012for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013013do :
13014 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13015ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013016if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013017 cat >>confdefs.h <<_ACEOF
13018#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13019_ACEOF
13020
13021fi
13022done
13023
13024ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13025"
Victor Stinnere0be4232011-10-25 13:06:09 +020013026if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013027 ac_have_decl=1
13028else
13029 ac_have_decl=0
13030fi
13031
13032cat >>confdefs.h <<_ACEOF
13033#define HAVE_DECL_ISINF $ac_have_decl
13034_ACEOF
13035ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13036"
Victor Stinnere0be4232011-10-25 13:06:09 +020013037if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013038 ac_have_decl=1
13039else
13040 ac_have_decl=0
13041fi
13042
13043cat >>confdefs.h <<_ACEOF
13044#define HAVE_DECL_ISNAN $ac_have_decl
13045_ACEOF
13046ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13047"
Victor Stinnere0be4232011-10-25 13:06:09 +020013048if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013049 ac_have_decl=1
13050else
13051 ac_have_decl=0
13052fi
13053
13054cat >>confdefs.h <<_ACEOF
13055#define HAVE_DECL_ISFINITE $ac_have_decl
13056_ACEOF
13057
13058
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013059# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13060# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13062$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013063if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013065else
13066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013068 ac_cv_tanh_preserves_zero_sign=no
13069else
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013071/* end confdefs.h. */
13072
13073#include <math.h>
13074#include <stdlib.h>
13075int main() {
13076 /* return 0 if either negative zeros don't exist
13077 on this platform or if negative zeros exist
13078 and tanh(-0.) == -0. */
13079 if (atan2(0., -1.) == atan2(-0., -1.) ||
13080 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13081 else exit(1);
13082}
13083
13084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013085if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013086 ac_cv_tanh_preserves_zero_sign=yes
13087else
Matthias Kloseb9621712010-04-24 17:59:49 +000013088 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13091 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013092fi
13093
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013094fi
13095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13097$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013098if test "$ac_cv_tanh_preserves_zero_sign" = yes
13099then
13100
Matthias Kloseb9621712010-04-24 17:59:49 +000013101$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013102
13103fi
13104
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013105if test "$ac_cv_func_log1p" = yes
13106then
13107 # On some versions of AIX, log1p(-0.) returns 0. instead of
13108 # -0. See issue #9920.
13109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13110$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013111 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013112 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013113else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013114
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013115 if test "$cross_compiling" = yes; then :
13116 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013117else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13119/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013120
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013121 #include <math.h>
13122 #include <stdlib.h>
13123 int main() {
13124 /* Fail if the signs of log1p(-0.) and -0. can be
13125 distinguished. */
13126 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13127 return 0;
13128 else
13129 return 1;
13130 }
13131
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013132_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013133if ac_fn_c_try_run "$LINENO"; then :
13134 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013135else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013136 ac_cv_log1p_drops_zero_sign=yes
13137fi
13138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13139 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013140fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013141
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013142fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013143
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13145$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13146fi
13147if test "$ac_cv_log1p_drops_zero_sign" = yes
13148then
13149
13150$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13151
13152fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013153
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013154LIBS=$LIBS_SAVE
13155
Mark Dickinsona614f042009-11-28 12:48:43 +000013156# For multiprocessing module, check that sem_open
13157# actually works. For FreeBSD versions <= 7.2,
13158# the kernel module that provides POSIX semaphores
13159# isn't loaded by default, so an attempt to call
13160# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13162$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013163if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013164 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013165else
Matthias Kloseb9621712010-04-24 17:59:49 +000013166 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013167 ac_cv_posix_semaphores_enabled=yes
13168else
Matthias Kloseb9621712010-04-24 17:59:49 +000013169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013170/* end confdefs.h. */
13171
13172#include <unistd.h>
13173#include <fcntl.h>
13174#include <stdio.h>
13175#include <semaphore.h>
13176#include <sys/stat.h>
13177
13178int main(void) {
13179 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13180 if (a == SEM_FAILED) {
13181 perror("sem_open");
13182 return 1;
13183 }
13184 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013185 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013186 return 0;
13187}
13188
13189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013190if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013191 ac_cv_posix_semaphores_enabled=yes
13192else
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13196 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013197fi
13198
13199
Mark Dickinsona614f042009-11-28 12:48:43 +000013200fi
13201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13203$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013204if test $ac_cv_posix_semaphores_enabled = no
13205then
13206
Matthias Kloseb9621712010-04-24 17:59:49 +000013207$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013208
13209fi
13210
Mark Dickinson10683072009-04-18 21:18:19 +000013211# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13213$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013214if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013215 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013216else
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013218 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013219else
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013221/* end confdefs.h. */
13222
13223#include <unistd.h>
13224#include <fcntl.h>
13225#include <stdio.h>
13226#include <semaphore.h>
13227#include <sys/stat.h>
13228
13229int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013230 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013231 int count;
13232 int res;
13233 if(a==SEM_FAILED){
13234 perror("sem_open");
13235 return 1;
13236
13237 }
13238 res = sem_getvalue(a, &count);
13239 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013240 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013241 return res==-1 ? 1 : 0;
13242}
13243
Mark Dickinson10683072009-04-18 21:18:19 +000013244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013245if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013246 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013247else
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13251 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013252fi
13253
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013254
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013255fi
13256
Matthias Kloseb9621712010-04-24 17:59:49 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13258$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013259if test $ac_cv_broken_sem_getvalue = yes
13260then
13261
Matthias Kloseb9621712010-04-24 17:59:49 +000013262$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013263
13264fi
13265
Mark Dickinsonbd792642009-03-18 20:06:12 +000013266# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13268$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013269# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013270if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013271 enableval=$enable_big_digits; case $enable_big_digits in
13272yes)
13273 enable_big_digits=30 ;;
13274no)
13275 enable_big_digits=15 ;;
1327615|30)
13277 ;;
13278*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013279 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 +000013280esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13282$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013283
13284cat >>confdefs.h <<_ACEOF
13285#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13286_ACEOF
13287
13288
13289else
Matthias Kloseb9621712010-04-24 17:59:49 +000013290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13291$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013292fi
13293
13294
Guido van Rossumef2255b2000-03-10 22:30:29 +000013295# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013296ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013297if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013298
13299
Matthias Kloseb9621712010-04-24 17:59:49 +000013300$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013301
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013302 wchar_h="yes"
13303
Guido van Rossumef2255b2000-03-10 22:30:29 +000013304else
Martin v. Löwis11437992002-04-12 09:54:03 +000013305 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013306
13307fi
13308
Michael W. Hudson54241132001-12-07 15:38:26 +000013309
Martin v. Löwis11437992002-04-12 09:54:03 +000013310
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013311# determine wchar_t size
13312if test "$wchar_h" = yes
13313then
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013315# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13316# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13317# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13319$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013320if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013322else
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13324"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013325
Martin v. Löwis11437992002-04-12 09:54:03 +000013326else
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 if test "$ac_cv_type_wchar_t" = yes; then
13328 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13329$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013330as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013331See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013332 else
13333 ac_cv_sizeof_wchar_t=0
13334 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013336
Martin v. Löwis11437992002-04-12 09:54:03 +000013337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13339$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013340
13341
13342
Martin v. Löwis11437992002-04-12 09:54:03 +000013343cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013344#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013345_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013346
Michael W. Hudson54241132001-12-07 15:38:26 +000013347
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013348fi
13349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13351$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013352have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013354/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013355
13356#include <tcl.h>
13357#if TCL_UTF_MAX != 6
13358# error "NOT UCS4_TCL"
13359#endif
13360int
13361main ()
13362{
13363
13364 ;
13365 return 0;
13366}
13367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013369
13370
Matthias Kloseb9621712010-04-24 17:59:49 +000013371$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013372
13373 have_ucs4_tcl=yes
13374
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13378$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013379
Skip Montanaro6dead952003-09-25 14:50:04 +000013380# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013381if test "$wchar_h" = yes
13382then
13383 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13385$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013386 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013388else
13389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013391 ac_cv_wchar_t_signed=yes
13392else
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013394/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013395
13396 #include <wchar.h>
13397 int main()
13398 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013399 /* Success: exit code 0 */
13400 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013401 }
13402
13403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013404if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013405 ac_cv_wchar_t_signed=yes
13406else
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13410 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013411fi
13412
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013413fi
13414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13416$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013417fi
13418
Georg Brandl52d168a2008-01-07 18:10:24 +000013419# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013420if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013421 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013422then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013423 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
Georg Brandl52d168a2008-01-07 18:10:24 +000013427else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013428 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013429fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13431$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013432
13433# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13435$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013436if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013437 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013438else
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 ac_cv_c_bigendian=unknown
13440 # See if we're dealing with a universal compiler.
13441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13442/* end confdefs.h. */
13443#ifndef __APPLE_CC__
13444 not a universal capable compiler
13445 #endif
13446 typedef int dummy;
13447
Skip Montanaro6dead952003-09-25 14:50:04 +000013448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013449if ac_fn_c_try_compile "$LINENO"; then :
13450
13451 # Check for potential -arch flags. It is not universal unless
13452 # there are at least two -arch flags with different values.
13453 ac_arch=
13454 ac_prev=
13455 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13456 if test -n "$ac_prev"; then
13457 case $ac_word in
13458 i?86 | x86_64 | ppc | ppc64)
13459 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13460 ac_arch=$ac_word
13461 else
13462 ac_cv_c_bigendian=universal
13463 break
13464 fi
13465 ;;
13466 esac
13467 ac_prev=
13468 elif test "x$ac_word" = "x-arch"; then
13469 ac_prev=arch
13470 fi
13471 done
13472fi
13473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13474 if test $ac_cv_c_bigendian = unknown; then
13475 # See if sys/param.h defines the BYTE_ORDER macro.
13476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013477/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013478#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013479 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013480
Martin v. Löwis11437992002-04-12 09:54:03 +000013481int
13482main ()
13483{
Matthias Kloseb9621712010-04-24 17:59:49 +000013484#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13485 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13486 && LITTLE_ENDIAN)
13487 bogus endian macros
13488 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013489
13490 ;
13491 return 0;
13492}
13493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013494if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013495 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013497/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013498#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501int
13502main ()
13503{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013504#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 not big endian
13506 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013507
13508 ;
13509 return 0;
13510}
13511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013512if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013513 ac_cv_c_bigendian=yes
13514else
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013518fi
13519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13520 fi
13521 if test $ac_cv_c_bigendian = unknown; then
13522 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013524/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013525#include <limits.h>
13526
Martin v. Löwis11437992002-04-12 09:54:03 +000013527int
13528main ()
13529{
Matthias Kloseb9621712010-04-24 17:59:49 +000013530#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13531 bogus endian macros
13532 #endif
13533
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 ;
13535 return 0;
13536}
13537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013538if ac_fn_c_try_compile "$LINENO"; then :
13539 # It does; now see whether it defined to _BIG_ENDIAN or not.
13540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13541/* end confdefs.h. */
13542#include <limits.h>
13543
13544int
13545main ()
13546{
13547#ifndef _BIG_ENDIAN
13548 not big endian
13549 #endif
13550
13551 ;
13552 return 0;
13553}
13554_ACEOF
13555if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013557else
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13561fi
13562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13563 fi
13564 if test $ac_cv_c_bigendian = unknown; then
13565 # Compile a test program.
13566 if test "$cross_compiling" = yes; then :
13567 # Try to guess by grepping values from an object file.
13568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13569/* end confdefs.h. */
13570short int ascii_mm[] =
13571 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13572 short int ascii_ii[] =
13573 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13574 int use_ascii (int i) {
13575 return ascii_mm[i] + ascii_ii[i];
13576 }
13577 short int ebcdic_ii[] =
13578 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13579 short int ebcdic_mm[] =
13580 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13581 int use_ebcdic (int i) {
13582 return ebcdic_mm[i] + ebcdic_ii[i];
13583 }
13584 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586int
13587main ()
13588{
13589return use_ascii (foo) == use_ebcdic (foo);
13590 ;
13591 return 0;
13592}
13593_ACEOF
13594if ac_fn_c_try_compile "$LINENO"; then :
13595 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13596 ac_cv_c_bigendian=yes
13597 fi
13598 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13599 if test "$ac_cv_c_bigendian" = unknown; then
13600 ac_cv_c_bigendian=no
13601 else
13602 # finding both strings is unlikely to happen, but who knows?
13603 ac_cv_c_bigendian=unknown
13604 fi
13605 fi
13606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013608else
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013610/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013611$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013612int
13613main ()
13614{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 /* Are we little or big endian? From Harbison&Steele. */
13617 union
13618 {
13619 long int l;
13620 char c[sizeof (long int)];
13621 } u;
13622 u.l = 1;
13623 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013624
13625 ;
13626 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013627}
Martin v. Löwis11437992002-04-12 09:54:03 +000013628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013629if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013630 ac_cv_c_bigendian=no
13631else
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13635 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013637
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13641$as_echo "$ac_cv_c_bigendian" >&6; }
13642 case $ac_cv_c_bigendian in #(
13643 yes)
13644 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13645;; #(
13646 no)
13647 ;; #(
13648 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 ;; #(
13653 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013654 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013655 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013657
Michael W. Hudson54241132001-12-07 15:38:26 +000013658
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013659# ABI version string for Python extension modules. This appears between the
13660# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13661# from the following attributes which affect the ABI of this Python build (in
13662# this order):
13663#
13664# * The Python implementation (always 'cpython-' for us)
13665# * The major and minor version numbers
13666# * --with-pydebug (adds a 'd')
13667# * --with-pymalloc (adds a 'm')
13668# * --with-wide-unicode (adds a 'u')
13669#
13670# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013671# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13672# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013673
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13675$as_echo_n "checking ABIFLAGS... " >&6; }
13676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13677$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13679$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013680SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13682$as_echo "$SOABI" >&6; }
13683
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13685$as_echo_n "checking LDVERSION... " >&6; }
13686LDVERSION='$(VERSION)$(ABIFLAGS)'
13687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13688$as_echo "$LDVERSION" >&6; }
13689
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013690# SO is the extension of shared libraries `(including the dot!)
13691# -- usually .so, .sl on HP-UX, .dll on Cygwin
13692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13693$as_echo_n "checking SO... " >&6; }
13694if test -z "$SO"
13695then
13696 case $ac_sys_system in
13697 hp*|HP*)
13698 case `uname -m` in
13699 ia64) SO=.so;;
13700 *) SO=.sl;;
13701 esac
13702 ;;
13703 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013704 Linux*|GNU*)
13705 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013706 *) SO=.so;;
13707 esac
13708else
13709 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013710 echo
13711 echo '====================================================================='
13712 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013713 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013714 echo '+ Do you really mean to change the extension for shared libraries? +'
13715 echo '+ Continuing in 10 seconds to let you to ponder. +'
13716 echo '+ +'
13717 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013718 sleep 10
13719fi
13720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13721$as_echo "$SO" >&6; }
13722
Stefan Krah8c8adf62013-01-17 20:41:56 +010013723
13724cat >>confdefs.h <<_ACEOF
13725#define SHLIB_EXT "$SO"
13726_ACEOF
13727
13728
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013729# Check whether right shifting a negative integer extends the sign bit
13730# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13732$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013733if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013735else
Martin v. Löwis11437992002-04-12 09:54:03 +000013736
Matthias Kloseb9621712010-04-24 17:59:49 +000013737if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013738 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013739else
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013741/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013742
13743int main()
13744{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013745 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013746}
13747
Martin v. Löwis11437992002-04-12 09:54:03 +000013748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013749if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013750 ac_cv_rshift_extends_sign=yes
13751else
Matthias Kloseb9621712010-04-24 17:59:49 +000013752 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13755 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013756fi
13757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013758fi
13759
Matthias Kloseb9621712010-04-24 17:59:49 +000013760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13761$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013762if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013763then
Martin v. Löwis11437992002-04-12 09:54:03 +000013764
Matthias Kloseb9621712010-04-24 17:59:49 +000013765$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013766
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013767fi
13768
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013769# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13771$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013772if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013773 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013774else
Martin v. Löwis11437992002-04-12 09:54:03 +000013775
Matthias Kloseb9621712010-04-24 17:59:49 +000013776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013777/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013778#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013779int
13780main ()
13781{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013782
13783 FILE *f = fopen("/dev/null", "r");
13784 flockfile(f);
13785 getc_unlocked(f);
13786 funlockfile(f);
13787
Martin v. Löwis11437992002-04-12 09:54:03 +000013788 ;
13789 return 0;
13790}
13791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013792if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013793 ac_cv_have_getc_unlocked=yes
13794else
Matthias Kloseb9621712010-04-24 17:59:49 +000013795 ac_cv_have_getc_unlocked=no
13796fi
13797rm -f core conftest.err conftest.$ac_objext \
13798 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800
Matthias Kloseb9621712010-04-24 17:59:49 +000013801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13802$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013803if test "$ac_cv_have_getc_unlocked" = yes
13804then
Martin v. Löwis11437992002-04-12 09:54:03 +000013805
Matthias Kloseb9621712010-04-24 17:59:49 +000013806$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013807
13808fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013809
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013810# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013811# save the value of LIBS so we don't actually link Python with readline
13812LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013813
Gregory P. Smith18820942008-09-07 06:24:49 +000013814# On some systems we need to link readline to a termcap compatible
13815# library. NOTE: Keep the precedence of listed libraries synchronised
13816# with setup.py.
13817py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13819$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013820for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013821 if test -z "$py_libtermcap"; then
13822 READLINE_LIBS="-lreadline"
13823 else
13824 READLINE_LIBS="-lreadline -l$py_libtermcap"
13825 fi
13826 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013828/* end confdefs.h. */
13829
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013830/* Override any GCC internal prototype to avoid an error.
13831 Use char because int might match the return type of a GCC
13832 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013833#ifdef __cplusplus
13834extern "C"
13835#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013836char readline ();
13837int
13838main ()
13839{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013840return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013841 ;
13842 return 0;
13843}
13844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013845if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013846 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013848rm -f core conftest.err conftest.$ac_objext \
13849 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013850 if test $py_cv_lib_readline = yes; then
13851 break
13852 fi
13853done
13854# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13855#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013856if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13858$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013859else
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13861$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013862
Matthias Kloseb9621712010-04-24 17:59:49 +000013863$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013864
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013865fi
13866
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013867# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13869$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013870if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013872else
13873 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013874LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013876/* end confdefs.h. */
13877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013878/* Override any GCC internal prototype to avoid an error.
13879 Use char because int might match the return type of a GCC
13880 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013881#ifdef __cplusplus
13882extern "C"
13883#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013884char rl_callback_handler_install ();
13885int
13886main ()
13887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013889 ;
13890 return 0;
13891}
13892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013893if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013894 ac_cv_lib_readline_rl_callback_handler_install=yes
13895else
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013898rm -f core conftest.err conftest.$ac_objext \
13899 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013900LIBS=$ac_check_lib_save_LIBS
13901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13903$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013904if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013905
Matthias Kloseb9621712010-04-24 17:59:49 +000013906$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013907
13908fi
13909
13910
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013911# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013913/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013914#include <readline/readline.h>
13915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013916if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013917 have_readline=yes
13918else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013919 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013920
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013921fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013922rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013923if test $have_readline = yes
13924then
Matthias Kloseb9621712010-04-24 17:59:49 +000013925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013926/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013927#include <readline/readline.h>
13928
13929_ACEOF
13930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013932
Matthias Kloseb9621712010-04-24 17:59:49 +000013933$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013934
13935fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013936rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013937
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013939/* end confdefs.h. */
13940#include <readline/readline.h>
13941
13942_ACEOF
13943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013945
Matthias Kloseb9621712010-04-24 17:59:49 +000013946$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013947
13948fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013949rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013950
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013951fi
13952
Martin v. Löwis0daad592001-09-30 21:09:59 +000013953# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13955$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013956if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013957 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013958else
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013960LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013964/* Override any GCC internal prototype to avoid an error.
13965 Use char because int might match the return type of a GCC
13966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013967#ifdef __cplusplus
13968extern "C"
13969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013970char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013971int
13972main ()
13973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013974return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013975 ;
13976 return 0;
13977}
13978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013979if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013981else
Matthias Kloseb9621712010-04-24 17:59:49 +000013982 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013983fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013984rm -f core conftest.err conftest.$ac_objext \
13985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013986LIBS=$ac_check_lib_save_LIBS
13987fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13989$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013990if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013991
Matthias Kloseb9621712010-04-24 17:59:49 +000013992$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013993
Martin v. Löwis0daad592001-09-30 21:09:59 +000013994fi
13995
Michael W. Hudson54241132001-12-07 15:38:26 +000013996
Thomas Wouters89d996e2007-09-08 17:39:28 +000013997# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13999$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014000if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014002else
14003 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014004LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014006/* end confdefs.h. */
14007
14008/* Override any GCC internal prototype to avoid an error.
14009 Use char because int might match the return type of a GCC
14010 builtin and then its argument prototype would still apply. */
14011#ifdef __cplusplus
14012extern "C"
14013#endif
14014char rl_completion_display_matches_hook ();
14015int
14016main ()
14017{
14018return rl_completion_display_matches_hook ();
14019 ;
14020 return 0;
14021}
14022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014023if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014024 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14025else
Matthias Kloseb9621712010-04-24 17:59:49 +000014026 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014028rm -f core conftest.err conftest.$ac_objext \
14029 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014030LIBS=$ac_check_lib_save_LIBS
14031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14033$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014034if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014035
Matthias Kloseb9621712010-04-24 17:59:49 +000014036$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014037
14038fi
14039
14040
Martin v. Löwis0daad592001-09-30 21:09:59 +000014041# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14043$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014044if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014045 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014046else
Martin v. Löwis11437992002-04-12 09:54:03 +000014047 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014048LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014052/* Override any GCC internal prototype to avoid an error.
14053 Use char because int might match the return type of a GCC
14054 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014055#ifdef __cplusplus
14056extern "C"
14057#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014058char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014059int
14060main ()
14061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 ;
14064 return 0;
14065}
14066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014067if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014069else
Matthias Kloseb9621712010-04-24 17:59:49 +000014070 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014072rm -f core conftest.err conftest.$ac_objext \
14073 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014074LIBS=$ac_check_lib_save_LIBS
14075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14077$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014078if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014079
Matthias Kloseb9621712010-04-24 17:59:49 +000014080$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014081
Guido van Rossum353ae582001-07-10 16:45:32 +000014082fi
14083
Jack Jansendd19cf82001-12-06 22:36:17 +000014084
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014085# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014087/* end confdefs.h. */
14088#include <readline/readline.h>
14089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014090if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014091 have_readline=yes
14092else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014093 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014094
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014095fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014096rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014097if test $have_readline = yes
14098then
Matthias Kloseb9621712010-04-24 17:59:49 +000014099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014100/* end confdefs.h. */
14101#include <readline/readline.h>
14102
14103_ACEOF
14104if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014105 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014106
Matthias Kloseb9621712010-04-24 17:59:49 +000014107$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014108
14109fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014110rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014111
14112fi
14113
Martin v. Löwis82bca632006-02-10 20:49:30 +000014114# End of readline checks: restore LIBS
14115LIBS=$LIBS_no_readline
14116
Matthias Kloseb9621712010-04-24 17:59:49 +000014117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14118$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014119if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014120 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014121else
Martin v. Löwis11437992002-04-12 09:54:03 +000014122
Matthias Kloseb9621712010-04-24 17:59:49 +000014123if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014124 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014125else
Matthias Kloseb9621712010-04-24 17:59:49 +000014126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014127/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014128
14129int main()
14130{
14131 int val1 = nice(1);
14132 if (val1 != -1 && val1 == nice(2))
14133 exit(0);
14134 exit(1);
14135}
14136
Martin v. Löwis11437992002-04-12 09:54:03 +000014137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014138if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014139 ac_cv_broken_nice=yes
14140else
Matthias Kloseb9621712010-04-24 17:59:49 +000014141 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14144 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014145fi
14146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147fi
14148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14150$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014151if test "$ac_cv_broken_nice" = yes
14152then
Martin v. Löwis11437992002-04-12 09:54:03 +000014153
Matthias Kloseb9621712010-04-24 17:59:49 +000014154$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014155
14156fi
14157
Matthias Kloseb9621712010-04-24 17:59:49 +000014158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14159$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014160if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014162else
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014164 ac_cv_broken_poll=no
14165else
Matthias Kloseb9621712010-04-24 17:59:49 +000014166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014167/* end confdefs.h. */
14168
14169#include <poll.h>
14170
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014171int main()
14172{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014173 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014174 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014175
14176 close (42);
14177
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014178 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014179 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014180 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014181 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014182 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014183 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014184 return 1;
14185}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014186
14187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014188if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014189 ac_cv_broken_poll=yes
14190else
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14194 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014197fi
14198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14200$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014201if test "$ac_cv_broken_poll" = yes
14202then
14203
Matthias Kloseb9621712010-04-24 17:59:49 +000014204$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014205
14206fi
14207
Brett Cannon43802422005-02-10 20:48:03 +000014208# 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 +000014209# (which is not required by ISO C or UNIX spec) and/or if we support
14210# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014211ac_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 +000014212#include <$ac_cv_struct_tm>
14213
Matthias Kloseb9621712010-04-24 17:59:49 +000014214"
Victor Stinnere0be4232011-10-25 13:06:09 +020014215if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014216
14217cat >>confdefs.h <<_ACEOF
14218#define HAVE_STRUCT_TM_TM_ZONE 1
14219_ACEOF
14220
14221
14222fi
14223
14224if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14225
Matthias Kloseb9621712010-04-24 17:59:49 +000014226$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014227
14228else
Matthias Kloseb9621712010-04-24 17:59:49 +000014229 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14230"
Victor Stinnere0be4232011-10-25 13:06:09 +020014231if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014232 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014233else
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235fi
14236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014238#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239_ACEOF
14240
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14242$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014243if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014244 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245else
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014247/* end confdefs.h. */
14248#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014249#if !HAVE_DECL_TZNAME
14250extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014251#endif
14252
14253int
14254main ()
14255{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014256return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014257 ;
14258 return 0;
14259}
14260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014261if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014262 ac_cv_var_tzname=yes
14263else
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014266rm -f core conftest.err conftest.$ac_objext \
14267 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14270$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014271 if test $ac_cv_var_tzname = yes; then
14272
Matthias Kloseb9621712010-04-24 17:59:49 +000014273$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014274
14275 fi
14276fi
14277
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014278
Martin v. Löwis1d459062005-03-14 21:23:33 +000014279# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14281$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014282if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014284else
14285
Matthias Kloseb9621712010-04-24 17:59:49 +000014286if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014287 ac_cv_working_tzset=no
14288else
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014290/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014291
14292#include <stdlib.h>
14293#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014294#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014295
14296#if HAVE_TZNAME
14297extern char *tzname[];
14298#endif
14299
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014300int main()
14301{
Brett Cannon18367812003-09-19 00:59:16 +000014302 /* Note that we need to ensure that not only does tzset(3)
14303 do 'something' with localtime, but it works as documented
14304 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014305 This includes making sure that tzname is set properly if
14306 tm->tm_zone does not exist since it is the alternative way
14307 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014308
14309 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014310 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014311 */
14312
Martin v. Löwis1d459062005-03-14 21:23:33 +000014313 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014314 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14315
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014316 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014317 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014318 if (localtime(&groundhogday)->tm_hour != 0)
14319 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014320#if HAVE_TZNAME
14321 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14322 if (strcmp(tzname[0], "UTC") ||
14323 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14324 exit(1);
14325#endif
Brett Cannon18367812003-09-19 00:59:16 +000014326
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014327 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014328 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014329 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014330 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014331#if HAVE_TZNAME
14332 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14333 exit(1);
14334#endif
Brett Cannon18367812003-09-19 00:59:16 +000014335
14336 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14337 tzset();
14338 if (localtime(&groundhogday)->tm_hour != 11)
14339 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014340#if HAVE_TZNAME
14341 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14342 exit(1);
14343#endif
14344
14345#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014346 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14347 exit(1);
14348 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14349 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014350#endif
Brett Cannon18367812003-09-19 00:59:16 +000014351
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014352 exit(0);
14353}
14354
14355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014356if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014357 ac_cv_working_tzset=yes
14358else
Matthias Kloseb9621712010-04-24 17:59:49 +000014359 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14362 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014363fi
14364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014365fi
14366
Matthias Kloseb9621712010-04-24 17:59:49 +000014367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14368$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014369if test "$ac_cv_working_tzset" = yes
14370then
14371
Matthias Kloseb9621712010-04-24 17:59:49 +000014372$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014373
14374fi
14375
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014376# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14378$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014379if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014380 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014381else
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014383/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014384#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014385int
14386main ()
14387{
14388
14389struct stat st;
14390st.st_mtim.tv_nsec = 1;
14391
14392 ;
14393 return 0;
14394}
14395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014397 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014398else
Matthias Kloseb9621712010-04-24 17:59:49 +000014399 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14402fi
14403
Matthias Kloseb9621712010-04-24 17:59:49 +000014404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14405$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014406if test "$ac_cv_stat_tv_nsec" = yes
14407then
14408
Matthias Kloseb9621712010-04-24 17:59:49 +000014409$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014410
14411fi
14412
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014413# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14415$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014416if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014418else
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014420/* end confdefs.h. */
14421#include <sys/stat.h>
14422int
14423main ()
14424{
14425
14426struct stat st;
14427st.st_mtimespec.tv_nsec = 1;
14428
14429 ;
14430 return 0;
14431}
14432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014434 ac_cv_stat_tv_nsec2=yes
14435else
Matthias Kloseb9621712010-04-24 17:59:49 +000014436 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14439fi
14440
Matthias Kloseb9621712010-04-24 17:59:49 +000014441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14442$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014443if test "$ac_cv_stat_tv_nsec2" = yes
14444then
14445
Matthias Kloseb9621712010-04-24 17:59:49 +000014446$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014447
14448fi
14449
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014450ac_save_cppflags="$CPPFLAGS"
14451CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014452# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14454$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014455if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014457else
Matthias Kloseb9621712010-04-24 17:59:49 +000014458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014459/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014460#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014461int
14462main ()
14463{
Jack Jansen666b1e72001-10-31 12:11:48 +000014464
14465 int rtn;
14466 rtn = mvwdelch(0,0,0);
14467
Martin v. Löwis11437992002-04-12 09:54:03 +000014468 ;
14469 return 0;
14470}
14471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014472if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014473 ac_cv_mvwdelch_is_expression=yes
14474else
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14478fi
14479
Matthias Kloseb9621712010-04-24 17:59:49 +000014480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14481$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014482
14483if test "$ac_cv_mvwdelch_is_expression" = yes
14484then
Martin v. Löwis11437992002-04-12 09:54:03 +000014485
Matthias Kloseb9621712010-04-24 17:59:49 +000014486$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014487
14488fi
14489
Matthias Kloseb9621712010-04-24 17:59:49 +000014490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14491$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014492if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014494else
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014496/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014497#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014498int
14499main ()
14500{
Jack Jansen666b1e72001-10-31 12:11:48 +000014501
14502 WINDOW *w;
14503 w->_flags = 0;
14504
Martin v. Löwis11437992002-04-12 09:54:03 +000014505 ;
14506 return 0;
14507}
14508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014509if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014510 ac_cv_window_has_flags=yes
14511else
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14515fi
14516
Matthias Kloseb9621712010-04-24 17:59:49 +000014517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14518$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014519
Jack Jansen666b1e72001-10-31 12:11:48 +000014520
14521if test "$ac_cv_window_has_flags" = yes
14522then
Martin v. Löwis11437992002-04-12 09:54:03 +000014523
Matthias Kloseb9621712010-04-24 17:59:49 +000014524$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014525
14526fi
14527
Matthias Kloseb9621712010-04-24 17:59:49 +000014528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14529$as_echo_n "checking for is_term_resized... " >&6; }
14530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014531/* end confdefs.h. */
14532#include <curses.h>
14533int
14534main ()
14535{
14536void *x=is_term_resized
14537 ;
14538 return 0;
14539}
14540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014541if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014542
Matthias Kloseb9621712010-04-24 17:59:49 +000014543$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014544
Matthias Kloseb159a552010-04-25 21:00:44 +000014545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014546$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014547else
Matthias Kloseb9621712010-04-24 17:59:49 +000014548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14549$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014550
14551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14553
Matthias Kloseb9621712010-04-24 17:59:49 +000014554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14555$as_echo_n "checking for resize_term... " >&6; }
14556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014557/* end confdefs.h. */
14558#include <curses.h>
14559int
14560main ()
14561{
14562void *x=resize_term
14563 ;
14564 return 0;
14565}
14566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014567if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014568
Matthias Kloseb9621712010-04-24 17:59:49 +000014569$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014570
Matthias Kloseb159a552010-04-25 21:00:44 +000014571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014572$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014573else
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14575$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014576
14577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14579
Matthias Kloseb9621712010-04-24 17:59:49 +000014580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14581$as_echo_n "checking for resizeterm... " >&6; }
14582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014583/* end confdefs.h. */
14584#include <curses.h>
14585int
14586main ()
14587{
14588void *x=resizeterm
14589 ;
14590 return 0;
14591}
14592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014593if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014594
Matthias Kloseb9621712010-04-24 17:59:49 +000014595$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014596
Matthias Kloseb159a552010-04-25 21:00:44 +000014597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014598$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014599else
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14601$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014602
14603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014605# last curses configure check
14606CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14609$as_echo "$as_me: checking for device files" >&6;}
14610
14611if test "x$cross_compiling" = xyes; then
14612 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14614$as_echo_n "checking for /dev/ptmx... " >&6; }
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14616$as_echo "not set" >&6; }
14617 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14618 fi
14619 if test "${ac_cv_file__dev_ptc+set}" != set; then
14620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14621$as_echo_n "checking for /dev/ptc... " >&6; }
14622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14623$as_echo "not set" >&6; }
14624 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14625 fi
14626fi
14627
Matthias Kloseb9621712010-04-24 17:59:49 +000014628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14629$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014630if ${ac_cv_file__dev_ptmx+:} false; then :
14631 $as_echo_n "(cached) " >&6
14632else
14633 test "$cross_compiling" = yes &&
14634 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14635if test -r "/dev/ptmx"; then
14636 ac_cv_file__dev_ptmx=yes
14637else
14638 ac_cv_file__dev_ptmx=no
14639fi
14640fi
14641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14642$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14643if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014644
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014645fi
14646
14647if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014648
Matthias Kloseb9621712010-04-24 17:59:49 +000014649$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014650
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14653$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014654if ${ac_cv_file__dev_ptc+:} false; then :
14655 $as_echo_n "(cached) " >&6
14656else
14657 test "$cross_compiling" = yes &&
14658 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14659if test -r "/dev/ptc"; then
14660 ac_cv_file__dev_ptc=yes
14661else
14662 ac_cv_file__dev_ptc=no
14663fi
14664fi
14665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14666$as_echo "$ac_cv_file__dev_ptc" >&6; }
14667if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014668
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014669fi
14670
14671if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014672
Matthias Kloseb9621712010-04-24 17:59:49 +000014673$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014674
Neal Norwitz865400f2003-03-21 01:42:58 +000014675fi
14676
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014677if test "$have_long_long" = yes
14678then
Matthias Kloseb9621712010-04-24 17:59:49 +000014679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14680$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014681 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014683else
Matthias Kloseb9621712010-04-24 17:59:49 +000014684 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014685 ac_cv_have_long_long_format="cross -- assuming no"
14686 if test x$GCC = xyes; then
14687 save_CFLAGS=$CFLAGS
14688 CFLAGS="$CFLAGS -Werror -Wformat"
14689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14690/* end confdefs.h. */
14691
14692 #include <stdio.h>
14693 #include <stddef.h>
14694
14695int
14696main ()
14697{
14698
14699 char *buffer;
14700 sprintf(buffer, "%lld", (long long)123);
14701 sprintf(buffer, "%lld", (long long)-123);
14702 sprintf(buffer, "%llu", (unsigned long long)123);
14703
14704 ;
14705 return 0;
14706}
14707_ACEOF
14708if ac_fn_c_try_compile "$LINENO"; then :
14709 ac_cv_have_long_long_format=yes
14710
14711fi
14712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14713 CFLAGS=$save_CFLAGS
14714 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014715else
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014717/* end confdefs.h. */
14718
14719 #include <stdio.h>
14720 #include <stddef.h>
14721 #include <string.h>
14722
14723 #ifdef HAVE_SYS_TYPES_H
14724 #include <sys/types.h>
14725 #endif
14726
14727 int main()
14728 {
14729 char buffer[256];
14730
14731 if (sprintf(buffer, "%lld", (long long)123) < 0)
14732 return 1;
14733 if (strcmp(buffer, "123"))
14734 return 1;
14735
14736 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14737 return 1;
14738 if (strcmp(buffer, "-123"))
14739 return 1;
14740
14741 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14742 return 1;
14743 if (strcmp(buffer, "123"))
14744 return 1;
14745
14746 return 0;
14747 }
14748
14749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014750if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014751 ac_cv_have_long_long_format=yes
14752else
Matthias Kloseb9621712010-04-24 17:59:49 +000014753 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14756 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014757fi
14758
14759
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014760fi
14761
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14763$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014764fi
14765
Mark Dickinson89d7d412009-12-31 20:50:59 +000014766if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014767then
14768
Matthias Kloseb9621712010-04-24 17:59:49 +000014769$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014770
14771fi
14772
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014773if test $ac_sys_system = Darwin
14774then
14775 LIBS="$LIBS -framework CoreFoundation"
14776fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014777
Matthias Kloseb9621712010-04-24 17:59:49 +000014778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14779$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014780if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014782else
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014784 ac_cv_have_size_t_format="cross -- assuming yes"
14785
Thomas Wouters477c8d52006-05-27 19:21:47 +000014786else
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014788/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014789
Thomas Wouters477c8d52006-05-27 19:21:47 +000014790#include <stdio.h>
14791#include <stddef.h>
14792#include <string.h>
14793
Christian Heimes2c181612007-12-17 20:04:13 +000014794#ifdef HAVE_SYS_TYPES_H
14795#include <sys/types.h>
14796#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014797
14798#ifdef HAVE_SSIZE_T
14799typedef ssize_t Py_ssize_t;
14800#elif SIZEOF_VOID_P == SIZEOF_LONG
14801typedef long Py_ssize_t;
14802#else
14803typedef int Py_ssize_t;
14804#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014805
Christian Heimes2c181612007-12-17 20:04:13 +000014806int main()
14807{
14808 char buffer[256];
14809
Thomas Wouters477c8d52006-05-27 19:21:47 +000014810 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14811 return 1;
14812
Thomas Wouters89f507f2006-12-13 04:49:30 +000014813 if (strcmp(buffer, "123"))
14814 return 1;
14815
14816 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14817 return 1;
14818
14819 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014820 return 1;
14821
14822 return 0;
14823}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014824
Thomas Wouters477c8d52006-05-27 19:21:47 +000014825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014826if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014827 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014828else
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14832 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014833fi
14834
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14837$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014838if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014841
14842fi
14843
Matthias Kloseb9621712010-04-24 17:59:49 +000014844ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014845#ifdef HAVE_SYS_TYPES_H
14846#include <sys/types.h>
14847#endif
14848#ifdef HAVE_SYS_SOCKET_H
14849#include <sys/socket.h>
14850#endif
14851
Matthias Kloseb9621712010-04-24 17:59:49 +000014852"
Victor Stinnere0be4232011-10-25 13:06:09 +020014853if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014854
Martin v. Löwis11437992002-04-12 09:54:03 +000014855else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014856
Matthias Kloseb9621712010-04-24 17:59:49 +000014857$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014858
14859fi
14860
Michael W. Hudson54241132001-12-07 15:38:26 +000014861
Matthias Kloseb9621712010-04-24 17:59:49 +000014862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14863$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014864if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014866else
Matthias Kloseb9621712010-04-24 17:59:49 +000014867 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014868 ac_cv_broken_mbstowcs=no
14869else
Matthias Kloseb9621712010-04-24 17:59:49 +000014870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014871/* end confdefs.h. */
14872
Stefan Krah19c21392012-11-22 23:47:32 +010014873#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014874#include<stdlib.h>
14875int main() {
14876 size_t len = -1;
14877 const char *str = "text";
14878 len = mbstowcs(NULL, str, 0);
14879 return (len != 4);
14880}
14881
14882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014883if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014884 ac_cv_broken_mbstowcs=no
14885else
Matthias Kloseb9621712010-04-24 17:59:49 +000014886 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14889 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014890fi
14891
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014892fi
14893
Matthias Kloseb9621712010-04-24 17:59:49 +000014894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14895$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014896if test "$ac_cv_broken_mbstowcs" = yes
14897then
14898
Matthias Kloseb9621712010-04-24 17:59:49 +000014899$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014900
14901fi
14902
Antoine Pitroub52ec782009-01-25 16:34:23 +000014903# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14905$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014906
14907# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014908if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014909 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014910if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014911then
14912
Matthias Kloseb9621712010-04-24 17:59:49 +000014913$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014914
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14916$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014917fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014918if test "$withval" = no
14919then
14920
14921$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14922
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14924$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014925fi
14926
Antoine Pitrou042b1282010-08-13 21:15:58 +000014927else
14928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14929$as_echo "no value specified" >&6; }
14930fi
14931
Antoine Pitroub52ec782009-01-25 16:34:23 +000014932
Matthias Kloseb17289e2012-03-15 19:51:34 +010014933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14934$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14935if ${ac_cv_computed_gotos+:} false; then :
14936 $as_echo_n "(cached) " >&6
14937else
14938 if test "$cross_compiling" = yes; then :
14939 if test "${with_computed_gotos+set}" = set; then
14940 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14941 else
14942 ac_cv_computed_gotos=no
14943 fi
14944else
14945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14946/* end confdefs.h. */
14947
14948int main(int argc, char **argv)
14949{
14950 static void *targets[1] = { &&LABEL1 };
14951 goto LABEL2;
14952LABEL1:
14953 return 0;
14954LABEL2:
14955 goto *targets[0];
14956 return 1;
14957}
14958
14959_ACEOF
14960if ac_fn_c_try_run "$LINENO"; then :
14961 ac_cv_computed_gotos=yes
14962else
14963 ac_cv_computed_gotos=no
14964fi
14965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14966 conftest.$ac_objext conftest.beam conftest.$ac_ext
14967fi
14968
14969fi
14970
14971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14972$as_echo "$ac_cv_computed_gotos" >&6; }
14973case "$ac_cv_computed_gotos" in yes*)
14974
14975$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14976
14977esac
14978
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014979case $ac_sys_system in
14980AIX*)
14981
14982$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14983 ;;
14984esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014985
Michael W. Hudson54241132001-12-07 15:38:26 +000014986
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014987
14988
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014989for h in `(cd $srcdir;echo Python/thread_*.h)`
14990do
14991 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14992done
14993
Michael W. Hudson54241132001-12-07 15:38:26 +000014994
Neal Norwitzd24499d2005-12-18 21:36:39 +000014995SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14997$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014998for dir in $SRCDIRS; do
14999 if test ! -d $dir; then
15000 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015001 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015002done
Matthias Kloseb9621712010-04-24 17:59:49 +000015003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15004$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015005
Stefan Krah1919b7e2012-03-21 18:25:23 +010015006# Availability of -O2:
15007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15008$as_echo_n "checking for -O2... " >&6; }
15009saved_cflags="$CFLAGS"
15010CFLAGS="-O2"
15011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15012/* end confdefs.h. */
15013
15014int
15015main ()
15016{
15017
15018
15019 ;
15020 return 0;
15021}
15022_ACEOF
15023if ac_fn_c_try_compile "$LINENO"; then :
15024 have_O2=yes
15025else
15026 have_O2=no
15027fi
15028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15030$as_echo "$have_O2" >&6; }
15031CFLAGS="$saved_cflags"
15032
15033# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15034# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15036$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15037saved_cflags="$CFLAGS"
15038CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15039if test "$have_O2" = no; then
15040 CFLAGS=""
15041fi
15042if test "$cross_compiling" = yes; then :
15043 have_glibc_memmove_bug=undefined
15044else
15045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15046/* end confdefs.h. */
15047
15048#include <stdio.h>
15049#include <stdlib.h>
15050#include <string.h>
15051void foo(void *p, void *q) { memmove(p, q, 19); }
15052int main() {
15053 char a[32] = "123456789000000000";
15054 foo(&a[9], a);
15055 if (strcmp(a, "123456789123456789000000000") != 0)
15056 return 1;
15057 foo(a, &a[9]);
15058 if (strcmp(a, "123456789000000000") != 0)
15059 return 1;
15060 return 0;
15061}
15062
15063_ACEOF
15064if ac_fn_c_try_run "$LINENO"; then :
15065 have_glibc_memmove_bug=no
15066else
15067 have_glibc_memmove_bug=yes
15068fi
15069rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15070 conftest.$ac_objext conftest.beam conftest.$ac_ext
15071fi
15072
15073CFLAGS="$saved_cflags"
15074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15075$as_echo "$have_glibc_memmove_bug" >&6; }
15076if test "$have_glibc_memmove_bug" = yes; then
15077
15078$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15079
15080fi
15081
15082if test "$have_gcc_asm_for_x87" = yes; then
15083 # Some versions of gcc miscompile inline asm:
15084 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15085 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15086 case $CC in
15087 *gcc*)
15088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15089$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15090 saved_cflags="$CFLAGS"
15091 CFLAGS="-O2"
15092 if test "$cross_compiling" = yes; then :
15093 have_ipa_pure_const_bug=undefined
15094else
15095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15096/* end confdefs.h. */
15097
15098 __attribute__((noinline)) int
15099 foo(int *p) {
15100 int r;
15101 asm ( "movl \$6, (%1)\n\t"
15102 "xorl %0, %0\n\t"
15103 : "=r" (r) : "r" (p) : "memory"
15104 );
15105 return r;
15106 }
15107 int main() {
15108 int p = 8;
15109 if ((foo(&p) ? : p) != 6)
15110 return 1;
15111 return 0;
15112 }
15113
15114_ACEOF
15115if ac_fn_c_try_run "$LINENO"; then :
15116 have_ipa_pure_const_bug=no
15117else
15118 have_ipa_pure_const_bug=yes
15119fi
15120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15121 conftest.$ac_objext conftest.beam conftest.$ac_ext
15122fi
15123
15124 CFLAGS="$saved_cflags"
15125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15126$as_echo "$have_ipa_pure_const_bug" >&6; }
15127 if test "$have_ipa_pure_const_bug" = yes; then
15128
15129$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15130
15131 fi
15132 ;;
15133 esac
15134fi
15135
Guido van Rossum627b2d71993-12-24 10:39:16 +000015136# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015137ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015138
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015139ac_config_files="$ac_config_files Modules/ld_so_aix"
15140
Martin v. Löwis11437992002-04-12 09:54:03 +000015141cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015142# This file is a shell script that caches the results of configure
15143# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015144# scripts and configure runs, see configure's option --config-cache.
15145# It is not useful on other systems. If it contains results you don't
15146# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015147#
Martin v. Löwis11437992002-04-12 09:54:03 +000015148# config.status only pays attention to the cache file if you give it
15149# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015150#
Skip Montanaro6dead952003-09-25 14:50:04 +000015151# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015152# loading this file, other *unset* `ac_cv_foo' will be assigned the
15153# following values.
15154
15155_ACEOF
15156
Guido van Rossumf78abae1997-01-21 22:02:36 +000015157# The following way of writing the cache mishandles newlines in values,
15158# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015159# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015160# Ultrix sh set writes to stderr and can't be redirected directly,
15161# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162(
15163 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15164 eval ac_val=\$$ac_var
15165 case $ac_val in #(
15166 *${as_nl}*)
15167 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15169$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170 esac
15171 case $ac_var in #(
15172 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015173 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15174 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015175 esac ;;
15176 esac
15177 done
15178
Martin v. Löwis11437992002-04-12 09:54:03 +000015179 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15181 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015182 # `set' does not quote correctly, so add quotes: double-quote
15183 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015185 "s/'/'\\\\''/g;
15186 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015187 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 *)
15189 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015191 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192 esac |
15193 sort
15194) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015198 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015199 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15200 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015201 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15202 :end' >>confcache
15203if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15204 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015205 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015206 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15207$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015208 if test ! -f "$cache_file" || test -h "$cache_file"; then
15209 cat confcache >"$cache_file"
15210 else
15211 case $cache_file in #(
15212 */* | ?:*)
15213 mv -f confcache "$cache_file"$$ &&
15214 mv -f "$cache_file"$$ "$cache_file" ;; #(
15215 *)
15216 mv -f confcache "$cache_file" ;;
15217 esac
15218 fi
15219 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015220 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015221 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15222$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015223 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015224fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015225rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015226
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015227test "x$prefix" = xNONE && prefix=$ac_default_prefix
15228# Let make expand exec_prefix.
15229test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015230
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015231DEFS=-DHAVE_CONFIG_H
15232
Skip Montanaro6dead952003-09-25 14:50:04 +000015233ac_libobjs=
15234ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015235U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015236for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15237 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015239 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015240 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15241 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15243 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015244done
15245LIBOBJS=$ac_libobjs
15246
15247LTLIBOBJS=$ac_ltlibobjs
15248
15249
Martin v. Löwis11437992002-04-12 09:54:03 +000015250
Matthias Kloseb9621712010-04-24 17:59:49 +000015251
Victor Stinnere0be4232011-10-25 13:06:09 +020015252: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015253ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015254ac_clean_files_save=$ac_clean_files
15255ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015256{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15257$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15258as_write_fail=0
15259cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015260#! $SHELL
15261# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015262# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015263# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015264# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015265
Martin v. Löwis11437992002-04-12 09:54:03 +000015266debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015267ac_cs_recheck=false
15268ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015269
Matthias Kloseb9621712010-04-24 17:59:49 +000015270SHELL=\${CONFIG_SHELL-$SHELL}
15271export SHELL
15272_ASEOF
15273cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15274## -------------------- ##
15275## M4sh Initialization. ##
15276## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278# Be more Bourne compatible
15279DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015280if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015281 emulate sh
15282 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015283 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015284 # is contrary to our usage. Disable this feature.
15285 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015286 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015287else
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 case `(set -o) 2>/dev/null` in #(
15289 *posix*) :
15290 set -o posix ;; #(
15291 *) :
15292 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015293esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015294fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015295
15296
Matthias Kloseb9621712010-04-24 17:59:49 +000015297as_nl='
15298'
15299export as_nl
15300# Printing a long string crashes Solaris 7 /usr/bin/printf.
15301as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15302as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15303as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15304# Prefer a ksh shell builtin over an external printf program on Solaris,
15305# but without wasting forks for bash or zsh.
15306if test -z "$BASH_VERSION$ZSH_VERSION" \
15307 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15308 as_echo='print -r --'
15309 as_echo_n='print -rn --'
15310elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15311 as_echo='printf %s\n'
15312 as_echo_n='printf %s'
15313else
15314 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15315 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15316 as_echo_n='/usr/ucb/echo -n'
15317 else
15318 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15319 as_echo_n_body='eval
15320 arg=$1;
15321 case $arg in #(
15322 *"$as_nl"*)
15323 expr "X$arg" : "X\\(.*\\)$as_nl";
15324 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15325 esac;
15326 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15327 '
15328 export as_echo_n_body
15329 as_echo_n='sh -c $as_echo_n_body as_echo'
15330 fi
15331 export as_echo_body
15332 as_echo='sh -c $as_echo_body as_echo'
15333fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015334
15335# The user is always right.
15336if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015337 PATH_SEPARATOR=:
15338 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15339 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15340 PATH_SEPARATOR=';'
15341 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015342fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015344
15345# IFS
15346# We need space, tab and new line, in precisely that order. Quoting is
15347# there to prevent editors from complaining about space-tab.
15348# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15349# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015350IFS=" "" $as_nl"
15351
15352# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015353as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015354case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355 *[\\/]* ) as_myself=$0 ;;
15356 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015357for as_dir in $PATH
15358do
15359 IFS=$as_save_IFS
15360 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15362 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015363IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015365 ;;
15366esac
15367# We did not find ourselves, most probably we were run as `sh COMMAND'
15368# in which case we are not to be found in the path.
15369if test "x$as_myself" = x; then
15370 as_myself=$0
15371fi
15372if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15374 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375fi
15376
Matthias Kloseb9621712010-04-24 17:59:49 +000015377# Unset variables that we do not need and which cause bugs (e.g. in
15378# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15379# suppresses any "Segmentation fault" message there. '((' could
15380# trigger a bug in pdksh 5.2.14.
15381for as_var in BASH_ENV ENV MAIL MAILPATH
15382do eval test x\${$as_var+set} = xset \
15383 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384done
15385PS1='$ '
15386PS2='> '
15387PS4='+ '
15388
15389# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015390LC_ALL=C
15391export LC_ALL
15392LANGUAGE=C
15393export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394
Matthias Kloseb9621712010-04-24 17:59:49 +000015395# CDPATH.
15396(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15397
15398
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015399# as_fn_error STATUS ERROR [LINENO LOG_FD]
15400# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015401# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15402# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015403# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015404as_fn_error ()
15405{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015406 as_status=$1; test $as_status -eq 0 && as_status=1
15407 if test "$4"; then
15408 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15409 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015410 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015411 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015412 as_fn_exit $as_status
15413} # as_fn_error
15414
15415
15416# as_fn_set_status STATUS
15417# -----------------------
15418# Set $? to STATUS, without forking.
15419as_fn_set_status ()
15420{
15421 return $1
15422} # as_fn_set_status
15423
15424# as_fn_exit STATUS
15425# -----------------
15426# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15427as_fn_exit ()
15428{
15429 set +e
15430 as_fn_set_status $1
15431 exit $1
15432} # as_fn_exit
15433
15434# as_fn_unset VAR
15435# ---------------
15436# Portably unset VAR.
15437as_fn_unset ()
15438{
15439 { eval $1=; unset $1;}
15440}
15441as_unset=as_fn_unset
15442# as_fn_append VAR VALUE
15443# ----------------------
15444# Append the text in VALUE to the end of the definition contained in VAR. Take
15445# advantage of any shell optimizations that allow amortized linear growth over
15446# repeated appends, instead of the typical quadratic growth present in naive
15447# implementations.
15448if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15449 eval 'as_fn_append ()
15450 {
15451 eval $1+=\$2
15452 }'
15453else
15454 as_fn_append ()
15455 {
15456 eval $1=\$$1\$2
15457 }
15458fi # as_fn_append
15459
15460# as_fn_arith ARG...
15461# ------------------
15462# Perform arithmetic evaluation on the ARGs, and store the result in the
15463# global $as_val. Take advantage of shells that can avoid forks. The arguments
15464# must be portable across $(()) and expr.
15465if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15466 eval 'as_fn_arith ()
15467 {
15468 as_val=$(( $* ))
15469 }'
15470else
15471 as_fn_arith ()
15472 {
15473 as_val=`expr "$@" || test $? -eq 1`
15474 }
15475fi # as_fn_arith
15476
15477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015478if expr a : '\(a\)' >/dev/null 2>&1 &&
15479 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15480 as_expr=expr
15481else
15482 as_expr=false
15483fi
15484
15485if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15486 as_basename=basename
15487else
15488 as_basename=false
15489fi
15490
Matthias Kloseb9621712010-04-24 17:59:49 +000015491if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15492 as_dirname=dirname
15493else
15494 as_dirname=false
15495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015497as_me=`$as_basename -- "$0" ||
15498$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15499 X"$0" : 'X\(//\)$' \| \
15500 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015501$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015502 sed '/^.*\/\([^/][^/]*\)\/*$/{
15503 s//\1/
15504 q
15505 }
15506 /^X\/\(\/\/\)$/{
15507 s//\1/
15508 q
15509 }
15510 /^X\/\(\/\).*/{
15511 s//\1/
15512 q
15513 }
15514 s/.*/./; q'`
15515
Matthias Kloseb9621712010-04-24 17:59:49 +000015516# Avoid depending upon Character Ranges.
15517as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15518as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15519as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15520as_cr_digits='0123456789'
15521as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522
15523ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015524case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015525-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015526 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015527 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015528 xy) ECHO_C='\c';;
15529 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15530 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015531 esac;;
15532*)
15533 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015534esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015535
Martin v. Löwis11437992002-04-12 09:54:03 +000015536rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537if test -d conf$$.dir; then
15538 rm -f conf$$.dir/conf$$.file
15539else
15540 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015541 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015543if (echo >conf$$.file) 2>/dev/null; then
15544 if ln -s conf$$.file conf$$ 2>/dev/null; then
15545 as_ln_s='ln -s'
15546 # ... but there are two gotchas:
15547 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15548 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015549 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015550 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015551 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015552 elif ln conf$$.file conf$$ 2>/dev/null; then
15553 as_ln_s=ln
15554 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015555 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015557else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015558 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015560rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15561rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015562
Matthias Kloseb9621712010-04-24 17:59:49 +000015563
15564# as_fn_mkdir_p
15565# -------------
15566# Create "$as_dir" as a directory, including parents if necessary.
15567as_fn_mkdir_p ()
15568{
15569
15570 case $as_dir in #(
15571 -*) as_dir=./$as_dir;;
15572 esac
15573 test -d "$as_dir" || eval $as_mkdir_p || {
15574 as_dirs=
15575 while :; do
15576 case $as_dir in #(
15577 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15578 *) as_qdir=$as_dir;;
15579 esac
15580 as_dirs="'$as_qdir' $as_dirs"
15581 as_dir=`$as_dirname -- "$as_dir" ||
15582$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15583 X"$as_dir" : 'X\(//\)[^/]' \| \
15584 X"$as_dir" : 'X\(//\)$' \| \
15585 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15586$as_echo X"$as_dir" |
15587 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15588 s//\1/
15589 q
15590 }
15591 /^X\(\/\/\)[^/].*/{
15592 s//\1/
15593 q
15594 }
15595 /^X\(\/\/\)$/{
15596 s//\1/
15597 q
15598 }
15599 /^X\(\/\).*/{
15600 s//\1/
15601 q
15602 }
15603 s/.*/./; q'`
15604 test -d "$as_dir" && break
15605 done
15606 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015607 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015608
15609
15610} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015611if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015612 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015613else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015614 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015615 as_mkdir_p=false
15616fi
15617
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015618
15619# as_fn_executable_p FILE
15620# -----------------------
15621# Test if FILE is an executable regular file.
15622as_fn_executable_p ()
15623{
15624 test -f "$1" && test -x "$1"
15625} # as_fn_executable_p
15626as_test_x='test -x'
15627as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015628
15629# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015630as_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 +000015631
15632# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015633as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015634
15635
Martin v. Löwis11437992002-04-12 09:54:03 +000015636exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015637## ----------------------------------- ##
15638## Main body of $CONFIG_STATUS script. ##
15639## ----------------------------------- ##
15640_ASEOF
15641test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015642
Matthias Kloseb9621712010-04-24 17:59:49 +000015643cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15644# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015645# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015646# values after options handling.
15647ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015648This file was extended by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015649generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015650
15651 CONFIG_FILES = $CONFIG_FILES
15652 CONFIG_HEADERS = $CONFIG_HEADERS
15653 CONFIG_LINKS = $CONFIG_LINKS
15654 CONFIG_COMMANDS = $CONFIG_COMMANDS
15655 $ $0 $@
15656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657on `(hostname || uname -n) 2>/dev/null | sed 1q`
15658"
15659
Martin v. Löwis11437992002-04-12 09:54:03 +000015660_ACEOF
15661
Matthias Kloseb9621712010-04-24 17:59:49 +000015662case $ac_config_files in *"
15663"*) set x $ac_config_files; shift; ac_config_files=$*;;
15664esac
15665
15666case $ac_config_headers in *"
15667"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15668esac
15669
15670
15671cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015672# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015673config_files="$ac_config_files"
15674config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015676_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015677
Matthias Kloseb9621712010-04-24 17:59:49 +000015678cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015679ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015680\`$as_me' instantiates files and other configuration actions
15681from templates according to the current configuration. Unless the files
15682and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015683
Matthias Kloseb9621712010-04-24 17:59:49 +000015684Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015685
15686 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015687 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015688 --config print configuration, then exit
15689 -q, --quiet, --silent
15690 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015691 -d, --debug don't remove temporary files
15692 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015693 --file=FILE[:TEMPLATE]
15694 instantiate the configuration file FILE
15695 --header=FILE[:TEMPLATE]
15696 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015697
15698Configuration files:
15699$config_files
15700
15701Configuration headers:
15702$config_headers
15703
Matthias Kloseb9621712010-04-24 17:59:49 +000015704Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015707cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15708ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015709ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015710python config.status 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015711configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015712 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015713
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015714Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015715This config.status script is free software; the Free Software Foundation
15716gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717
15718ac_pwd='$ac_pwd'
15719srcdir='$srcdir'
15720INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015721MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015722test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015723_ACEOF
15724
Matthias Kloseb9621712010-04-24 17:59:49 +000015725cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15726# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015727ac_need_defaults=:
15728while test $# != 0
15729do
15730 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015731 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015732 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15733 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015734 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015735 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015736 --*=)
15737 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15738 ac_optarg=
15739 ac_shift=:
15740 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015741 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015742 ac_option=$1
15743 ac_optarg=$2
15744 ac_shift=shift
15745 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 esac
15747
Skip Montanaro6dead952003-09-25 14:50:04 +000015748 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015749 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015750 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15751 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015753 $as_echo "$ac_cs_version"; exit ;;
15754 --config | --confi | --conf | --con | --co | --c )
15755 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 debug=: ;;
15758 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015759 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015760 case $ac_optarg in
15761 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015762 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015763 esac
15764 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015765 ac_need_defaults=false;;
15766 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015767 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015768 case $ac_optarg in
15769 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15770 esac
15771 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015772 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773 --he | --h)
15774 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015775 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015776Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015778 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015779 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15780 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15781 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015782
15783 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015784 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015785Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015786
Matthias Kloseb9621712010-04-24 17:59:49 +000015787 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015788 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015789
15790 esac
15791 shift
15792done
15793
Skip Montanaro6dead952003-09-25 14:50:04 +000015794ac_configure_extra_args=
15795
15796if $ac_cs_silent; then
15797 exec 6>/dev/null
15798 ac_configure_extra_args="$ac_configure_extra_args --silent"
15799fi
15800
15801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015802cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015803if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015804 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015805 shift
15806 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15807 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015808 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015810fi
15811
Martin v. Löwis11437992002-04-12 09:54:03 +000015812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015813cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814exec 5>>config.log
15815{
15816 echo
15817 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15818## Running $as_me. ##
15819_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015820 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015821} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015824cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015826
Matthias Kloseb9621712010-04-24 17:59:49 +000015827cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015828
15829# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015830for ac_config_target in $ac_config_targets
15831do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015832 case $ac_config_target in
15833 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15834 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15835 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015836 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15837 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015838 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15839 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015840 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015841 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015842
Victor Stinnere0be4232011-10-25 13:06:09 +020015843 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015844 esac
15845done
15846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015847
Martin v. Löwis11437992002-04-12 09:54:03 +000015848# If the user did not use the arguments to specify the items to instantiate,
15849# then the envvar interface is used. Set only those that are not.
15850# We use the long form for the default assignment because of an extremely
15851# bizarre bug on SunOS 4.1.3.
15852if $ac_need_defaults; then
15853 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15854 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15855fi
15856
Skip Montanaro6dead952003-09-25 14:50:04 +000015857# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015858# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015859# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860# Hook for its removal unless debugging.
15861# Note that there is a small window in which the directory will not be cleaned:
15862# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015863$debug ||
15864{
Victor Stinnere0be4232011-10-25 13:06:09 +020015865 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015866 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015867 : "${ac_tmp:=$tmp}"
15868 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015869' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015870 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015871}
Martin v. Löwis11437992002-04-12 09:54:03 +000015872# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015873
Martin v. Löwis11437992002-04-12 09:54:03 +000015874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015875 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015876 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015877} ||
15878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015879 tmp=./conf$$-$RANDOM
15880 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015881} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015882ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015883
Matthias Kloseb9621712010-04-24 17:59:49 +000015884# Set up the scripts for CONFIG_FILES section.
15885# No need to generate them if there are no CONFIG_FILES.
15886# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015887if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015888
Matthias Kloseb9621712010-04-24 17:59:49 +000015889
15890ac_cr=`echo X | tr X '\015'`
15891# On cygwin, bash can eat \r inside `` if the user requested igncr.
15892# But we know of no other shell where ac_cr would be empty at this
15893# point, so we can use a bashism as a fallback.
15894if test "x$ac_cr" = x; then
15895 eval ac_cr=\$\'\\r\'
15896fi
15897ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15898if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015899 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015900else
15901 ac_cs_awk_cr=$ac_cr
15902fi
15903
Victor Stinnere0be4232011-10-25 13:06:09 +020015904echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015905_ACEOF
15906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015907
Matthias Kloseb9621712010-04-24 17:59:49 +000015908{
15909 echo "cat >conf$$subs.awk <<_ACEOF" &&
15910 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15911 echo "_ACEOF"
15912} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015913 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15914ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015915ac_delim='%!_!# '
15916for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015917 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015918 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015919
Matthias Kloseb9621712010-04-24 17:59:49 +000015920 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15921 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015922 break
15923 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015924 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015925 else
15926 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015927 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015928done
Matthias Kloseb9621712010-04-24 17:59:49 +000015929rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015930
Matthias Kloseb9621712010-04-24 17:59:49 +000015931cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015932cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015934sed -n '
15935h
15936s/^/S["/; s/!.*/"]=/
15937p
15938g
15939s/^[^!]*!//
15940:repl
15941t repl
15942s/'"$ac_delim"'$//
15943t delim
15944:nl
15945h
15946s/\(.\{148\}\)..*/\1/
15947t more1
15948s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15949p
15950n
15951b repl
15952:more1
15953s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15954p
15955g
15956s/.\{148\}//
15957t nl
15958:delim
15959h
15960s/\(.\{148\}\)..*/\1/
15961t more2
15962s/["\\]/\\&/g; s/^/"/; s/$/"/
15963p
15964b
15965:more2
15966s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15967p
15968g
15969s/.\{148\}//
15970t delim
15971' <conf$$subs.awk | sed '
15972/^[^""]/{
15973 N
15974 s/\n//
15975}
15976' >>$CONFIG_STATUS || ac_write_fail=1
15977rm -f conf$$subs.awk
15978cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15979_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015980cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015981 for (key in S) S_is_set[key] = 1
15982 FS = ""
15983
15984}
15985{
15986 line = $ 0
15987 nfields = split(line, field, "@")
15988 substed = 0
15989 len = length(field[1])
15990 for (i = 2; i < nfields; i++) {
15991 key = field[i]
15992 keylen = length(key)
15993 if (S_is_set[key]) {
15994 value = S[key]
15995 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15996 len += length(value) + length(field[++i])
15997 substed = 1
15998 } else
15999 len += 1 + keylen
16000 }
16001
16002 print line
16003}
16004
16005_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016007cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16008if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16009 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16010else
16011 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016012fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016013 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016014_ACEOF
16015
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016016# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16017# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016018# trailing colons and then remove the whole line if VPATH becomes empty
16019# (actually we leave an empty line to preserve line numbers).
16020if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016021 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16022h
16023s///
16024s/^/:/
16025s/[ ]*$/:/
16026s/:\$(srcdir):/:/g
16027s/:\${srcdir}:/:/g
16028s/:@srcdir@:/:/g
16029s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016030s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016031x
16032s/\(=[ ]*\).*/\1/
16033G
16034s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016035s/^[^=]*=[ ]*$//
16036}'
16037fi
16038
Matthias Kloseb9621712010-04-24 17:59:49 +000016039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016040fi # test -n "$CONFIG_FILES"
16041
Matthias Kloseb9621712010-04-24 17:59:49 +000016042# Set up the scripts for CONFIG_HEADERS section.
16043# No need to generate them if there are no CONFIG_HEADERS.
16044# This happens for instance with `./config.status Makefile'.
16045if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016046cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016047BEGIN {
16048_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016049
Matthias Kloseb9621712010-04-24 17:59:49 +000016050# Transform confdefs.h into an awk script `defines.awk', embedded as
16051# here-document in config.status, that substitutes the proper values into
16052# config.h.in to produce config.h.
16053
16054# Create a delimiter string that does not exist in confdefs.h, to ease
16055# handling of long lines.
16056ac_delim='%!_!# '
16057for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016058 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16059 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016060 break
16061 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016062 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016063 else
16064 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16065 fi
16066done
16067
16068# For the awk script, D is an array of macro values keyed by name,
16069# likewise P contains macro parameters if any. Preserve backslash
16070# newline sequences.
16071
16072ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16073sed -n '
16074s/.\{148\}/&'"$ac_delim"'/g
16075t rset
16076:rset
16077s/^[ ]*#[ ]*define[ ][ ]*/ /
16078t def
16079d
16080:def
16081s/\\$//
16082t bsnl
16083s/["\\]/\\&/g
16084s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16085D["\1"]=" \3"/p
16086s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16087d
16088:bsnl
16089s/["\\]/\\&/g
16090s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16091D["\1"]=" \3\\\\\\n"\\/p
16092t cont
16093s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16094t cont
16095d
16096:cont
16097n
16098s/.\{148\}/&'"$ac_delim"'/g
16099t clear
16100:clear
16101s/\\$//
16102t bsnlc
16103s/["\\]/\\&/g; s/^/"/; s/$/"/p
16104d
16105:bsnlc
16106s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16107b cont
16108' <confdefs.h | sed '
16109s/'"$ac_delim"'/"\\\
16110"/g' >>$CONFIG_STATUS || ac_write_fail=1
16111
16112cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16113 for (key in D) D_is_set[key] = 1
16114 FS = ""
16115}
16116/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16117 line = \$ 0
16118 split(line, arg, " ")
16119 if (arg[1] == "#") {
16120 defundef = arg[2]
16121 mac1 = arg[3]
16122 } else {
16123 defundef = substr(arg[1], 2)
16124 mac1 = arg[2]
16125 }
16126 split(mac1, mac2, "(") #)
16127 macro = mac2[1]
16128 prefix = substr(line, 1, index(line, defundef) - 1)
16129 if (D_is_set[macro]) {
16130 # Preserve the white space surrounding the "#".
16131 print prefix "define", macro P[macro] D[macro]
16132 next
16133 } else {
16134 # Replace #undef with comments. This is necessary, for example,
16135 # in the case of _POSIX_SOURCE, which is predefined and required
16136 # on some systems where configure will not decide to define it.
16137 if (defundef == "undef") {
16138 print "/*", prefix defundef, macro, "*/"
16139 next
16140 }
16141 }
16142}
16143{ print }
16144_ACAWK
16145_ACEOF
16146cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016147 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016148fi # test -n "$CONFIG_HEADERS"
16149
16150
16151eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16152shift
16153for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016154do
16155 case $ac_tag in
16156 :[FHLC]) ac_mode=$ac_tag; continue;;
16157 esac
16158 case $ac_mode$ac_tag in
16159 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016160 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016161 :[FH]-) ac_tag=-:-;;
16162 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16163 esac
16164 ac_save_IFS=$IFS
16165 IFS=:
16166 set x $ac_tag
16167 IFS=$ac_save_IFS
16168 shift
16169 ac_file=$1
16170 shift
16171
16172 case $ac_mode in
16173 :L) ac_source=$1;;
16174 :[FH])
16175 ac_file_inputs=
16176 for ac_f
16177 do
16178 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016179 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180 *) # Look for the file first in the build tree, then in the source tree
16181 # (if the path is not absolute). The absolute path cannot be DOS-style,
16182 # because $ac_f cannot contain `:'.
16183 test -f "$ac_f" ||
16184 case $ac_f in
16185 [\\/$]*) false;;
16186 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16187 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016188 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016189 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016190 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16191 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016192 done
16193
16194 # Let's still pretend it is `configure' which instantiates (i.e., don't
16195 # use $as_me), people would be surprised to read:
16196 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016197 configure_input='Generated from '`
16198 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16199 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016200 if test x"$ac_file" != x-; then
16201 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016202 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16203$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016204 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016205 # Neutralize special characters interpreted by sed in replacement strings.
16206 case $configure_input in #(
16207 *\&* | *\|* | *\\* )
16208 ac_sed_conf_input=`$as_echo "$configure_input" |
16209 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16210 *) ac_sed_conf_input=$configure_input;;
16211 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212
16213 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016214 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16215 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016216 esac
16217 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016218 esac
16219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016220 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016221$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016222 X"$ac_file" : 'X\(//\)[^/]' \| \
16223 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016225$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016226 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16227 s//\1/
16228 q
16229 }
16230 /^X\(\/\/\)[^/].*/{
16231 s//\1/
16232 q
16233 }
16234 /^X\(\/\/\)$/{
16235 s//\1/
16236 q
16237 }
16238 /^X\(\/\).*/{
16239 s//\1/
16240 q
16241 }
16242 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016243 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016244 ac_builddir=.
16245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016246case "$ac_dir" in
16247.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16248*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016249 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016250 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016251 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252 case $ac_top_builddir_sub in
16253 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16254 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16255 esac ;;
16256esac
16257ac_abs_top_builddir=$ac_pwd
16258ac_abs_builddir=$ac_pwd$ac_dir_suffix
16259# for backward compatibility:
16260ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016261
16262case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016264 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016265 ac_top_srcdir=$ac_top_builddir_sub
16266 ac_abs_top_srcdir=$ac_pwd ;;
16267 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269 ac_top_srcdir=$srcdir
16270 ac_abs_top_srcdir=$srcdir ;;
16271 *) # Relative name.
16272 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16273 ac_top_srcdir=$ac_top_build_prefix$srcdir
16274 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016275esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016277
Martin v. Löwis11437992002-04-12 09:54:03 +000016278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016279 case $ac_mode in
16280 :F)
16281 #
16282 # CONFIG_FILE
16283 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016284
16285 case $INSTALL in
16286 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016287 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016288 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016289 ac_MKDIR_P=$MKDIR_P
16290 case $MKDIR_P in
16291 [\\/$]* | ?:[\\/]* ) ;;
16292 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16293 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016294_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016295
Matthias Kloseb9621712010-04-24 17:59:49 +000016296cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016297# If the template does not know about datarootdir, expand it.
16298# FIXME: This hack should be removed a few years after 2.60.
16299ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016300ac_sed_dataroot='
16301/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016302 p
16303 q
16304}
16305/@datadir@/p
16306/@docdir@/p
16307/@infodir@/p
16308/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016309/@mandir@/p'
16310case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016311*datarootdir*) ac_datarootdir_seen=yes;;
16312*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016313 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16314$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016316cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016317 ac_datarootdir_hack='
16318 s&@datadir@&$datadir&g
16319 s&@docdir@&$docdir&g
16320 s&@infodir@&$infodir&g
16321 s&@localedir@&$localedir&g
16322 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016323 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016324esac
16325_ACEOF
16326
16327# Neutralize VPATH when `$srcdir' = `.'.
16328# Shell code in configure.ac might set extrasub.
16329# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016330cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16331ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016332$extrasub
16333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016334cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016335:t
16336/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016337s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016338s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016339s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340s&@srcdir@&$ac_srcdir&;t t
16341s&@abs_srcdir@&$ac_abs_srcdir&;t t
16342s&@top_srcdir@&$ac_top_srcdir&;t t
16343s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16344s&@builddir@&$ac_builddir&;t t
16345s&@abs_builddir@&$ac_abs_builddir&;t t
16346s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16347s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016348s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016349$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016350"
Victor Stinnere0be4232011-10-25 13:06:09 +020016351eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16352 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016354test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016355 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16356 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16357 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016358 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016359which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016360$as_echo "$as_me: 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" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016362
Victor Stinnere0be4232011-10-25 13:06:09 +020016363 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016364 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016365 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16366 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016367 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016368 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016369 ;;
16370 :H)
16371 #
16372 # CONFIG_HEADER
16373 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016374 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016375 {
16376 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016377 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16378 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016379 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016380 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016381 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16382$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016383 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016384 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016385 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016386 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 fi
16388 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016389 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016390 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016391 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016392 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016393 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395
16396 esac
16397
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016398
16399 case $ac_file$ac_mode in
16400 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16401
16402 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016403done # for ac_tag
16404
Guido van Rossum627b2d71993-12-24 10:39:16 +000016405
Matthias Kloseb9621712010-04-24 17:59:49 +000016406as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016407_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016408ac_clean_files=$ac_clean_files_save
16409
Matthias Kloseb9621712010-04-24 17:59:49 +000016410test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016411 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016412
Martin v. Löwis11437992002-04-12 09:54:03 +000016413
16414# configure is writing to config.log, and then calls config.status.
16415# config.status does its own redirection, appending to config.log.
16416# Unfortunately, on DOS this fails, as config.log is still kept open
16417# by configure, so config.status won't be able to write to it; its
16418# output is simply discarded. So we exec the FD to /dev/null,
16419# effectively closing config.log, so it can be properly (re)opened and
16420# appended to by config.status. When coming back to configure, we
16421# need to make the FD available again.
16422if test "$no_create" != yes; then
16423 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016424 ac_config_status_args=
16425 test "$silent" = yes &&
16426 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016427 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016428 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016429 exec 5>>config.log
16430 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16431 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016432 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016433fi
16434if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16435 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16436$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016437fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016438
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016439
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016440echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016441if test ! -f Modules/Setup
16442then
16443 cp $srcdir/Modules/Setup.dist Modules/Setup
16444fi
16445
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016446echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016447if test ! -f Modules/Setup.local
16448then
16449 echo "# Edit this file for local setup changes" >Modules/Setup.local
16450fi
16451
16452echo "creating Makefile"
16453$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16454 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016455 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016456mv config.c Modules