blob: 53d38908af4e1c69edb1f447b13d54141b77c11b [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ross Lagerwall2bb842a2012-10-29 17:39:19 +00003# Generated by GNU Autoconf 2.69 for python 3.4.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: http://bugs.python.org/ about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Georg Brandl08a90122012-09-29 09:34:13 +0200583PACKAGE_VERSION='3.4'
584PACKAGE_STRING='python 3.4'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000626SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000627THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100628LIBPL
629PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700630EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000631SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000632LIBC
633LIBM
634HAVE_GETHOSTBYNAME
635HAVE_GETHOSTBYNAME_R
636HAVE_GETHOSTBYNAME_R_3_ARG
637HAVE_GETHOSTBYNAME_R_5_ARG
638HAVE_GETHOSTBYNAME_R_6_ARG
639LIBOBJS
640TRUE
641MACHDEP_OBJS
642DYNLOADFILE
643DLINCLDIR
644THREADOBJ
645LDLAST
646USE_THREAD_MODULE
647SIGNAL_OBJS
648USE_SIGNAL_MODULE
649LIBFFI_INCLUDEDIR
650PKG_CONFIG
651SHLIBS
652CFLAGSFORSHARED
653LINKFORSHARED
654CCSHARED
655BLDSHARED
656LDCXXSHARED
657LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700658SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000659LIBTOOL_CRUFT
660OTHER_LIBTOOL_OPT
661UNIVERSAL_ARCH_FLAGS
662BASECFLAGS
663OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000664ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000665LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100666MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000667INSTALL_DATA
668INSTALL_SCRIPT
669INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200670PYTHON
671ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200672ac_ct_READELF
673READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000674ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200675ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000676AR
677RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000678USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000679GNULD
680LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000681LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000682RUNSHARED
683INSTSONAME
684LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000685PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000686BLDLIBRARY
687DLLLIBRARY
688LDLIBRARY
689LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100690MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000691BUILDEXEEXT
692EGREP
693GREP
694CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200695NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000697MAINCC
698CXX
699OBJEXT
700EXEEXT
701ac_ct_CC
702CPPFLAGS
703LDFLAGS
704CFLAGS
705CC
706EXPORT_MACOSX_DEPLOYMENT_TARGET
707CONFIGURE_MACOSX_DEPLOYMENT_TARGET
708SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200709_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000710MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000711FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000712FRAMEWORKUNIXTOOLSPREFIX
713FRAMEWORKALTINSTALLLAST
714FRAMEWORKALTINSTALLFIRST
715FRAMEWORKINSTALLLAST
716FRAMEWORKINSTALLFIRST
717PYTHONFRAMEWORKINSTALLDIR
718PYTHONFRAMEWORKPREFIX
719PYTHONFRAMEWORKDIR
720PYTHONFRAMEWORKIDENTIFIER
721PYTHONFRAMEWORK
722LIPO_32BIT_FLAGS
723ARCH_RUN_32BIT
724UNIVERSALSDK
725CONFIG_ARGS
726SOVERSION
727VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200728PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100729host_os
730host_vendor
731host_cpu
732host
733build_os
734build_vendor
735build_cpu
736build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500737HAS_HG
738HGBRANCH
739HGTAG
740HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400741BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000742target_alias
743host_alias
744build_alias
745LIBS
746ECHO_T
747ECHO_N
748ECHO_C
749DEFS
750mandir
751localedir
752libdir
753psdir
754pdfdir
755dvidir
756htmldir
757infodir
758docdir
759oldincludedir
760includedir
761localstatedir
762sharedstatedir
763sysconfdir
764datadir
765datarootdir
766libexecdir
767sbindir
768bindir
769program_transform_name
770prefix
771exec_prefix
772PACKAGE_URL
773PACKAGE_BUGREPORT
774PACKAGE_STRING
775PACKAGE_VERSION
776PACKAGE_TARNAME
777PACKAGE_NAME
778PATH_SEPARATOR
779SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000780ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000781ac_user_opts='
782enable_option_checking
783enable_universalsdk
784with_universal_archs
785with_framework_name
786enable_framework
787with_gcc
788with_cxx_main
789with_suffix
790enable_shared
791enable_profiling
792with_pydebug
793with_libs
794with_system_expat
795with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100796with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000797enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000798with_dbmliborder
799with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000800with_threads
801with_thread
802enable_ipv6
803with_doc_strings
804with_tsc
805with_pymalloc
806with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_fpectl
808with_libm
809with_libc
810enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_computed_gotos
812'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813 ac_precious_vars='build_alias
814host_alias
815target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100816MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817CC
818CFLAGS
819LDFLAGS
820LIBS
821CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200822CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000823
Guido van Rossum627b2d71993-12-24 10:39:16 +0000824
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000826ac_init_help=
827ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000828ac_unrecognized_opts=
829ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830# The variables have the same names as the options, with
831# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000832cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000833exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835no_recursion=
836prefix=NONE
837program_prefix=NONE
838program_suffix=NONE
839program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844x_includes=NONE
845x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000846
847# Installation directory options.
848# These are left unexpanded so users can "make install exec_prefix=/foo"
849# and all the variables that are supposed to be based on exec_prefix
850# by default will actually change.
851# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000853bindir='${exec_prefix}/bin'
854sbindir='${exec_prefix}/sbin'
855libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856datarootdir='${prefix}/share'
857datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858sysconfdir='${prefix}/etc'
859sharedstatedir='${prefix}/com'
860localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861includedir='${prefix}/include'
862oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
864infodir='${datarootdir}/info'
865htmldir='${docdir}'
866dvidir='${docdir}'
867pdfdir='${docdir}'
868psdir='${docdir}'
869libdir='${exec_prefix}/lib'
870localedir='${datarootdir}/locale'
871mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000876do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 # If the previous option needs an argument, assign it.
878 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 ac_prev=
881 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000882 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200885 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
886 *=) ac_optarg= ;;
887 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Accept the important Cygnus configure options, so we can diagnose typos.
891
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892 case $ac_dashdash$ac_option in
893 --)
894 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896 -bindir | --bindir | --bindi | --bind | --bin | --bi)
897 ac_prev=bindir ;;
898 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900
901 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000903 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906 -cache-file | --cache-file | --cache-fil | --cache-fi \
907 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
908 ac_prev=cache_file ;;
909 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
910 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000911 cache_file=$ac_optarg ;;
912
913 --config-cache | -C)
914 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
922 | --dataroo | --dataro | --datar)
923 ac_prev=datarootdir ;;
924 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
925 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
926 datarootdir=$ac_optarg ;;
927
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000929 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000931 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200932 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000933 ac_useropt_orig=$ac_useropt
934 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
935 case $ac_user_opts in
936 *"
937"enable_$ac_useropt"
938"*) ;;
939 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
940 ac_unrecognized_sep=', ';;
941 esac
942 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000943
944 -docdir | --docdir | --docdi | --doc | --do)
945 ac_prev=docdir ;;
946 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
947 docdir=$ac_optarg ;;
948
949 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
950 ac_prev=dvidir ;;
951 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
952 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000955 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000957 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200958 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 ac_useropt_orig=$ac_useropt
960 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
961 case $ac_user_opts in
962 *"
963"enable_$ac_useropt"
964"*) ;;
965 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
966 ac_unrecognized_sep=', ';;
967 esac
968 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
971 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
972 | --exec | --exe | --ex)
973 ac_prev=exec_prefix ;;
974 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
975 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
976 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
979 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000980 # Obsolete; use --with-gas.
981 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 -help | --help | --hel | --he | -h)
984 ac_init_help=long ;;
985 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
986 ac_init_help=recursive ;;
987 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
988 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000995 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
996 ac_prev=htmldir ;;
997 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
998 | --ht=*)
999 htmldir=$ac_optarg ;;
1000
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001001 -includedir | --includedir | --includedi | --included | --include \
1002 | --includ | --inclu | --incl | --inc)
1003 ac_prev=includedir ;;
1004 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1005 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007
1008 -infodir | --infodir | --infodi | --infod | --info | --inf)
1009 ac_prev=infodir ;;
1010 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
1013 -libdir | --libdir | --libdi | --libd)
1014 ac_prev=libdir ;;
1015 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
1018 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1019 | --libexe | --libex | --libe)
1020 ac_prev=libexecdir ;;
1021 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1022 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001025 -localedir | --localedir | --localedi | --localed | --locale)
1026 ac_prev=localedir ;;
1027 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1028 localedir=$ac_optarg ;;
1029
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001031 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032 ac_prev=localstatedir ;;
1033 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
1037 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1038 ac_prev=mandir ;;
1039 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001043 # Obsolete; use --without-fp.
1044 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045
1046 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048 no_create=yes ;;
1049
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001050 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1051 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1052 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1055 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1056 | --oldin | --oldi | --old | --ol | --o)
1057 ac_prev=oldincludedir ;;
1058 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1059 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1060 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1064 ac_prev=prefix ;;
1065 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1069 | --program-pre | --program-pr | --program-p)
1070 ac_prev=program_prefix ;;
1071 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1072 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1076 | --program-suf | --program-su | --program-s)
1077 ac_prev=program_suffix ;;
1078 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1079 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -program-transform-name | --program-transform-name \
1083 | --program-transform-nam | --program-transform-na \
1084 | --program-transform-n | --program-transform- \
1085 | --program-transform | --program-transfor \
1086 | --program-transfo | --program-transf \
1087 | --program-trans | --program-tran \
1088 | --progr-tra | --program-tr | --program-t)
1089 ac_prev=program_transform_name ;;
1090 -program-transform-name=* | --program-transform-name=* \
1091 | --program-transform-nam=* | --program-transform-na=* \
1092 | --program-transform-n=* | --program-transform-=* \
1093 | --program-transform=* | --program-transfor=* \
1094 | --program-transfo=* | --program-transf=* \
1095 | --program-trans=* | --program-tran=* \
1096 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001099 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1100 ac_prev=pdfdir ;;
1101 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1102 pdfdir=$ac_optarg ;;
1103
1104 -psdir | --psdir | --psdi | --psd | --ps)
1105 ac_prev=psdir ;;
1106 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1107 psdir=$ac_optarg ;;
1108
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1110 | -silent | --silent | --silen | --sile | --sil)
1111 silent=yes ;;
1112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1114 ac_prev=sbindir ;;
1115 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1116 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118
1119 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1120 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1121 | --sharedst | --shareds | --shared | --share | --shar \
1122 | --sha | --sh)
1123 ac_prev=sharedstatedir ;;
1124 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1125 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1126 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1127 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001129
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130 -site | --site | --sit)
1131 ac_prev=site ;;
1132 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1136 ac_prev=srcdir ;;
1137 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001140 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1141 | --syscon | --sysco | --sysc | --sys | --sy)
1142 ac_prev=sysconfdir ;;
1143 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1144 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
1152 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1153 verbose=yes ;;
1154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 -version | --version | --versio | --versi | --vers | -V)
1156 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
1158 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001159 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001160 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001162 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 ac_useropt_orig=$ac_useropt
1164 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1165 case $ac_user_opts in
1166 *"
1167"with_$ac_useropt"
1168"*) ;;
1169 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1170 ac_unrecognized_sep=', ';;
1171 esac
1172 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
1174 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001178 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 ac_useropt_orig=$ac_useropt
1180 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1181 case $ac_user_opts in
1182 *"
1183"with_$ac_useropt"
1184"*) ;;
1185 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1186 ac_unrecognized_sep=', ';;
1187 esac
1188 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001190 --x)
1191 # Obsolete; use --with-x.
1192 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1195 | --x-incl | --x-inc | --x-in | --x-i)
1196 ac_prev=x_includes ;;
1197 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1198 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1202 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1203 ac_prev=x_libraries ;;
1204 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1205 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001208 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1209Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210 ;;
1211
Martin v. Löwis11437992002-04-12 09:54:03 +00001212 *=*)
1213 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1214 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 case $ac_envvar in #(
1216 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001217 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001219 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 export $ac_envvar ;;
1221
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001222 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001223 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001227 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228 ;;
1229
1230 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231done
1232
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001235 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236fi
1237
Matthias Kloseb9621712010-04-24 17:59:49 +00001238if test -n "$ac_unrecognized_opts"; then
1239 case $enable_option_checking in
1240 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001241 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001242 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1243 esac
1244fi
1245
1246# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1248 datadir sysconfdir sharedstatedir localstatedir includedir \
1249 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1250 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001251do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001252 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 # Remove trailing slashes.
1254 case $ac_val in
1255 */ )
1256 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1257 eval $ac_var=\$ac_val;;
1258 esac
1259 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 [\\/$]* | ?:[\\/]* ) continue;;
1262 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001264 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001265done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266
Martin v. Löwis11437992002-04-12 09:54:03 +00001267# There might be people who depend on the old broken behavior: `$host'
1268# used to hold the argument of --host etc.
1269# FIXME: To remove some day.
1270build=$build_alias
1271host=$host_alias
1272target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273
Martin v. Löwis11437992002-04-12 09:54:03 +00001274# FIXME: To remove some day.
1275if test "x$host_alias" != x; then
1276 if test "x$build_alias" = x; then
1277 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001278 elif test "x$build_alias" != "x$host_alias"; then
1279 cross_compiling=yes
1280 fi
1281fi
1282
1283ac_tool_prefix=
1284test -n "$host_alias" && ac_tool_prefix=$host_alias-
1285
1286test "$silent" = yes && exec 6>/dev/null
1287
Guido van Rossum627b2d71993-12-24 10:39:16 +00001288
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289ac_pwd=`pwd` && test -n "$ac_pwd" &&
1290ac_ls_di=`ls -di .` &&
1291ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001292 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001294 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295
1296
Guido van Rossum627b2d71993-12-24 10:39:16 +00001297# Find the source files, if location was not specified.
1298if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001299 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001301 ac_confdir=`$as_dirname -- "$as_myself" ||
1302$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1303 X"$as_myself" : 'X\(//\)[^/]' \| \
1304 X"$as_myself" : 'X\(//\)$' \| \
1305 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1306$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1308 s//\1/
1309 q
1310 }
1311 /^X\(\/\/\)[^/].*/{
1312 s//\1/
1313 q
1314 }
1315 /^X\(\/\/\)$/{
1316 s//\1/
1317 q
1318 }
1319 /^X\(\/\).*/{
1320 s//\1/
1321 q
1322 }
1323 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001324 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326 srcdir=..
1327 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001328else
1329 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331if test ! -r "$srcdir/$ac_unique_file"; then
1332 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1336ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001337 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338 pwd)`
1339# When building in place, set srcdir=.
1340if test "$ac_abs_confdir" = "$ac_pwd"; then
1341 srcdir=.
1342fi
1343# Remove unnecessary trailing slashes from srcdir.
1344# Double slashes in file names in object file debugging info
1345# mess up M-x gdb in Emacs.
1346case $srcdir in
1347*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1348esac
1349for ac_var in $ac_precious_vars; do
1350 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1351 eval ac_env_${ac_var}_value=\$${ac_var}
1352 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1353 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1354done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001355
Martin v. Löwis11437992002-04-12 09:54:03 +00001356#
1357# Report the --help message.
1358#
1359if test "$ac_init_help" = "long"; then
1360 # Omit some internal or obsolete options to make the list less imposing.
1361 # This message is too long to be a string in the A/UX 3.1 sh.
1362 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001363\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001364
1365Usage: $0 [OPTION]... [VAR=VALUE]...
1366
1367To assign environment variables (e.g., CC, CFLAGS...), specify them as
1368VAR=VALUE. See below for descriptions of some of the useful variables.
1369
1370Defaults for the options are specified in brackets.
1371
1372Configuration:
1373 -h, --help display this help and exit
1374 --help=short display options specific to this package
1375 --help=recursive display the short help of all the included packages
1376 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001377 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 --cache-file=FILE cache test results in FILE [disabled]
1379 -C, --config-cache alias for \`--cache-file=config.cache'
1380 -n, --no-create do not create output files
1381 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1382
Martin v. Löwis11437992002-04-12 09:54:03 +00001383Installation directories:
1384 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001385 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001387 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001388
1389By default, \`make install' will install all the files in
1390\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1391an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1392for instance \`--prefix=\$HOME'.
1393
1394For better control, use the options below.
1395
1396Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001397 --bindir=DIR user executables [EPREFIX/bin]
1398 --sbindir=DIR system admin executables [EPREFIX/sbin]
1399 --libexecdir=DIR program executables [EPREFIX/libexec]
1400 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1401 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1402 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1403 --libdir=DIR object code libraries [EPREFIX/lib]
1404 --includedir=DIR C header files [PREFIX/include]
1405 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1406 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1407 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1408 --infodir=DIR info documentation [DATAROOTDIR/info]
1409 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1410 --mandir=DIR man documentation [DATAROOTDIR/man]
1411 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1412 --htmldir=DIR html documentation [DOCDIR]
1413 --dvidir=DIR dvi documentation [DOCDIR]
1414 --pdfdir=DIR pdf documentation [DOCDIR]
1415 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001416_ACEOF
1417
1418 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001419
1420System types:
1421 --build=BUILD configure for building on BUILD [guessed]
1422 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001423_ACEOF
1424fi
1425
1426if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001427 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001428 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001429 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 cat <<\_ACEOF
1431
1432Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1435 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001436 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001437 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --enable-framework[=INSTALLDIR]
1439 Build (MacOSX|Darwin) framework
1440 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001441 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001442 --enable-loadable-sqlite-extensions
1443 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001444 --enable-ipv6 Enable ipv6 (with ipv4) support
1445 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001446 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001447 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001448
1449Optional Packages:
1450 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1451 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001452 --with-universal-archs=ARCH
1453 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001454 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001455 --with-framework-name=FRAMEWORK
1456 specify an alternate name of the framework built
1457 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001458 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001459 --with-cxx-main=<compiler>
1460 compile main() and link python executable with C++
1461 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --with-suffix=.exe set executable suffix
1463 --with-pydebug build with Py_DEBUG defined
1464 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001465 --with-system-expat build pyexpat module using an installed expat
1466 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001467 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001468 --with-system-libmpdec build _decimal module using an installed libmpdec
1469 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001470 --with-dbmliborder=db1:db2:...
1471 order to check db backends for dbm. Valid value is a
1472 colon separated string with the backend names
1473 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --with(out)-threads[=DIRECTORY]
1476 disable/enable thread support
1477 --with(out)-thread[=DIRECTORY]
1478 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001480 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001482 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --with-fpectl enable SIGFPE catching
1484 --with-libm=STRING math library
1485 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001486 --with(out)-computed-gotos
1487 Use computed gotos in evaluation loop (enabled by
1488 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001489
1490Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001491 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 CC C compiler command
1493 CFLAGS C compiler flags
1494 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1495 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001497 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001498 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001499 CPP C preprocessor
1500
1501Use these variables to override the choices made by `configure' or to help
1502it to find libraries and programs with nonstandard names/locations.
1503
Georg Brandle2e15612009-05-20 18:25:10 +00001504Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001505_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001507fi
1508
1509if test "$ac_init_help" = "recursive"; then
1510 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001512 test -d "$ac_dir" ||
1513 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1514 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 ac_builddir=.
1516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517case "$ac_dir" in
1518.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1519*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001520 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001522 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523 case $ac_top_builddir_sub in
1524 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1525 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1526 esac ;;
1527esac
1528ac_abs_top_builddir=$ac_pwd
1529ac_abs_builddir=$ac_pwd$ac_dir_suffix
1530# for backward compatibility:
1531ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001532
1533case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001535 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001536 ac_top_srcdir=$ac_top_builddir_sub
1537 ac_abs_top_srcdir=$ac_pwd ;;
1538 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001539 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001540 ac_top_srcdir=$srcdir
1541 ac_abs_top_srcdir=$srcdir ;;
1542 *) # Relative name.
1543 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1544 ac_top_srcdir=$ac_top_build_prefix$srcdir
1545 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001546esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549 cd "$ac_dir" || { ac_status=$?; continue; }
1550 # Check for guested configure.
1551 if test -f "$ac_srcdir/configure.gnu"; then
1552 echo &&
1553 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1554 elif test -f "$ac_srcdir/configure"; then
1555 echo &&
1556 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001557 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001558 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559 fi || ac_status=$?
1560 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 done
1562fi
1563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001565if $ac_init_version; then
1566 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001567python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001568generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001569
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001570Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001571This configure script is free software; the Free Software Foundation
1572gives unlimited permission to copy, distribute and modify it.
1573_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001576
1577## ------------------------ ##
1578## Autoconf initialization. ##
1579## ------------------------ ##
1580
1581# ac_fn_c_try_compile LINENO
1582# --------------------------
1583# Try to compile conftest.$ac_ext, and return whether this succeeded.
1584ac_fn_c_try_compile ()
1585{
1586 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1587 rm -f conftest.$ac_objext
1588 if { { ac_try="$ac_compile"
1589case "(($ac_try" in
1590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1591 *) ac_try_echo=$ac_try;;
1592esac
1593eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1594$as_echo "$ac_try_echo"; } >&5
1595 (eval "$ac_compile") 2>conftest.err
1596 ac_status=$?
1597 if test -s conftest.err; then
1598 grep -v '^ *+' conftest.err >conftest.er1
1599 cat conftest.er1 >&5
1600 mv -f conftest.er1 conftest.err
1601 fi
1602 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1603 test $ac_status = 0; } && {
1604 test -z "$ac_c_werror_flag" ||
1605 test ! -s conftest.err
1606 } && test -s conftest.$ac_objext; then :
1607 ac_retval=0
1608else
1609 $as_echo "$as_me: failed program was:" >&5
1610sed 's/^/| /' conftest.$ac_ext >&5
1611
1612 ac_retval=1
1613fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001614 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 as_fn_set_status $ac_retval
1616
1617} # ac_fn_c_try_compile
1618
Matthias Kloseb9621712010-04-24 17:59:49 +00001619# ac_fn_c_try_link LINENO
1620# -----------------------
1621# Try to link conftest.$ac_ext, and return whether this succeeded.
1622ac_fn_c_try_link ()
1623{
1624 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1625 rm -f conftest.$ac_objext conftest$ac_exeext
1626 if { { ac_try="$ac_link"
1627case "(($ac_try" in
1628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1629 *) ac_try_echo=$ac_try;;
1630esac
1631eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1632$as_echo "$ac_try_echo"; } >&5
1633 (eval "$ac_link") 2>conftest.err
1634 ac_status=$?
1635 if test -s conftest.err; then
1636 grep -v '^ *+' conftest.err >conftest.er1
1637 cat conftest.er1 >&5
1638 mv -f conftest.er1 conftest.err
1639 fi
1640 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1641 test $ac_status = 0; } && {
1642 test -z "$ac_c_werror_flag" ||
1643 test ! -s conftest.err
1644 } && test -s conftest$ac_exeext && {
1645 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001646 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001647 }; then :
1648 ac_retval=0
1649else
1650 $as_echo "$as_me: failed program was:" >&5
1651sed 's/^/| /' conftest.$ac_ext >&5
1652
1653 ac_retval=1
1654fi
1655 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1656 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1657 # interfere with the next link command; also delete a directory that is
1658 # left behind by Apple's compiler. We do this before executing the actions.
1659 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001660 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001661 as_fn_set_status $ac_retval
1662
1663} # ac_fn_c_try_link
1664
Matthias Kloseb9621712010-04-24 17:59:49 +00001665# ac_fn_c_try_cpp LINENO
1666# ----------------------
1667# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1668ac_fn_c_try_cpp ()
1669{
1670 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1671 if { { ac_try="$ac_cpp conftest.$ac_ext"
1672case "(($ac_try" in
1673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1674 *) ac_try_echo=$ac_try;;
1675esac
1676eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1677$as_echo "$ac_try_echo"; } >&5
1678 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1679 ac_status=$?
1680 if test -s conftest.err; then
1681 grep -v '^ *+' conftest.err >conftest.er1
1682 cat conftest.er1 >&5
1683 mv -f conftest.er1 conftest.err
1684 fi
1685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001686 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1688 test ! -s conftest.err
1689 }; then :
1690 ac_retval=0
1691else
1692 $as_echo "$as_me: failed program was:" >&5
1693sed 's/^/| /' conftest.$ac_ext >&5
1694
1695 ac_retval=1
1696fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001697 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001698 as_fn_set_status $ac_retval
1699
1700} # ac_fn_c_try_cpp
1701
1702# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1703# -------------------------------------------------------
1704# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1705# the include files in INCLUDES and setting the cache variable VAR
1706# accordingly.
1707ac_fn_c_check_header_mongrel ()
1708{
1709 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001710 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1712$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001713if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001714 $as_echo_n "(cached) " >&6
1715fi
1716eval ac_res=\$$3
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1718$as_echo "$ac_res" >&6; }
1719else
1720 # Is the header compilable?
1721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1722$as_echo_n "checking $2 usability... " >&6; }
1723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1724/* end confdefs.h. */
1725$4
1726#include <$2>
1727_ACEOF
1728if ac_fn_c_try_compile "$LINENO"; then :
1729 ac_header_compiler=yes
1730else
1731 ac_header_compiler=no
1732fi
1733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1735$as_echo "$ac_header_compiler" >&6; }
1736
1737# Is the header present?
1738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1739$as_echo_n "checking $2 presence... " >&6; }
1740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1741/* end confdefs.h. */
1742#include <$2>
1743_ACEOF
1744if ac_fn_c_try_cpp "$LINENO"; then :
1745 ac_header_preproc=yes
1746else
1747 ac_header_preproc=no
1748fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001749rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1751$as_echo "$ac_header_preproc" >&6; }
1752
1753# So? What about this header?
1754case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1755 yes:no: )
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1757$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1759$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1760 ;;
1761 no:yes:* )
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1763$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1765$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1767$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1769$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1771$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001772( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001773## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001774## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001775 ) | sed "s/^/$as_me: WARNING: /" >&2
1776 ;;
1777esac
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1779$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001780if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001781 $as_echo_n "(cached) " >&6
1782else
1783 eval "$3=\$ac_header_compiler"
1784fi
1785eval ac_res=\$$3
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1787$as_echo "$ac_res" >&6; }
1788fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001789 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001790
1791} # ac_fn_c_check_header_mongrel
1792
1793# ac_fn_c_try_run LINENO
1794# ----------------------
1795# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1796# that executables *can* be run.
1797ac_fn_c_try_run ()
1798{
1799 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1800 if { { ac_try="$ac_link"
1801case "(($ac_try" in
1802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1803 *) ac_try_echo=$ac_try;;
1804esac
1805eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1806$as_echo "$ac_try_echo"; } >&5
1807 (eval "$ac_link") 2>&5
1808 ac_status=$?
1809 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1810 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1811 { { case "(($ac_try" in
1812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1813 *) ac_try_echo=$ac_try;;
1814esac
1815eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1816$as_echo "$ac_try_echo"; } >&5
1817 (eval "$ac_try") 2>&5
1818 ac_status=$?
1819 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1820 test $ac_status = 0; }; }; then :
1821 ac_retval=0
1822else
1823 $as_echo "$as_me: program exited with status $ac_status" >&5
1824 $as_echo "$as_me: failed program was:" >&5
1825sed 's/^/| /' conftest.$ac_ext >&5
1826
1827 ac_retval=$ac_status
1828fi
1829 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001830 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 as_fn_set_status $ac_retval
1832
1833} # ac_fn_c_try_run
1834
1835# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1836# -------------------------------------------------------
1837# Tests whether HEADER exists and can be compiled using the include files in
1838# INCLUDES, setting the cache variable VAR accordingly.
1839ac_fn_c_check_header_compile ()
1840{
1841 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1843$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001844if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001845 $as_echo_n "(cached) " >&6
1846else
1847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1848/* end confdefs.h. */
1849$4
1850#include <$2>
1851_ACEOF
1852if ac_fn_c_try_compile "$LINENO"; then :
1853 eval "$3=yes"
1854else
1855 eval "$3=no"
1856fi
1857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1858fi
1859eval ac_res=\$$3
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1861$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001862 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001863
1864} # ac_fn_c_check_header_compile
1865
Matthias Kloseb9621712010-04-24 17:59:49 +00001866# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1867# -------------------------------------------
1868# Tests whether TYPE exists after having included INCLUDES, setting cache
1869# variable VAR accordingly.
1870ac_fn_c_check_type ()
1871{
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1874$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001875if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001876 $as_echo_n "(cached) " >&6
1877else
1878 eval "$3=no"
1879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1880/* end confdefs.h. */
1881$4
1882int
1883main ()
1884{
1885if (sizeof ($2))
1886 return 0;
1887 ;
1888 return 0;
1889}
1890_ACEOF
1891if ac_fn_c_try_compile "$LINENO"; then :
1892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894$4
1895int
1896main ()
1897{
1898if (sizeof (($2)))
1899 return 0;
1900 ;
1901 return 0;
1902}
1903_ACEOF
1904if ac_fn_c_try_compile "$LINENO"; then :
1905
1906else
1907 eval "$3=yes"
1908fi
1909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1910fi
1911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1912fi
1913eval ac_res=\$$3
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1915$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001916 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001917
1918} # ac_fn_c_check_type
1919
1920# ac_fn_c_find_uintX_t LINENO BITS VAR
1921# ------------------------------------
1922# Finds an unsigned integer type with width BITS, setting cache variable VAR
1923# accordingly.
1924ac_fn_c_find_uintX_t ()
1925{
1926 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1928$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001929if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001930 $as_echo_n "(cached) " >&6
1931else
1932 eval "$3=no"
1933 # Order is important - never check a type that is potentially smaller
1934 # than half of the expected target width.
1935 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1936 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938/* end confdefs.h. */
1939$ac_includes_default
1940int
1941main ()
1942{
1943static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001944test_array [0] = 0;
1945return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001946
1947 ;
1948 return 0;
1949}
1950_ACEOF
1951if ac_fn_c_try_compile "$LINENO"; then :
1952 case $ac_type in #(
1953 uint$2_t) :
1954 eval "$3=yes" ;; #(
1955 *) :
1956 eval "$3=\$ac_type" ;;
1957esac
1958fi
1959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001960 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001961
1962else
1963 break
1964fi
1965 done
1966fi
1967eval ac_res=\$$3
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1969$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001970 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001971
1972} # ac_fn_c_find_uintX_t
1973
1974# ac_fn_c_find_intX_t LINENO BITS VAR
1975# -----------------------------------
1976# Finds a signed integer type with width BITS, setting cache variable VAR
1977# accordingly.
1978ac_fn_c_find_intX_t ()
1979{
1980 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1982$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001983if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001984 $as_echo_n "(cached) " >&6
1985else
1986 eval "$3=no"
1987 # Order is important - never check a type that is potentially smaller
1988 # than half of the expected target width.
1989 for ac_type in int$2_t 'int' 'long int' \
1990 'long long int' 'short int' 'signed char'; do
1991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1992/* end confdefs.h. */
1993$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001994 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001995int
1996main ()
1997{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001998static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001999test_array [0] = 0;
2000return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002001
2002 ;
2003 return 0;
2004}
2005_ACEOF
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2008/* end confdefs.h. */
2009$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002010 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002011int
2012main ()
2013{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002014static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002015 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002016test_array [0] = 0;
2017return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024
2025else
2026 case $ac_type in #(
2027 int$2_t) :
2028 eval "$3=yes" ;; #(
2029 *) :
2030 eval "$3=\$ac_type" ;;
2031esac
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034fi
2035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002036 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002037
2038else
2039 break
2040fi
2041 done
2042fi
2043eval ac_res=\$$3
2044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2045$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002046 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002047
2048} # ac_fn_c_find_intX_t
2049
2050# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2051# --------------------------------------------
2052# Tries to find the compile-time value of EXPR in a program that includes
2053# INCLUDES, setting VAR accordingly. Returns whether the value could be
2054# computed
2055ac_fn_c_compute_int ()
2056{
2057 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2058 if test "$cross_compiling" = yes; then
2059 # Depending upon the size, compute the lo and hi bounds.
2060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h. */
2062$4
2063int
2064main ()
2065{
2066static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002067test_array [0] = 0;
2068return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002069
2070 ;
2071 return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_lo=0 ac_mid=0
2076 while :; do
2077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078/* end confdefs.h. */
2079$4
2080int
2081main ()
2082{
2083static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002084test_array [0] = 0;
2085return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002086
2087 ;
2088 return 0;
2089}
2090_ACEOF
2091if ac_fn_c_try_compile "$LINENO"; then :
2092 ac_hi=$ac_mid; break
2093else
2094 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2095 if test $ac_lo -le $ac_mid; then
2096 ac_lo= ac_hi=
2097 break
2098 fi
2099 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102 done
2103else
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002111test_array [0] = 0;
2112return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=-1 ac_mid=-1
2120 while :; do
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124int
2125main ()
2126{
2127static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002128test_array [0] = 0;
2129return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002130
2131 ;
2132 return 0;
2133}
2134_ACEOF
2135if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_lo=$ac_mid; break
2137else
2138 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2139 if test $ac_mid -le $ac_hi; then
2140 ac_lo= ac_hi=
2141 break
2142 fi
2143 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146 done
2147else
2148 ac_lo= ac_hi=
2149fi
2150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151fi
2152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2153# Binary search between lo and hi bounds.
2154while test "x$ac_lo" != "x$ac_hi"; do
2155 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157/* end confdefs.h. */
2158$4
2159int
2160main ()
2161{
2162static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002163test_array [0] = 0;
2164return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002165
2166 ;
2167 return 0;
2168}
2169_ACEOF
2170if ac_fn_c_try_compile "$LINENO"; then :
2171 ac_hi=$ac_mid
2172else
2173 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2174fi
2175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2176done
2177case $ac_lo in #((
2178?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2179'') ac_retval=1 ;;
2180esac
2181 else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184$4
2185static long int longval () { return $2; }
2186static unsigned long int ulongval () { return $2; }
2187#include <stdio.h>
2188#include <stdlib.h>
2189int
2190main ()
2191{
2192
2193 FILE *f = fopen ("conftest.val", "w");
2194 if (! f)
2195 return 1;
2196 if (($2) < 0)
2197 {
2198 long int i = longval ();
2199 if (i != ($2))
2200 return 1;
2201 fprintf (f, "%ld", i);
2202 }
2203 else
2204 {
2205 unsigned long int i = ulongval ();
2206 if (i != ($2))
2207 return 1;
2208 fprintf (f, "%lu", i);
2209 }
2210 /* Do not output a trailing newline, as this causes \r\n confusion
2211 on some platforms. */
2212 return ferror (f) || fclose (f) != 0;
2213
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_run "$LINENO"; then :
2219 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2220else
2221 ac_retval=1
2222fi
2223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2224 conftest.$ac_objext conftest.beam conftest.$ac_ext
2225rm -f conftest.val
2226
2227 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002228 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002229 as_fn_set_status $ac_retval
2230
2231} # ac_fn_c_compute_int
2232
2233# ac_fn_c_check_func LINENO FUNC VAR
2234# ----------------------------------
2235# Tests whether FUNC exists, setting the cache variable VAR accordingly
2236ac_fn_c_check_func ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2240$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002241if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002242 $as_echo_n "(cached) " >&6
2243else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2247 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2248#define $2 innocuous_$2
2249
2250/* System header to define __stub macros and hopefully few prototypes,
2251 which can conflict with char $2 (); below.
2252 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2253 <limits.h> exists even on freestanding compilers. */
2254
2255#ifdef __STDC__
2256# include <limits.h>
2257#else
2258# include <assert.h>
2259#endif
2260
2261#undef $2
2262
2263/* Override any GCC internal prototype to avoid an error.
2264 Use char because int might match the return type of a GCC
2265 builtin and then its argument prototype would still apply. */
2266#ifdef __cplusplus
2267extern "C"
2268#endif
2269char $2 ();
2270/* The GNU C library defines this for functions which it implements
2271 to always fail with ENOSYS. Some functions are actually named
2272 something starting with __ and the normal name is an alias. */
2273#if defined __stub_$2 || defined __stub___$2
2274choke me
2275#endif
2276
2277int
2278main ()
2279{
2280return $2 ();
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285if ac_fn_c_try_link "$LINENO"; then :
2286 eval "$3=yes"
2287else
2288 eval "$3=no"
2289fi
2290rm -f core conftest.err conftest.$ac_objext \
2291 conftest$ac_exeext conftest.$ac_ext
2292fi
2293eval ac_res=\$$3
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2295$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002296 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002297
2298} # ac_fn_c_check_func
2299
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002300# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2301# ---------------------------------------------
2302# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2303# accordingly.
2304ac_fn_c_check_decl ()
2305{
2306 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307 as_decl_name=`echo $2|sed 's/ *(.*//'`
2308 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2310$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2311if eval \${$3+:} false; then :
2312 $as_echo_n "(cached) " >&6
2313else
2314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315/* end confdefs.h. */
2316$4
2317int
2318main ()
2319{
2320#ifndef $as_decl_name
2321#ifdef __cplusplus
2322 (void) $as_decl_use;
2323#else
2324 (void) $as_decl_name;
2325#endif
2326#endif
2327
2328 ;
2329 return 0;
2330}
2331_ACEOF
2332if ac_fn_c_try_compile "$LINENO"; then :
2333 eval "$3=yes"
2334else
2335 eval "$3=no"
2336fi
2337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2338fi
2339eval ac_res=\$$3
2340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2341$as_echo "$ac_res" >&6; }
2342 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2343
2344} # ac_fn_c_check_decl
2345
Matthias Kloseb9621712010-04-24 17:59:49 +00002346# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2347# ----------------------------------------------------
2348# Tries to find if the field MEMBER exists in type AGGR, after including
2349# INCLUDES, setting cache variable VAR accordingly.
2350ac_fn_c_check_member ()
2351{
2352 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2354$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002355if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002356 $as_echo_n "(cached) " >&6
2357else
2358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2359/* end confdefs.h. */
2360$5
2361int
2362main ()
2363{
2364static $2 ac_aggr;
2365if (ac_aggr.$3)
2366return 0;
2367 ;
2368 return 0;
2369}
2370_ACEOF
2371if ac_fn_c_try_compile "$LINENO"; then :
2372 eval "$4=yes"
2373else
2374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2375/* end confdefs.h. */
2376$5
2377int
2378main ()
2379{
2380static $2 ac_aggr;
2381if (sizeof ac_aggr.$3)
2382return 0;
2383 ;
2384 return 0;
2385}
2386_ACEOF
2387if ac_fn_c_try_compile "$LINENO"; then :
2388 eval "$4=yes"
2389else
2390 eval "$4=no"
2391fi
2392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395fi
2396eval ac_res=\$$4
2397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2398$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002399 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002400
2401} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002402cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002403This file contains any messages produced by compilers while
2404running configure, to aid debugging if configure makes a mistake.
2405
Georg Brandl08a90122012-09-29 09:34:13 +02002406It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002407generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002408
2409 $ $0 $@
2410
2411_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002412exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002413{
2414cat <<_ASUNAME
2415## --------- ##
2416## Platform. ##
2417## --------- ##
2418
2419hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2420uname -m = `(uname -m) 2>/dev/null || echo unknown`
2421uname -r = `(uname -r) 2>/dev/null || echo unknown`
2422uname -s = `(uname -s) 2>/dev/null || echo unknown`
2423uname -v = `(uname -v) 2>/dev/null || echo unknown`
2424
2425/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2426/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2427
2428/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2429/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2430/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002431/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002432/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2433/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2434/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2435
2436_ASUNAME
2437
2438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2439for as_dir in $PATH
2440do
2441 IFS=$as_save_IFS
2442 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002443 $as_echo "PATH: $as_dir"
2444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002446
2447} >&5
2448
2449cat >&5 <<_ACEOF
2450
2451
2452## ----------- ##
2453## Core tests. ##
2454## ----------- ##
2455
2456_ACEOF
2457
2458
2459# Keep a trace of the command line.
2460# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002461# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002462# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002463# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002464ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002465ac_configure_args0=
2466ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002467ac_must_keep_next=false
2468for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002469do
Skip Montanaro6dead952003-09-25 14:50:04 +00002470 for ac_arg
2471 do
2472 case $ac_arg in
2473 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2474 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2475 | -silent | --silent | --silen | --sile | --sil)
2476 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002479 esac
2480 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002482 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002483 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002484 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002485 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002486 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002487 case $ac_arg in
2488 *=* | --config-cache | -C | -disable-* | --disable-* \
2489 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2490 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2491 | -with-* | --with-* | -without-* | --without-* | --x)
2492 case "$ac_configure_args0 " in
2493 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2494 esac
2495 ;;
2496 -* ) ac_must_keep_next=true ;;
2497 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 ;;
2501 esac
2502 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002503done
Matthias Kloseb9621712010-04-24 17:59:49 +00002504{ ac_configure_args0=; unset ac_configure_args0;}
2505{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002506
2507# When interrupted or exit'd, cleanup temporary files, and complete
2508# config.log. We remove comments because anyway the quotes in there
2509# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510# WARNING: Use '\'' to represent an apostrophe within the trap.
2511# 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 +00002512trap 'exit_status=$?
2513 # Save into config.log some information that might help in debugging.
2514 {
2515 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002516
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002518## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002519## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 echo
2521 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522(
2523 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2524 eval ac_val=\$$ac_var
2525 case $ac_val in #(
2526 *${as_nl}*)
2527 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2529$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 esac
2531 case $ac_var in #(
2532 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2534 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 esac ;;
2536 esac
2537 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2540 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 "s/'\''/'\''\\\\'\'''\''/g;
2543 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2544 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002545 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002547 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548 esac |
2549 sort
2550)
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002552
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002553 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002554## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002555## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002556 echo
2557 for ac_var in $ac_subst_vars
2558 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 eval ac_val=\$$ac_var
2560 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002561 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002563 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002564 done | sort
2565 echo
2566
2567 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002570## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002571 echo
2572 for ac_var in $ac_subst_files
2573 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574 eval ac_val=\$$ac_var
2575 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002576 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002579 done | sort
2580 echo
2581 fi
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002584 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002585## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 echo
2590 fi
2591 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 $as_echo "$as_me: caught signal $ac_signal"
2593 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 rm -f core *.core core.conftest.* &&
2596 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002599for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002601done
2602ac_signal=0
2603
2604# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002606
Matthias Kloseb9621712010-04-24 17:59:49 +00002607$as_echo "/* confdefs.h */" > confdefs.h
2608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609# Predefined preprocessor variables.
2610
2611cat >>confdefs.h <<_ACEOF
2612#define PACKAGE_NAME "$PACKAGE_NAME"
2613_ACEOF
2614
Martin v. Löwis11437992002-04-12 09:54:03 +00002615cat >>confdefs.h <<_ACEOF
2616#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2617_ACEOF
2618
Martin v. Löwis11437992002-04-12 09:54:03 +00002619cat >>confdefs.h <<_ACEOF
2620#define PACKAGE_VERSION "$PACKAGE_VERSION"
2621_ACEOF
2622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623cat >>confdefs.h <<_ACEOF
2624#define PACKAGE_STRING "$PACKAGE_STRING"
2625_ACEOF
2626
Martin v. Löwis11437992002-04-12 09:54:03 +00002627cat >>confdefs.h <<_ACEOF
2628#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2629_ACEOF
2630
Matthias Kloseb9621712010-04-24 17:59:49 +00002631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_URL "$PACKAGE_URL"
2633_ACEOF
2634
Martin v. Löwis11437992002-04-12 09:54:03 +00002635
2636# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002637# Prefer an explicitly selected file to automatically selected ones.
2638ac_site_file1=NONE
2639ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002641 # We do not want a PATH search for config.site.
2642 case $CONFIG_SITE in #((
2643 -*) ac_site_file1=./$CONFIG_SITE;;
2644 */*) ac_site_file1=$CONFIG_SITE;;
2645 *) ac_site_file1=./$CONFIG_SITE;;
2646 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002647elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 ac_site_file1=$prefix/share/config.site
2649 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650else
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 ac_site_file1=$ac_default_prefix/share/config.site
2652 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002654for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655do
Matthias Kloseb9621712010-04-24 17:59:49 +00002656 test "x$ac_site_file" = xNONE && continue
2657 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2659$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002661 . "$ac_site_file" \
2662 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2664as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002665See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002666 fi
2667done
2668
2669if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 # Some versions of bash will fail to source /dev/null (special files
2671 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2672 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2674$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002676 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2677 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002678 esac
2679 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680else
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2682$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 >$cache_file
2684fi
2685
2686# Check that the precious variables saved in the cache have kept the same
2687# value.
2688ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002689for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002690 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2691 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002692 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2693 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 case $ac_old_set,$ac_new_set in
2695 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002696 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2697$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 +00002698 ac_cache_corrupted=: ;;
2699 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002700 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2701$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 ac_cache_corrupted=: ;;
2703 ,);;
2704 *)
2705 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002706 # differences in whitespace do not lead to failure.
2707 ac_old_val_w=`echo x $ac_old_val`
2708 ac_new_val_w=`echo x $ac_new_val`
2709 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2711$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2712 ac_cache_corrupted=:
2713 else
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2715$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2716 eval $ac_var=\$ac_old_val
2717 fi
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2719$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2720 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2721$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 fi;;
2723 esac
2724 # Pass precious variables to config.status.
2725 if test "$ac_new_set" = set; then
2726 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002728 *) ac_arg=$ac_var=$ac_new_val ;;
2729 esac
2730 case " $ac_configure_args " in
2731 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002732 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 esac
2734 fi
2735done
2736if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2738$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2740$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002741 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002743## -------------------- ##
2744## Main body of script. ##
2745## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746
Guido van Rossum7f43da71994-08-01 12:15:30 +00002747ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002749ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2750ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2751ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002752
Guido van Rossum627b2d71993-12-24 10:39:16 +00002753
Michael W. Hudson54241132001-12-07 15:38:26 +00002754
Trent Nelson4d4ec652012-10-16 08:51:24 -04002755
Trent Nelson5595ab52012-10-17 04:47:31 -04002756if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002757 # If we're building out-of-tree, we need to make sure the following
2758 # resources get picked up before their $srcdir counterparts.
2759 # Objects/ -> typeslots.inc
2760 # Include/ -> Python-ast.h, graminit.h
2761 # Python/ -> importlib.h
2762 # (A side effect of this is that these resources will automatically be
2763 # regenerated when building out-of-tree, regardless of whether or not
2764 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2765 # off.)
2766 BASECPPFLAGS="-IObjects -IInclude -IPython"
2767else
2768 BASECPPFLAGS=""
2769fi
2770
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002771
2772
2773
2774
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002775if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002776then
2777# Extract the first word of "hg", so it can be a program name with args.
2778set dummy hg; ac_word=$2
2779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2780$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002781if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002782 $as_echo_n "(cached) " >&6
2783else
2784 if test -n "$HAS_HG"; then
2785 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2786else
2787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2788for as_dir in $PATH
2789do
2790 IFS=$as_save_IFS
2791 test -z "$as_dir" && as_dir=.
2792 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002794 ac_cv_prog_HAS_HG="found"
2795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2796 break 2
2797 fi
2798done
2799 done
2800IFS=$as_save_IFS
2801
2802 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2803fi
2804fi
2805HAS_HG=$ac_cv_prog_HAS_HG
2806if test -n "$HAS_HG"; then
2807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2808$as_echo "$HAS_HG" >&6; }
2809else
2810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2811$as_echo "no" >&6; }
2812fi
2813
2814
2815else
2816HAS_HG=no-repository
2817fi
2818if test $HAS_HG = found
2819then
2820 HGVERSION="hg id -i \$(srcdir)"
2821 HGTAG="hg id -t \$(srcdir)"
2822 HGBRANCH="hg id -b \$(srcdir)"
2823else
2824 HGVERSION=""
2825 HGTAG=""
2826 HGBRANCH=""
2827fi
2828
2829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002831
2832
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002833ac_aux_dir=
2834for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2835 if test -f "$ac_dir/install-sh"; then
2836 ac_aux_dir=$ac_dir
2837 ac_install_sh="$ac_aux_dir/install-sh -c"
2838 break
2839 elif test -f "$ac_dir/install.sh"; then
2840 ac_aux_dir=$ac_dir
2841 ac_install_sh="$ac_aux_dir/install.sh -c"
2842 break
2843 elif test -f "$ac_dir/shtool"; then
2844 ac_aux_dir=$ac_dir
2845 ac_install_sh="$ac_aux_dir/shtool install -c"
2846 break
2847 fi
2848done
2849if test -z "$ac_aux_dir"; then
2850 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2851fi
2852
2853# These three variables are undocumented and unsupported,
2854# and are intended to be withdrawn in a future Autoconf release.
2855# They can cause serious problems if a builder's source tree is in a directory
2856# whose full name contains unusual characters.
2857ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2858ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2859ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2860
2861
2862# Make sure we can run config.sub.
2863$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2864 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2865
2866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2867$as_echo_n "checking build system type... " >&6; }
2868if ${ac_cv_build+:} false; then :
2869 $as_echo_n "(cached) " >&6
2870else
2871 ac_build_alias=$build_alias
2872test "x$ac_build_alias" = x &&
2873 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2874test "x$ac_build_alias" = x &&
2875 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2876ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2877 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2878
2879fi
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2881$as_echo "$ac_cv_build" >&6; }
2882case $ac_cv_build in
2883*-*-*) ;;
2884*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2885esac
2886build=$ac_cv_build
2887ac_save_IFS=$IFS; IFS='-'
2888set x $ac_cv_build
2889shift
2890build_cpu=$1
2891build_vendor=$2
2892shift; shift
2893# Remember, the first character of IFS is used to create $*,
2894# except with old shells:
2895build_os=$*
2896IFS=$ac_save_IFS
2897case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2898
2899
2900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2901$as_echo_n "checking host system type... " >&6; }
2902if ${ac_cv_host+:} false; then :
2903 $as_echo_n "(cached) " >&6
2904else
2905 if test "x$host_alias" = x; then
2906 ac_cv_host=$ac_cv_build
2907else
2908 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2909 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2910fi
2911
2912fi
2913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2914$as_echo "$ac_cv_host" >&6; }
2915case $ac_cv_host in
2916*-*-*) ;;
2917*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2918esac
2919host=$ac_cv_host
2920ac_save_IFS=$IFS; IFS='-'
2921set x $ac_cv_host
2922shift
2923host_cpu=$1
2924host_vendor=$2
2925shift; shift
2926# Remember, the first character of IFS is used to create $*,
2927# except with old shells:
2928host_os=$*
2929IFS=$ac_save_IFS
2930case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2931
2932
2933
doko@python.orga10e4a92013-01-25 18:45:12 +01002934
2935
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002936if test "$cross_compiling" = yes; then
2937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2938$as_echo_n "checking for python interpreter for cross build... " >&6; }
2939 if test -z "$PYTHON_FOR_BUILD"; then
2940 for interp in python$PACKAGE_VERSION python3 python; do
2941 which $interp >/dev/null 2>&1 || continue
2942 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2943 break
2944 fi
2945 interp=
2946 done
2947 if test x$interp = x; then
2948 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2949 fi
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2951$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002952 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002953 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002954elif test "$cross_compiling" = maybe; then
2955 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002956else
2957 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2958fi
2959
2960
Martin v. Löwis11437992002-04-12 09:54:03 +00002961
Benjamin Petersond23f8222009-04-05 19:13:16 +00002962if test "$prefix" != "/"; then
2963 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2964fi
2965
2966
Martin v. Löwis11437992002-04-12 09:54:03 +00002967
2968
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002969# We don't use PACKAGE_ variables, and they cause conflicts
2970# with other autoconf-based packages that include Python.h
2971grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2972rm confdefs.h
2973mv confdefs.h.new confdefs.h
2974
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002975
Georg Brandl08a90122012-09-29 09:34:13 +02002976VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002977
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002978# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002979
2980SOVERSION=1.0
2981
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002982# The later defininition of _XOPEN_SOURCE disables certain features
2983# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2984
Matthias Kloseb9621712010-04-24 17:59:49 +00002985$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002986
2987
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002988# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2989# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2990# them.
2991
Matthias Kloseb9621712010-04-24 17:59:49 +00002992$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002993
2994
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002995# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2996# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2997# them.
2998
Matthias Kloseb9621712010-04-24 17:59:49 +00002999$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003000
3001
Martin v. Löwisd6320502004-08-12 13:45:08 +00003002# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3003# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003006
3007
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003008# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3009# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3010# them.
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003013
3014
3015
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003016define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003017
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003018# Arguments passed to configure.
3019
3020CONFIG_ARGS="$ac_configure_args"
3021
Matthias Kloseb9621712010-04-24 17:59:49 +00003022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3023$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003024# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003025if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003026 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003027 case $enableval in
3028 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003029 # Locate the best usable SDK, see Mac/README.txt for more
3030 # information
3031 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3032 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003034 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3035 if test ! -d "${enableval}"
3036 then
3037 enableval=/
3038 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003040 ;;
3041 esac
3042 case $enableval in
3043 no)
3044 UNIVERSALSDK=
3045 enable_universalsdk=
3046 ;;
3047 *)
3048 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049 if test ! -d "${UNIVERSALSDK}"
3050 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003051 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003052 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003053 ;;
3054 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003055
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057else
3058
3059 UNIVERSALSDK=
3060 enable_universalsdk=
3061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003062fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003063
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003064if test -n "${UNIVERSALSDK}"
3065then
Matthias Kloseb9621712010-04-24 17:59:49 +00003066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3067$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003068else
Matthias Kloseb9621712010-04-24 17:59:49 +00003069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3070$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003071fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003073
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003074
3075
Ned Deilycbfb9a52012-06-23 16:02:19 -07003076# For backward compatibility reasons we prefer to select '32-bit' if available,
3077# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003079if test "`uname -s`" = "Darwin"
3080then
3081 if test -n "${UNIVERSALSDK}"
3082 then
3083 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3084 then
3085 UNIVERSAL_ARCHS="intel"
3086 fi
3087 fi
3088fi
3089
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003090
Matthias Kloseb9621712010-04-24 17:59:49 +00003091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3092$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093
3094# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003095if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003096 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3098$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099 UNIVERSAL_ARCHS="$withval"
3100
3101else
3102
Ned Deilycbfb9a52012-06-23 16:02:19 -07003103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3104$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003105
3106fi
3107
3108
3109
3110
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003111
3112# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003113if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003114 withval=$with_framework_name;
3115 PYTHONFRAMEWORK=${withval}
3116 PYTHONFRAMEWORKDIR=${withval}.framework
3117 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3118
3119else
3120
3121 PYTHONFRAMEWORK=Python
3122 PYTHONFRAMEWORKDIR=Python.framework
3123 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3124
3125fi
3126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003127# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003128if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003129 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003130 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003131 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003132 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003133 esac
3134 case $enableval in
3135 no)
3136 PYTHONFRAMEWORK=
3137 PYTHONFRAMEWORKDIR=no-framework
3138 PYTHONFRAMEWORKPREFIX=
3139 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003140 FRAMEWORKINSTALLFIRST=
3141 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003142 FRAMEWORKALTINSTALLFIRST=
3143 FRAMEWORKALTINSTALLLAST=
3144 if test "x${prefix}" = "xNONE"; then
3145 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3146 else
3147 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3148 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003149 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003150 ;;
3151 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003152 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003153 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003154 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003155 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003156 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3157 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003158 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003159
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003160 if test "x${prefix}" = "xNONE" ; then
3161 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003162
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003163 else
3164 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3165 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003166
3167 case "${enableval}" in
3168 /System*)
3169 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3170 if test "${prefix}" = "NONE" ; then
3171 # See below
3172 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3173 fi
3174 ;;
3175
3176 /Library*)
3177 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3178 ;;
3179
3180 */Library/Frameworks)
3181 MDIR="`dirname "${enableval}"`"
3182 MDIR="`dirname "${MDIR}"`"
3183 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3184
3185 if test "${prefix}" = "NONE"; then
3186 # User hasn't specified the
3187 # --prefix option, but wants to install
3188 # the framework in a non-default location,
3189 # ensure that the compatibility links get
3190 # installed relative to that prefix as well
3191 # instead of in /usr/local.
3192 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3193 fi
3194 ;;
3195
3196 *)
3197 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3198 ;;
3199 esac
3200
Jack Jansen127e56e2001-09-11 14:41:54 +00003201 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003203 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003207 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003208
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003209 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3210
3211 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3212
Jack Jansene578a632001-08-15 01:27:14 +00003213 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003214
Guido van Rossum563e7081996-09-10 18:20:48 +00003215else
Martin v. Löwis11437992002-04-12 09:54:03 +00003216
Jack Jansene578a632001-08-15 01:27:14 +00003217 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003218 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003219 PYTHONFRAMEWORKPREFIX=
3220 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003221 FRAMEWORKINSTALLFIRST=
3222 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003223 FRAMEWORKALTINSTALLFIRST=
3224 FRAMEWORKALTINSTALLLAST=
3225 if test "x${prefix}" = "xNONE" ; then
3226 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3227 else
3228 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3229 fi
Jack Jansene578a632001-08-15 01:27:14 +00003230 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003231
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233fi
3234
Thomas Wouters477c8d52006-05-27 19:21:47 +00003235
3236
Michael W. Hudson54241132001-12-07 15:38:26 +00003237
3238
3239
3240
Jack Jansene578a632001-08-15 01:27:14 +00003241
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003242
3243
3244
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003245
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003246
Jack Jansene578a632001-08-15 01:27:14 +00003247##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003248## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003249## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003250##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003251# Set name for machine-dependent library files
3252
Matthias Kloseb9621712010-04-24 17:59:49 +00003253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3254$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003255if test -z "$MACHDEP"
3256then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003257 # avoid using uname for cross builds
3258 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003259 # ac_sys_system and ac_sys_release are used for setting
3260 # a lot of different things including 'define_xopen_source'
3261 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003262 case "$host" in
3263 *-*-linux*)
3264 ac_sys_system=Linux
3265 ;;
3266 *-*-cygwin*)
3267 ac_sys_system=Cygwin
3268 ;;
3269 *)
3270 # for now, limit cross builds to known configurations
3271 MACHDEP="unknown"
3272 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3273 esac
3274 ac_sys_release=
3275 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003276 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003277 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003278 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003279 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003280 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003281 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003282 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 fi
3284 ac_md_system=`echo $ac_sys_system |
3285 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3286 ac_md_release=`echo $ac_sys_release |
3287 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3288 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003289
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003291 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003292 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003293 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003294 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003295 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003296 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003297fi
Guido van Rossum91922671997-10-09 20:24:13 +00003298
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003299
3300if test "$cross_compiling" = yes; then
3301 case "$host" in
3302 *-*-linux*)
3303 case "$host_cpu" in
3304 arm*)
3305 _host_cpu=arm
3306 ;;
3307 *)
3308 _host_cpu=$host_cpu
3309 esac
3310 ;;
3311 *-*-cygwin*)
3312 _host_cpu=
3313 ;;
3314 *)
3315 # for now, limit cross builds to known configurations
3316 MACHDEP="unknown"
3317 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3318 esac
3319 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3320fi
3321
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003322# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3323# disable features if it is defined, without any means to access these
3324# features as extensions. For these systems, we skip the definition of
3325# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3326# some feature, make sure there is no alternative way to access this
3327# feature. Also, when using wildcards, make sure you have verified the
3328# need for not defining _XOPEN_SOURCE on all systems matching the
3329# wildcard, and that the wildcard does not include future systems
3330# (which may remove their limitations).
3331case $ac_sys_system/$ac_sys_release in
3332 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3333 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003334 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003335 # In addition, Stefan Krah confirms that issue #1244610 exists through
3336 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003337 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003338 define_xopen_source=no
3339 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3340 # also defined. This can be overridden by defining _BSD_SOURCE
3341 # As this has a different meaning on Linux, only define it on OpenBSD
3342
Matthias Kloseb9621712010-04-24 17:59:49 +00003343$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003344
3345 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003346 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003347 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3348 # also defined. This can be overridden by defining _BSD_SOURCE
3349 # As this has a different meaning on Linux, only define it on OpenBSD
3350
Matthias Kloseb9621712010-04-24 17:59:49 +00003351$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003352
3353 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003354 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3355 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3356 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003357 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 +00003358 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003359 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3360 # request to enable features supported by the standard as a request
3361 # to disable features not supported by the standard. The best way
3362 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3363 # entirely and define __EXTENSIONS__ instead.
3364 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003365 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3367 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003368 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003369 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003370 define_xopen_source=no;;
3371 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003372 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003373 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003374 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003375 # On FreeBSD 4, the math functions C89 does not cover are never defined
3376 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3377 FreeBSD/4.*)
3378 define_xopen_source=no;;
3379 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3380 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3381 # identifies itself as Darwin/7.*
3382 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3383 # disables platform specific features beyond repair.
3384 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3385 # has no effect, don't bother defining them
3386 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003387 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003388 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003389 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003390 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3391 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3392 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003393 AIX/4)
3394 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003395 AIX/5)
3396 if test `uname -r` -eq 1; then
3397 define_xopen_source=no
3398 fi
3399 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003400 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3401 # defining NI_NUMERICHOST.
3402 QNX/6.3.2)
3403 define_xopen_source=no
3404 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003405
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003406esac
3407
3408if test $define_xopen_source = yes
3409then
Victor Stinner14d098d2011-09-07 22:29:43 +02003410 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
Victor Stinner14d098d2011-09-07 22:29:43 +02003412$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003413
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003414
3415 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3416 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3417 # several APIs are not declared. Since this is also needed in some
3418 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
Matthias Kloseb9621712010-04-24 17:59:49 +00003420$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
3422
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003423
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003424$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003425
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003426fi
3427
Guido van Rossum91922671997-10-09 20:24:13 +00003428#
3429# SGI compilers allow the specification of the both the ABI and the
3430# ISA on the command line. Depending on the values of these switches,
3431# different and often incompatable code will be generated.
3432#
3433# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3434# thus supply support for various ABI/ISA combinations. The MACHDEP
3435# variable is also adjusted.
3436#
3437
3438if test ! -z "$SGI_ABI"
3439then
3440 CC="cc $SGI_ABI"
3441 LDFLAGS="$SGI_ABI $LDFLAGS"
3442 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3445$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003446
Jack Jansen6b08a402004-06-03 12:41:45 +00003447# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3448# it may influence the way we can build extensions, so distutils
3449# needs to check it
3450
Thomas Wouters477c8d52006-05-27 19:21:47 +00003451
Jack Jansen6b08a402004-06-03 12:41:45 +00003452CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003453EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003454
Guido van Rossum627b2d71993-12-24 10:39:16 +00003455# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003456
3457# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3458# for debug/optimization stuff. BASECFLAGS is for flags that are required
3459# just to get things to compile and link. Users are free to override OPT
3460# when running configure or make. The build should not break if they do.
3461# BASECFLAGS should generally not be messed with, however.
3462
3463# XXX shouldn't some/most/all of this code be merged with the stuff later
3464# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3466$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003468# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003469if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003471 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003472 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003473 without_gcc=yes;;
3474 yes) CC=gcc
3475 without_gcc=no;;
3476 *) CC=$withval
3477 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003478 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003479else
Martin v. Löwis11437992002-04-12 09:54:03 +00003480
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003481 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003482 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003483 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003484 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003485 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003486fi
3487
Matthias Kloseb9621712010-04-24 17:59:49 +00003488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3489$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003490
Guido van Rossum8b131c51995-03-09 14:10:13 +00003491# If the user switches compilers, we can't believe the cache
3492if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3493then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003494 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003495(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003496fi
3497
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003498# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3499# when the compiler supports them, but we don't always want -O2, and
3500# we set -g later.
3501if test -z "$CFLAGS"; then
3502 CFLAGS=
3503fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003504
3505if test "$ac_sys_system" = "Darwin"
3506then
3507 # Compiler selection on MacOSX is more complicated than
3508 # AC_PROG_CC can handle, see Mac/README.txt for more
3509 # information
3510 if test -z "${CC}"
3511 then
3512 found_gcc=
3513 found_clang=
3514 as_save_IFS=$IFS; IFS=:
3515 for as_dir in $PATH
3516 do
3517 IFS=$as_save_IFS
3518 if test -x $as_dir/gcc; then
3519 if test -z "${found_gcc}"; then
3520 found_gcc=$as_dir/gcc
3521 fi
3522 fi
3523 if test -x $as_dir/clang; then
3524 if test -z "${found_clang}"; then
3525 found_clang=$as_dir/clang
3526 fi
3527 fi
3528 done
3529 IFS=$as_save_IFS
3530
3531 if test -n "$found_gcc" -a -n "$found_clang"
3532 then
3533 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3534 then
3535 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3536$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3537 CC="$found_clang"
3538 CXX="$found_clang++"
3539 fi
3540
3541
3542 elif test -z "$found_gcc" -a -n "$found_clang"
3543 then
3544 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3545$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3546 CC="$found_clang"
3547 CXX="$found_clang++"
3548
3549 elif test -z "$found_gcc" -a -z "$found_clang"
3550 then
3551 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3552 if test -n "${found_clang}"
3553 then
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3555$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3556 CC="${found_clang}"
3557 CXX="`/usr/bin/xcrun -find clang++`"
3558
3559 # else: use default behaviour
3560 fi
3561 fi
3562 fi
3563fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003564ac_ext=c
3565ac_cpp='$CPP $CPPFLAGS'
3566ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3567ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3568ac_compiler_gnu=$ac_cv_c_compiler_gnu
3569if test -n "$ac_tool_prefix"; then
3570 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3571set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3573$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003574if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003575 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003576else
3577 if test -n "$CC"; then
3578 ac_cv_prog_CC="$CC" # Let the user override the test.
3579else
Martin v. Löwis11437992002-04-12 09:54:03 +00003580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3581for as_dir in $PATH
3582do
3583 IFS=$as_save_IFS
3584 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003586 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003588 $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 +00003589 break 2
3590 fi
3591done
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003594
Jack Jansendd19cf82001-12-06 22:36:17 +00003595fi
3596fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003597CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003598if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3600$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003601else
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3603$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003604fi
3605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003606
Martin v. Löwis11437992002-04-12 09:54:03 +00003607fi
3608if test -z "$ac_cv_prog_CC"; then
3609 ac_ct_CC=$CC
3610 # Extract the first word of "gcc", so it can be a program name with args.
3611set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3613$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003614if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003616else
3617 if test -n "$ac_ct_CC"; then
3618 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3619else
3620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3621for as_dir in $PATH
3622do
3623 IFS=$as_save_IFS
3624 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003626 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003627 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 $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 +00003629 break 2
3630 fi
3631done
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003633IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003634
3635fi
3636fi
3637ac_ct_CC=$ac_cv_prog_ac_ct_CC
3638if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3640$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003641else
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3643$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003644fi
3645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646 if test "x$ac_ct_CC" = x; then
3647 CC=""
3648 else
3649 case $cross_compiling:$ac_tool_warned in
3650yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003651{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3652$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653ac_tool_warned=yes ;;
3654esac
3655 CC=$ac_ct_CC
3656 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003657else
3658 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003659fi
3660
Jack Jansendd19cf82001-12-06 22:36:17 +00003661if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662 if test -n "$ac_tool_prefix"; then
3663 # 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 +00003664set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3666$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003667if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003669else
3670 if test -n "$CC"; then
3671 ac_cv_prog_CC="$CC" # Let the user override the test.
3672else
Martin v. Löwis11437992002-04-12 09:54:03 +00003673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3674for as_dir in $PATH
3675do
3676 IFS=$as_save_IFS
3677 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003680 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 $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 +00003682 break 2
3683 fi
3684done
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003686IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003687
3688fi
3689fi
3690CC=$ac_cv_prog_CC
3691if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3693$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003694else
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3696$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003697fi
3698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003699
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003701fi
3702if test -z "$CC"; then
3703 # Extract the first word of "cc", so it can be a program name with args.
3704set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3706$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003707if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003709else
3710 if test -n "$CC"; then
3711 ac_cv_prog_CC="$CC" # Let the user override the test.
3712else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003713 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3715for as_dir in $PATH
3716do
3717 IFS=$as_save_IFS
3718 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3722 ac_prog_rejected=yes
3723 continue
3724 fi
3725 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 $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 +00003727 break 2
3728 fi
3729done
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003732
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003733if test $ac_prog_rejected = yes; then
3734 # We found a bogon in the path, so make sure we never use it.
3735 set dummy $ac_cv_prog_CC
3736 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003738 # We chose a different compiler from the bogus one.
3739 # However, it has the same basename, so the bogon will be chosen
3740 # first if we set CC to just the basename; use the full file name.
3741 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003742 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743 fi
3744fi
3745fi
3746fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003747CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3750$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751else
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3753$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003754fi
3755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003756
Martin v. Löwis11437992002-04-12 09:54:03 +00003757fi
3758if test -z "$CC"; then
3759 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003760 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 do
3762 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3763set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3765$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003766if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003767 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003768else
3769 if test -n "$CC"; then
3770 ac_cv_prog_CC="$CC" # Let the user override the test.
3771else
Martin v. Löwis11437992002-04-12 09:54:03 +00003772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3773for as_dir in $PATH
3774do
3775 IFS=$as_save_IFS
3776 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003778 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003779 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 $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 +00003781 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003782 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003783done
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003785IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003786
3787fi
3788fi
3789CC=$ac_cv_prog_CC
3790if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3792$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003793else
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3795$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003796fi
3797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798
Martin v. Löwis11437992002-04-12 09:54:03 +00003799 test -n "$CC" && break
3800 done
3801fi
3802if test -z "$CC"; then
3803 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003805do
3806 # Extract the first word of "$ac_prog", so it can be a program name with args.
3807set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3809$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003810if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003812else
3813 if test -n "$ac_ct_CC"; then
3814 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3815else
3816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3817for as_dir in $PATH
3818do
3819 IFS=$as_save_IFS
3820 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003822 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003823 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 $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 +00003825 break 2
3826 fi
3827done
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003830
Martin v. Löwis11437992002-04-12 09:54:03 +00003831fi
3832fi
3833ac_ct_CC=$ac_cv_prog_ac_ct_CC
3834if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3836$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003837else
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3839$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003840fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842
Martin v. Löwis11437992002-04-12 09:54:03 +00003843 test -n "$ac_ct_CC" && break
3844done
Michael W. Hudson54241132001-12-07 15:38:26 +00003845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846 if test "x$ac_ct_CC" = x; then
3847 CC=""
3848 else
3849 case $cross_compiling:$ac_tool_warned in
3850yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003851{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3852$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853ac_tool_warned=yes ;;
3854esac
3855 CC=$ac_ct_CC
3856 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003857fi
3858
3859fi
3860
3861
Matthias Kloseb9621712010-04-24 17:59:49 +00003862test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003864as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003865See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003866
3867# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003868$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3869set X $ac_compile
3870ac_compiler=$2
3871for ac_option in --version -v -V -qversion; do
3872 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873case "(($ac_try" in
3874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3875 *) ac_try_echo=$ac_try;;
3876esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3878$as_echo "$ac_try_echo"; } >&5
3879 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003880 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 if test -s conftest.err; then
3882 sed '10a\
3883... rest of stderr output deleted ...
3884 10q' conftest.err >conftest.er1
3885 cat conftest.er1 >&5
3886 fi
3887 rm -f conftest.er1 conftest.err
3888 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3889 test $ac_status = 0; }
3890done
Martin v. Löwis11437992002-04-12 09:54:03 +00003891
Matthias Kloseb9621712010-04-24 17:59:49 +00003892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003893/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003894
Martin v. Löwis11437992002-04-12 09:54:03 +00003895int
3896main ()
3897{
3898
3899 ;
3900 return 0;
3901}
3902_ACEOF
3903ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003904ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003905# Try to create an executable without -o first, disregard a.out.
3906# It will help us diagnose broken compilers, and finding out an intuition
3907# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3909$as_echo_n "checking whether the C compiler works... " >&6; }
3910ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3911
3912# The possible output files:
3913ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003915ac_rmfiles=
3916for ac_file in $ac_files
3917do
3918 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003919 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003920 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3921 esac
3922done
3923rm -f $ac_rmfiles
3924
Matthias Kloseb9621712010-04-24 17:59:49 +00003925if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926case "(($ac_try" in
3927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3928 *) ac_try_echo=$ac_try;;
3929esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3931$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3935 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3937# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3938# in a Makefile. We should not override ac_cv_exeext if it was cached,
3939# so that the user can short-circuit this test for compilers unknown to
3940# Autoconf.
3941for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003942do
3943 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003944 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003946 ;;
3947 [ab].out )
3948 # We found the default executable, but exeext='' is most
3949 # certainly right.
3950 break;;
3951 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003952 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003953 then :; else
3954 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3955 fi
3956 # We set ac_cv_exeext here because the later test for it is not
3957 # safe: cross compilers may not add the suffix if given an `-o'
3958 # argument, so we may need to know it at that point already.
3959 # Even if this section looks crufty: it has the advantage of
3960 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003961 break;;
3962 * )
3963 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003964 esac
3965done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966test "$ac_cv_exeext" = no && ac_cv_exeext=
3967
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003968else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969 ac_file=''
3970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003971if test -z "$ac_file"; then :
3972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3973$as_echo "no" >&6; }
3974$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003975sed 's/^/| /' conftest.$ac_ext >&5
3976
Matthias Kloseb9621712010-04-24 17:59:49 +00003977{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3978$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003979as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003980See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003981else
3982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3983$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3986$as_echo_n "checking for C compiler default output file name... " >&6; }
3987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3988$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003990
Matthias Kloseb9621712010-04-24 17:59:49 +00003991rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003992ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3994$as_echo_n "checking for suffix of executables... " >&6; }
3995if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003996case "(($ac_try" in
3997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3998 *) ac_try_echo=$ac_try;;
3999esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4001$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004003 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004004 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4005 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004006 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4007# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4008# work properly (i.e., refer to `conftest.exe'), while it won't with
4009# `rm'.
4010for ac_file in conftest.exe conftest conftest.*; do
4011 test -f "$ac_file" || continue
4012 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004014 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4015 break;;
4016 * ) break;;
4017 esac
4018done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004019else
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004022as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004023See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004025rm -f conftest conftest$ac_cv_exeext
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4027$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028
4029rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004030EXEEXT=$ac_cv_exeext
4031ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4033/* end confdefs.h. */
4034#include <stdio.h>
4035int
4036main ()
4037{
4038FILE *f = fopen ("conftest.out", "w");
4039 return ferror (f) || fclose (f) != 0;
4040
4041 ;
4042 return 0;
4043}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004045ac_clean_files="$ac_clean_files conftest.out"
4046# Check that the compiler produces executables we can run. If not, either
4047# the compiler is broken, or we cross compile.
4048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4049$as_echo_n "checking whether we are cross compiling... " >&6; }
4050if test "$cross_compiling" != yes; then
4051 { { ac_try="$ac_link"
4052case "(($ac_try" in
4053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4054 *) ac_try_echo=$ac_try;;
4055esac
4056eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4057$as_echo "$ac_try_echo"; } >&5
4058 (eval "$ac_link") 2>&5
4059 ac_status=$?
4060 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4061 test $ac_status = 0; }
4062 if { ac_try='./conftest$ac_cv_exeext'
4063 { { case "(($ac_try" in
4064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4065 *) ac_try_echo=$ac_try;;
4066esac
4067eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4068$as_echo "$ac_try_echo"; } >&5
4069 (eval "$ac_try") 2>&5
4070 ac_status=$?
4071 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4072 test $ac_status = 0; }; }; then
4073 cross_compiling=no
4074 else
4075 if test "$cross_compiling" = maybe; then
4076 cross_compiling=yes
4077 else
4078 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4079$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004080as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004081If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004082See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004083 fi
4084 fi
4085fi
4086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4087$as_echo "$cross_compiling" >&6; }
4088
4089rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4090ac_clean_files=$ac_clean_files_save
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4092$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004093if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004094 $as_echo_n "(cached) " >&6
4095else
4096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004097/* end confdefs.h. */
4098
4099int
4100main ()
4101{
4102
4103 ;
4104 return 0;
4105}
4106_ACEOF
4107rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004108if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004109case "(($ac_try" in
4110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4111 *) ac_try_echo=$ac_try;;
4112esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004113eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4114$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004115 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004116 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004117 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4118 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004119 for ac_file in conftest.o conftest.obj conftest.*; do
4120 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004121 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004123 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4124 break;;
4125 esac
4126done
4127else
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004129sed 's/^/| /' conftest.$ac_ext >&5
4130
Matthias Kloseb9621712010-04-24 17:59:49 +00004131{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4132$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004133as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004134See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004135fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004136rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4139$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004140OBJEXT=$ac_cv_objext
4141ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4143$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004144if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004146else
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004149
Martin v. Löwis11437992002-04-12 09:54:03 +00004150int
4151main ()
4152{
4153#ifndef __GNUC__
4154 choke me
4155#endif
4156
4157 ;
4158 return 0;
4159}
4160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004161if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 ac_compiler_gnu=yes
4163else
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004167ac_cv_c_compiler_gnu=$ac_compiler_gnu
4168
4169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4171$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4172if test $ac_compiler_gnu = yes; then
4173 GCC=yes
4174else
4175 GCC=
4176fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004177ac_test_CFLAGS=${CFLAGS+set}
4178ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4180$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004181if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004182 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004183else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184 ac_save_c_werror_flag=$ac_c_werror_flag
4185 ac_c_werror_flag=yes
4186 ac_cv_prog_cc_g=no
4187 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004190
Martin v. Löwis11437992002-04-12 09:54:03 +00004191int
4192main ()
4193{
4194
4195 ;
4196 return 0;
4197}
4198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004199if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004200 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004201else
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 CFLAGS=""
4203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204/* end confdefs.h. */
4205
4206int
4207main ()
4208{
4209
4210 ;
4211 return 0;
4212}
4213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004214if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215
Matthias Kloseb9621712010-04-24 17:59:49 +00004216else
4217 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004218 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220/* end confdefs.h. */
4221
4222int
4223main ()
4224{
4225
4226 ;
4227 return 0;
4228}
4229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004230if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004231 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4238 ac_c_werror_flag=$ac_save_c_werror_flag
4239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4241$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004242if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004243 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004244elif test $ac_cv_prog_cc_g = yes; then
4245 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004246 CFLAGS="-g -O2"
4247 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004248 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004249 fi
4250else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004251 if test "$GCC" = yes; then
4252 CFLAGS="-O2"
4253 else
4254 CFLAGS=
4255 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4258$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004259if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004260 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004261else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004263ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004265/* end confdefs.h. */
4266#include <stdarg.h>
4267#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004268struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004269/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4270struct buf { int x; };
4271FILE * (*rcsopen) (struct buf *, struct stat *, int);
4272static char *e (p, i)
4273 char **p;
4274 int i;
4275{
4276 return p[i];
4277}
4278static char *f (char * (*g) (char **, int), char **p, ...)
4279{
4280 char *s;
4281 va_list v;
4282 va_start (v,p);
4283 s = g (p, va_arg (v,int));
4284 va_end (v);
4285 return s;
4286}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004287
4288/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4289 function prototypes and stuff, but not '\xHH' hex character constants.
4290 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004292 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4293 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004295int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4296
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4298 inside strings and character constants. */
4299#define FOO(x) 'x'
4300int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4301
Skip Montanaro6dead952003-09-25 14:50:04 +00004302int test (int i, double x);
4303struct s1 {int (*f) (int a);};
4304struct s2 {int (*f) (double a);};
4305int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4306int argc;
4307char **argv;
4308int
4309main ()
4310{
4311return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4312 ;
4313 return 0;
4314}
4315_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4317 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004318do
4319 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004320 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323rm -f core conftest.err conftest.$ac_objext
4324 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004325done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004327CC=$ac_save_CC
4328
4329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330# AC_CACHE_VAL
4331case "x$ac_cv_prog_cc_c89" in
4332 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4334$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4337$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004338 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4341$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004342esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004343if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004344
Matthias Kloseb9621712010-04-24 17:59:49 +00004345fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004346
Martin v. Löwis11437992002-04-12 09:54:03 +00004347ac_ext=c
4348ac_cpp='$CPP $CPPFLAGS'
4349ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4350ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4351ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004352
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004353
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004354
4355
Matthias Kloseb9621712010-04-24 17:59:49 +00004356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4357$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004360if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004362
4363 case $withval in
4364 no) with_cxx_main=no
4365 MAINCC='$(CC)';;
4366 yes) with_cxx_main=yes
4367 MAINCC='$(CXX)';;
4368 *) with_cxx_main=yes
4369 MAINCC=$withval
4370 if test -z "$CXX"
4371 then
4372 CXX=$withval
4373 fi;;
4374 esac
4375else
4376
4377 with_cxx_main=no
4378 MAINCC='$(CC)'
4379
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380fi
4381
Matthias Kloseb9621712010-04-24 17:59:49 +00004382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4383$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004384
4385preset_cxx="$CXX"
4386if test -z "$CXX"
4387then
4388 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004389 gcc) if test -n "$ac_tool_prefix"; then
4390 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4391set dummy ${ac_tool_prefix}g++; ac_word=$2
4392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4393$as_echo_n "checking for $ac_word... " >&6; }
4394if ${ac_cv_path_CXX+:} false; then :
4395 $as_echo_n "(cached) " >&6
4396else
4397 case $CXX in
4398 [\\/]* | ?:[\\/]*)
4399 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4400 ;;
4401 *)
4402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4403for as_dir in notfound
4404do
4405 IFS=$as_save_IFS
4406 test -z "$as_dir" && as_dir=.
4407 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004408 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004409 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4411 break 2
4412 fi
4413done
4414 done
4415IFS=$as_save_IFS
4416
4417 ;;
4418esac
4419fi
4420CXX=$ac_cv_path_CXX
4421if test -n "$CXX"; then
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4423$as_echo "$CXX" >&6; }
4424else
4425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4426$as_echo "no" >&6; }
4427fi
4428
4429
4430fi
4431if test -z "$ac_cv_path_CXX"; then
4432 ac_pt_CXX=$CXX
4433 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004434set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4436$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004437if ${ac_cv_path_ac_pt_CXX+:} false; then :
4438 $as_echo_n "(cached) " >&6
4439else
4440 case $ac_pt_CXX in
4441 [\\/]* | ?:[\\/]*)
4442 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4443 ;;
4444 *)
4445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4446for as_dir in notfound
4447do
4448 IFS=$as_save_IFS
4449 test -z "$as_dir" && as_dir=.
4450 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004452 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4454 break 2
4455 fi
4456done
4457 done
4458IFS=$as_save_IFS
4459
4460 ;;
4461esac
4462fi
4463ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4464if test -n "$ac_pt_CXX"; then
4465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4466$as_echo "$ac_pt_CXX" >&6; }
4467else
4468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4469$as_echo "no" >&6; }
4470fi
4471
4472 if test "x$ac_pt_CXX" = x; then
4473 CXX="g++"
4474 else
4475 case $cross_compiling:$ac_tool_warned in
4476yes:)
4477{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4478$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4479ac_tool_warned=yes ;;
4480esac
4481 CXX=$ac_pt_CXX
4482 fi
4483else
4484 CXX="$ac_cv_path_CXX"
4485fi
4486 ;;
4487 cc) if test -n "$ac_tool_prefix"; then
4488 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4489set dummy ${ac_tool_prefix}c++; ac_word=$2
4490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4491$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004492if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004493 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004494else
4495 case $CXX in
4496 [\\/]* | ?:[\\/]*)
4497 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4498 ;;
4499 *)
4500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4501for as_dir in notfound
4502do
4503 IFS=$as_save_IFS
4504 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004505 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004506 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004507 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004508 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004509 break 2
4510 fi
4511done
Matthias Kloseb9621712010-04-24 17:59:49 +00004512 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004513IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004514
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004515 ;;
4516esac
4517fi
4518CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004519if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4521$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004522else
Matthias Kloseb9621712010-04-24 17:59:49 +00004523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4524$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004526
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004527
4528fi
4529if test -z "$ac_cv_path_CXX"; then
4530 ac_pt_CXX=$CXX
4531 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004532set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4534$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004535if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004536 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004537else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004538 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004539 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004540 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 +00004541 ;;
4542 *)
4543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4544for as_dir in notfound
4545do
4546 IFS=$as_save_IFS
4547 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004548 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004549 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004550 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004552 break 2
4553 fi
4554done
Matthias Kloseb9621712010-04-24 17:59:49 +00004555 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004556IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004557
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004558 ;;
4559esac
4560fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004561ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4562if test -n "$ac_pt_CXX"; then
4563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4564$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004565else
Matthias Kloseb9621712010-04-24 17:59:49 +00004566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4567$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004569
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004570 if test "x$ac_pt_CXX" = x; then
4571 CXX="c++"
4572 else
4573 case $cross_compiling:$ac_tool_warned in
4574yes:)
4575{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4576$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4577ac_tool_warned=yes ;;
4578esac
4579 CXX=$ac_pt_CXX
4580 fi
4581else
4582 CXX="$ac_cv_path_CXX"
4583fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004584 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004585 clang|*/clang) if test -n "$ac_tool_prefix"; then
4586 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4587set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4589$as_echo_n "checking for $ac_word... " >&6; }
4590if ${ac_cv_path_CXX+:} false; then :
4591 $as_echo_n "(cached) " >&6
4592else
4593 case $CXX in
4594 [\\/]* | ?:[\\/]*)
4595 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4596 ;;
4597 *)
4598 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4599for as_dir in notfound
4600do
4601 IFS=$as_save_IFS
4602 test -z "$as_dir" && as_dir=.
4603 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004604 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004605 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4606 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4607 break 2
4608 fi
4609done
4610 done
4611IFS=$as_save_IFS
4612
Ned Deilycbfb9a52012-06-23 16:02:19 -07004613 ;;
4614esac
4615fi
4616CXX=$ac_cv_path_CXX
4617if test -n "$CXX"; then
4618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4619$as_echo "$CXX" >&6; }
4620else
4621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4622$as_echo "no" >&6; }
4623fi
4624
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004625
4626fi
4627if test -z "$ac_cv_path_CXX"; then
4628 ac_pt_CXX=$CXX
4629 # Extract the first word of "clang++", so it can be a program name with args.
4630set dummy clang++; ac_word=$2
4631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4632$as_echo_n "checking for $ac_word... " >&6; }
4633if ${ac_cv_path_ac_pt_CXX+:} false; then :
4634 $as_echo_n "(cached) " >&6
4635else
4636 case $ac_pt_CXX in
4637 [\\/]* | ?:[\\/]*)
4638 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4639 ;;
4640 *)
4641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4642for as_dir in notfound
4643do
4644 IFS=$as_save_IFS
4645 test -z "$as_dir" && as_dir=.
4646 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004648 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4650 break 2
4651 fi
4652done
4653 done
4654IFS=$as_save_IFS
4655
4656 ;;
4657esac
4658fi
4659ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4660if test -n "$ac_pt_CXX"; then
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4662$as_echo "$ac_pt_CXX" >&6; }
4663else
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4665$as_echo "no" >&6; }
4666fi
4667
4668 if test "x$ac_pt_CXX" = x; then
4669 CXX="clang++"
4670 else
4671 case $cross_compiling:$ac_tool_warned in
4672yes:)
4673{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4675ac_tool_warned=yes ;;
4676esac
4677 CXX=$ac_pt_CXX
4678 fi
4679else
4680 CXX="$ac_cv_path_CXX"
4681fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004682 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004683 esac
4684 if test "$CXX" = "notfound"
4685 then
4686 CXX=""
4687 fi
4688fi
4689if test -z "$CXX"
4690then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004691 if test -n "$ac_tool_prefix"; then
4692 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4693 do
4694 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4695set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4697$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004698if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004699 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004700else
4701 if test -n "$CXX"; then
4702 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4703else
4704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4705for as_dir in $PATH
4706do
4707 IFS=$as_save_IFS
4708 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004709 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004711 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004713 break 2
4714 fi
4715done
Matthias Kloseb9621712010-04-24 17:59:49 +00004716 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004717IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004718
4719fi
4720fi
4721CXX=$ac_cv_prog_CXX
4722if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4724$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004725else
Matthias Kloseb9621712010-04-24 17:59:49 +00004726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4727$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004728fi
4729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004730
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004731 test -n "$CXX" && break
4732 done
4733fi
4734if test -z "$CXX"; then
4735 ac_ct_CXX=$CXX
4736 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4737do
4738 # Extract the first word of "$ac_prog", so it can be a program name with args.
4739set dummy $ac_prog; ac_word=$2
4740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4741$as_echo_n "checking for $ac_word... " >&6; }
4742if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4743 $as_echo_n "(cached) " >&6
4744else
4745 if test -n "$ac_ct_CXX"; then
4746 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4747else
4748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4749for as_dir in $PATH
4750do
4751 IFS=$as_save_IFS
4752 test -z "$as_dir" && as_dir=.
4753 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004754 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004755 ac_cv_prog_ac_ct_CXX="$ac_prog"
4756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4757 break 2
4758 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004759done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004760 done
4761IFS=$as_save_IFS
4762
4763fi
4764fi
4765ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4766if test -n "$ac_ct_CXX"; then
4767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4768$as_echo "$ac_ct_CXX" >&6; }
4769else
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4771$as_echo "no" >&6; }
4772fi
4773
4774
4775 test -n "$ac_ct_CXX" && break
4776done
4777
4778 if test "x$ac_ct_CXX" = x; then
4779 CXX="notfound"
4780 else
4781 case $cross_compiling:$ac_tool_warned in
4782yes:)
4783{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4784$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4785ac_tool_warned=yes ;;
4786esac
4787 CXX=$ac_ct_CXX
4788 fi
4789fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790
4791 if test "$CXX" = "notfound"
4792 then
4793 CXX=""
4794 fi
4795fi
4796if test "$preset_cxx" != "$CXX"
4797then
Matthias Kloseb9621712010-04-24 17:59:49 +00004798 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004799
4800 By default, distutils will build C++ extension modules with \"$CXX\".
4801 If this is not intended, then set CXX on the configure command line.
4802 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004803$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804
4805 By default, distutils will build C++ extension modules with \"$CXX\".
4806 If this is not intended, then set CXX on the configure command line.
4807 " >&2;}
4808fi
4809
4810
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4812$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4813save_LDFLAGS="$LDFLAGS"
4814LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004815
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4817/* end confdefs.h. */
4818
4819int
4820main ()
4821{
4822
4823 ;
4824 return 0;
4825}
4826_ACEOF
4827if ac_fn_c_try_link "$LINENO"; then :
4828 NO_AS_NEEDED="-Wl,--no-as-needed"
4829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4830$as_echo "yes" >&6; }
4831else
4832 NO_AS_NEEDED=""
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4834$as_echo "no" >&6; }
4835fi
4836rm -f core conftest.err conftest.$ac_objext \
4837 conftest$ac_exeext conftest.$ac_ext
4838LDFLAGS="$save_LDFLAGS"
4839
4840
4841
4842# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004843ac_ext=c
4844ac_cpp='$CPP $CPPFLAGS'
4845ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4846ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4847ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4849$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004850# On Suns, sometimes $CPP names a directory.
4851if test -n "$CPP" && test -d "$CPP"; then
4852 CPP=
4853fi
4854if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004855 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004857else
Martin v. Löwis11437992002-04-12 09:54:03 +00004858 # Double quotes because CPP needs to be expanded
4859 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4860 do
4861 ac_preproc_ok=false
4862for ac_c_preproc_warn_flag in '' yes
4863do
4864 # Use a header file that comes with gcc, so configuring glibc
4865 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004866 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4867 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004868 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004869 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004871/* end confdefs.h. */
4872#ifdef __STDC__
4873# include <limits.h>
4874#else
4875# include <assert.h>
4876#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004877 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004879if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004880
Matthias Kloseb9621712010-04-24 17:59:49 +00004881else
Martin v. Löwis11437992002-04-12 09:54:03 +00004882 # Broken: fails on valid input.
4883continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004884fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004885rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004887 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004888 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004891#include <ac_nonexistent.h>
4892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004893if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004894 # Broken: success on invalid input.
4895continue
4896else
Martin v. Löwis11437992002-04-12 09:54:03 +00004897 # Passes both tests.
4898ac_preproc_ok=:
4899break
4900fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004901rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004902
4903done
4904# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004905rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004906if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004907 break
4908fi
4909
4910 done
4911 ac_cv_prog_CPP=$CPP
4912
4913fi
4914 CPP=$ac_cv_prog_CPP
4915else
4916 ac_cv_prog_CPP=$CPP
4917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4919$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004920ac_preproc_ok=false
4921for ac_c_preproc_warn_flag in '' yes
4922do
4923 # Use a header file that comes with gcc, so configuring glibc
4924 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004925 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4926 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004927 # On the NeXT, cc -E runs the code through the compiler's parser,
4928 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004930/* end confdefs.h. */
4931#ifdef __STDC__
4932# include <limits.h>
4933#else
4934# include <assert.h>
4935#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004936 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004938if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004939
Matthias Kloseb9621712010-04-24 17:59:49 +00004940else
Martin v. Löwis11437992002-04-12 09:54:03 +00004941 # Broken: fails on valid input.
4942continue
4943fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004944rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004946 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004947 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004950#include <ac_nonexistent.h>
4951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004952if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004953 # Broken: success on invalid input.
4954continue
4955else
Martin v. Löwis11437992002-04-12 09:54:03 +00004956 # Passes both tests.
4957ac_preproc_ok=:
4958break
4959fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004960rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004961
4962done
4963# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004964rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004965if $ac_preproc_ok; then :
4966
Martin v. Löwis11437992002-04-12 09:54:03 +00004967else
Matthias Kloseb9621712010-04-24 17:59:49 +00004968 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004970as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004971See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004972fi
4973
4974ac_ext=c
4975ac_cpp='$CPP $CPPFLAGS'
4976ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4977ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4978ac_compiler_gnu=$ac_cv_c_compiler_gnu
4979
4980
Matthias Kloseb9621712010-04-24 17:59:49 +00004981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4982$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004983if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004985else
Matthias Kloseb9621712010-04-24 17:59:49 +00004986 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004987 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004988 # Loop through the user's path and test for each of PROGNAME-LIST
4989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004990for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4991do
4992 IFS=$as_save_IFS
4993 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 for ac_prog in grep ggrep; do
4995 for ac_exec_ext in '' $ac_executable_extensions; do
4996 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004997 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004998# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004999 # Check for GNU $ac_path_GREP
5000case `"$ac_path_GREP" --version 2>&1` in
5001*GNU*)
5002 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5003*)
5004 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005005 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005006 while :
5007 do
5008 cat "conftest.in" "conftest.in" >"conftest.tmp"
5009 mv "conftest.tmp" "conftest.in"
5010 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005012 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5013 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005015 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5016 # Best one so far, save it but keep looking for a better one
5017 ac_cv_path_GREP="$ac_path_GREP"
5018 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005019 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005020 # 10*(2^10) chars as input seems more than enough
5021 test $ac_count -gt 10 && break
5022 done
5023 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5024esac
5025
Matthias Kloseb9621712010-04-24 17:59:49 +00005026 $ac_path_GREP_found && break 3
5027 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005028 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005030IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005032 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 +00005033 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005034else
5035 ac_cv_path_GREP=$GREP
5036fi
5037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5040$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005041 GREP="$ac_cv_path_GREP"
5042
5043
Matthias Kloseb9621712010-04-24 17:59:49 +00005044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5045$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005046if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048else
5049 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5050 then ac_cv_path_EGREP="$GREP -E"
5051 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005053 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 # Loop through the user's path and test for each of PROGNAME-LIST
5055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005056for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5057do
5058 IFS=$as_save_IFS
5059 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 for ac_prog in egrep; do
5061 for ac_exec_ext in '' $ac_executable_extensions; do
5062 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005063 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005064# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005065 # Check for GNU $ac_path_EGREP
5066case `"$ac_path_EGREP" --version 2>&1` in
5067*GNU*)
5068 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5069*)
5070 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005072 while :
5073 do
5074 cat "conftest.in" "conftest.in" >"conftest.tmp"
5075 mv "conftest.tmp" "conftest.in"
5076 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005078 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5079 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005081 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5082 # Best one so far, save it but keep looking for a better one
5083 ac_cv_path_EGREP="$ac_path_EGREP"
5084 ac_path_EGREP_max=$ac_count
5085 fi
5086 # 10*(2^10) chars as input seems more than enough
5087 test $ac_count -gt 10 && break
5088 done
5089 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5090esac
5091
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 $ac_path_EGREP_found && break 3
5093 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005096IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005098 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 +00005099 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005100else
5101 ac_cv_path_EGREP=$EGREP
5102fi
5103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104 fi
5105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5107$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005108 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005109
5110
Matthias Kloseb9621712010-04-24 17:59:49 +00005111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5112$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005113if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 $as_echo_n "(cached) " >&6
5115else
5116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005117/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005118#include <stdlib.h>
5119#include <stdarg.h>
5120#include <string.h>
5121#include <float.h>
5122
5123int
5124main ()
5125{
5126
5127 ;
5128 return 0;
5129}
5130_ACEOF
5131if ac_fn_c_try_compile "$LINENO"; then :
5132 ac_cv_header_stdc=yes
5133else
5134 ac_cv_header_stdc=no
5135fi
5136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5137
5138if test $ac_cv_header_stdc = yes; then
5139 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5141/* end confdefs.h. */
5142#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005143
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005144_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005146 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005148else
Matthias Kloseb9621712010-04-24 17:59:49 +00005149 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005150fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005151rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005152
Matthias Kloseb9621712010-04-24 17:59:49 +00005153fi
5154
5155if test $ac_cv_header_stdc = yes; then
5156 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5158/* end confdefs.h. */
5159#include <stdlib.h>
5160
5161_ACEOF
5162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5163 $EGREP "free" >/dev/null 2>&1; then :
5164
5165else
5166 ac_cv_header_stdc=no
5167fi
5168rm -f conftest*
5169
5170fi
5171
5172if test $ac_cv_header_stdc = yes; then
5173 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5174 if test "$cross_compiling" = yes; then :
5175 :
5176else
5177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5178/* end confdefs.h. */
5179#include <ctype.h>
5180#include <stdlib.h>
5181#if ((' ' & 0x0FF) == 0x020)
5182# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5183# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5184#else
5185# define ISLOWER(c) \
5186 (('a' <= (c) && (c) <= 'i') \
5187 || ('j' <= (c) && (c) <= 'r') \
5188 || ('s' <= (c) && (c) <= 'z'))
5189# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5190#endif
5191
5192#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5193int
5194main ()
5195{
5196 int i;
5197 for (i = 0; i < 256; i++)
5198 if (XOR (islower (i), ISLOWER (i))
5199 || toupper (i) != TOUPPER (i))
5200 return 2;
5201 return 0;
5202}
5203_ACEOF
5204if ac_fn_c_try_run "$LINENO"; then :
5205
5206else
5207 ac_cv_header_stdc=no
5208fi
5209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5210 conftest.$ac_objext conftest.beam conftest.$ac_ext
5211fi
5212
5213fi
5214fi
5215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5216$as_echo "$ac_cv_header_stdc" >&6; }
5217if test $ac_cv_header_stdc = yes; then
5218
5219$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5220
5221fi
5222
5223# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5224for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5225 inttypes.h stdint.h unistd.h
5226do :
5227 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5228ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5229"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005230if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005231 cat >>confdefs.h <<_ACEOF
5232#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5233_ACEOF
5234
5235fi
5236
5237done
5238
5239
5240
5241 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 +02005242if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005243 MINIX=yes
5244else
5245 MINIX=
5246fi
5247
5248
5249 if test "$MINIX" = yes; then
5250
5251$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5252
5253
5254$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5255
5256
5257$as_echo "#define _MINIX 1" >>confdefs.h
5258
5259 fi
5260
5261
5262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5263$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005264if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005265 $as_echo_n "(cached) " >&6
5266else
5267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5268/* end confdefs.h. */
5269
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005270# define __EXTENSIONS__ 1
5271 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005272int
5273main ()
5274{
5275
5276 ;
5277 return 0;
5278}
5279_ACEOF
5280if ac_fn_c_try_compile "$LINENO"; then :
5281 ac_cv_safe_to_define___extensions__=yes
5282else
5283 ac_cv_safe_to_define___extensions__=no
5284fi
5285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5286fi
5287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5288$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5289 test $ac_cv_safe_to_define___extensions__ = yes &&
5290 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5291
5292 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5293
5294 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5295
5296 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5297
5298 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5299
5300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005302# Check for unsupported systems
5303case $ac_sys_system/$ac_sys_release in
5304atheos*|Linux*/1*)
5305 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5306 echo See README for details.
5307 exit 1;;
5308esac
5309
5310
Matthias Kloseb9621712010-04-24 17:59:49 +00005311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5312$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313
5314# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005315if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316 withval=$with_suffix;
5317 case $withval in
5318 no) EXEEXT=;;
5319 yes) EXEEXT=.exe;;
5320 *) EXEEXT=$withval;;
5321 esac
5322fi
5323
Matthias Kloseb9621712010-04-24 17:59:49 +00005324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5325$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005326
5327# Test whether we're running on a non-case-sensitive system, in which
5328# case we give a warning if no ext is given
5329
Matthias Kloseb9621712010-04-24 17:59:49 +00005330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5331$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005332if test ! -d CaseSensitiveTestDir; then
5333mkdir CaseSensitiveTestDir
5334fi
5335
5336if test -d casesensitivetestdir
5337then
Matthias Kloseb9621712010-04-24 17:59:49 +00005338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5339$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340 BUILDEXEEXT=.exe
5341else
Matthias Kloseb9621712010-04-24 17:59:49 +00005342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5343$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005344 BUILDEXEEXT=$EXEEXT
5345fi
5346rmdir CaseSensitiveTestDir
5347
5348case $MACHDEP in
5349bsdos*)
5350 case $CC in
5351 gcc) CC="$CC -D_HAVE_BSDI";;
5352 esac;;
5353esac
5354
5355case $ac_sys_system in
5356hp*|HP*)
5357 case $CC in
5358 cc|*/cc) CC="$CC -Ae";;
5359 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360esac
5361
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005362MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5363
5364
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365
5366
Matthias Kloseb9621712010-04-24 17:59:49 +00005367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5368$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369if test -z "$LIBRARY"
5370then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005371 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5374$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375
5376# LDLIBRARY is the name of the library to link against (as opposed to the
5377# name of the library into which to insert object files). BLDLIBRARY is also
5378# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5379# is blank as the main program is not linked directly against LDLIBRARY.
5380# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5381# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5382# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5383# DLLLIBRARY is the shared (i.e., DLL) library.
5384#
5385# RUNSHARED is used to run shared python without installed libraries
5386#
5387# INSTSONAME is the name of the shared library that will be use to install
5388# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005389#
5390# LDVERSION is the shared library version number, normally the Python version
5391# with the ABI build flags appended.
5392
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393
5394
5395
5396
5397
5398
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005399
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005400LDLIBRARY="$LIBRARY"
5401BLDLIBRARY='$(LDLIBRARY)'
5402INSTSONAME='$(LDLIBRARY)'
5403DLLLIBRARY=''
5404LDLIBRARYDIR=''
5405RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005406LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407
5408# LINKCC is the command that links the python executable -- default is $(CC).
5409# If CXX is set, and if it is needed to link a main function that was
5410# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5411# python might then depend on the C++ runtime
5412# This is altered for AIX in order to build the export list before
5413# linking.
5414
Matthias Kloseb9621712010-04-24 17:59:49 +00005415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5416$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417if test -z "$LINKCC"
5418then
5419 LINKCC='$(PURIFY) $(MAINCC)'
5420 case $ac_sys_system in
5421 AIX*)
5422 exp_extra="\"\""
5423 if test $ac_sys_release -ge 5 -o \
5424 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5425 exp_extra="."
5426 fi
5427 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428 QNX*)
5429 # qcc must be used because the other compilers do not
5430 # support -N.
5431 LINKCC=qcc;;
5432 esac
5433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5435$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436
5437# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5438# make sure we default having it set to "no": this is used by
5439# distutils.unixccompiler to know if it should add --enable-new-dtags
5440# to linker command lines, and failing to detect GNU ld simply results
5441# in the same bahaviour as before.
5442
Matthias Kloseb9621712010-04-24 17:59:49 +00005443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5444$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005445ac_prog=ld
5446if test "$GCC" = yes; then
5447 ac_prog=`$CC -print-prog-name=ld`
5448fi
5449case `"$ac_prog" -V 2>&1 < /dev/null` in
5450 *GNU*)
5451 GNULD=yes;;
5452 *)
5453 GNULD=no;;
5454esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5456$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5459$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005460if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005461 $as_echo_n "(cached) " >&6
5462else
5463 ac_cv_c_inline=no
5464for ac_kw in inline __inline__ __inline; do
5465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5466/* end confdefs.h. */
5467#ifndef __cplusplus
5468typedef int foo_t;
5469static $ac_kw foo_t static_foo () {return 0; }
5470$ac_kw foo_t foo () {return 0; }
5471#endif
5472
5473_ACEOF
5474if ac_fn_c_try_compile "$LINENO"; then :
5475 ac_cv_c_inline=$ac_kw
5476fi
5477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5478 test "$ac_cv_c_inline" != no && break
5479done
5480
5481fi
5482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5483$as_echo "$ac_cv_c_inline" >&6; }
5484
5485case $ac_cv_c_inline in
5486 inline | yes) ;;
5487 *)
5488 case $ac_cv_c_inline in
5489 no) ac_val=;;
5490 *) ac_val=$ac_cv_c_inline;;
5491 esac
5492 cat >>confdefs.h <<_ACEOF
5493#ifndef __cplusplus
5494#define inline $ac_val
5495#endif
5496_ACEOF
5497 ;;
5498esac
5499
5500if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005501
5502$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005503
5504
5505fi
5506
5507
Matthias Kloseb9621712010-04-24 17:59:49 +00005508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5509$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005511if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005512 enableval=$enable_shared;
5513fi
5514
5515
5516if test -z "$enable_shared"
5517then
5518 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005519 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520 enable_shared="yes";;
5521 *)
5522 enable_shared="no";;
5523 esac
5524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5526$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005527
Matthias Kloseb9621712010-04-24 17:59:49 +00005528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5529$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005530# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005531if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005532 enableval=$enable_profiling;
5533fi
5534
5535if test "x$enable_profiling" = xyes; then
5536 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005537 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539/* end confdefs.h. */
5540int main() { return 0; }
5541_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005542if ac_fn_c_try_link "$LINENO"; then :
5543
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005545 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005547rm -f core conftest.err conftest.$ac_objext \
5548 conftest$ac_exeext conftest.$ac_ext
5549 CC="$ac_save_cc"
5550else
5551 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5554$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555
doko@ubuntu.comba015832012-06-30 16:52:05 +02005556if test "x$enable_profiling" = xyes; then
5557 BASECFLAGS="-pg $BASECFLAGS"
5558 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559fi
5560
Matthias Kloseb9621712010-04-24 17:59:49 +00005561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5562$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563
5564# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5565# library that we build, but we do not want to link against it (we
5566# will find it with a -framework option). For this reason there is an
5567# extra variable BLDLIBRARY against which Python and the extension
5568# modules are linked, BLDLIBRARY. This is normally the same as
5569# LDLIBRARY, but empty for MacOSX framework builds.
5570if test "$enable_framework"
5571then
5572 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5573 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5574 BLDLIBRARY=''
5575else
5576 BLDLIBRARY='$(LDLIBRARY)'
5577fi
5578
5579# Other platforms follow
5580if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005581 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005582
Matthias Kloseb9621712010-04-24 17:59:49 +00005583$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005584
5585 case $ac_sys_system in
5586 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005587 LDLIBRARY='libpython$(LDVERSION).dll.a'
5588 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005589 ;;
5590 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005591 LDLIBRARY='libpython$(LDVERSION).so'
5592 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005593 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5594 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005595 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005596 then
5597 PY3LIBRARY=libpython3.so
5598 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005600 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005601 LDLIBRARY='libpython$(LDVERSION).so'
5602 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5604 case $ac_sys_system in
5605 FreeBSD*)
5606 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5607 ;;
5608 esac
5609 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005610 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005611 then
5612 PY3LIBRARY=libpython3.so
5613 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614 ;;
5615 hp*|HP*)
5616 case `uname -m` in
5617 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005618 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619 ;;
5620 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005621 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622 ;;
5623 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005624 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5626 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005628 LDLIBRARY='libpython$(LDVERSION).dylib'
5629 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5631 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005632 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005633 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005634 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5635 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005636
5637 esac
5638else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005639 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640 case $ac_sys_system in
5641 CYGWIN*)
5642 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005643 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644 ;;
5645 esac
5646fi
5647
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005648if test "$cross_compiling" = yes; then
5649 RUNSHARED=
5650fi
5651
Matthias Kloseb9621712010-04-24 17:59:49 +00005652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5653$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654
5655if test -n "$ac_tool_prefix"; then
5656 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5657set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005660if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005661 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662else
5663 if test -n "$RANLIB"; then
5664 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5665else
5666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5667for as_dir in $PATH
5668do
5669 IFS=$as_save_IFS
5670 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 break 2
5676 fi
5677done
Matthias Kloseb9621712010-04-24 17:59:49 +00005678 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679IFS=$as_save_IFS
5680
5681fi
5682fi
5683RANLIB=$ac_cv_prog_RANLIB
5684if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5686$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687else
Matthias Kloseb9621712010-04-24 17:59:49 +00005688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5689$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690fi
5691
5692
5693fi
5694if test -z "$ac_cv_prog_RANLIB"; then
5695 ac_ct_RANLIB=$RANLIB
5696 # Extract the first word of "ranlib", so it can be a program name with args.
5697set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5699$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005700if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005701 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702else
5703 if test -n "$ac_ct_RANLIB"; then
5704 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5705else
5706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5707for as_dir in $PATH
5708do
5709 IFS=$as_save_IFS
5710 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005711 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715 break 2
5716 fi
5717done
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719IFS=$as_save_IFS
5720
5721fi
5722fi
5723ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5724if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5726$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727else
Matthias Kloseb9621712010-04-24 17:59:49 +00005728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5729$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730fi
5731
5732 if test "x$ac_ct_RANLIB" = x; then
5733 RANLIB=":"
5734 else
5735 case $cross_compiling:$ac_tool_warned in
5736yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005737{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5738$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739ac_tool_warned=yes ;;
5740esac
5741 RANLIB=$ac_ct_RANLIB
5742 fi
5743else
5744 RANLIB="$ac_cv_prog_RANLIB"
5745fi
5746
5747
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005748if test -n "$ac_tool_prefix"; then
5749 for ac_prog in ar aal
5750 do
5751 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5752set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5754$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005755if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005756 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757else
5758 if test -n "$AR"; then
5759 ac_cv_prog_AR="$AR" # Let the user override the test.
5760else
5761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5762for as_dir in $PATH
5763do
5764 IFS=$as_save_IFS
5765 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005766 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005767 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005768 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770 break 2
5771 fi
5772done
Matthias Kloseb9621712010-04-24 17:59:49 +00005773 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774IFS=$as_save_IFS
5775
5776fi
5777fi
5778AR=$ac_cv_prog_AR
5779if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5781$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782else
Matthias Kloseb9621712010-04-24 17:59:49 +00005783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5784$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785fi
5786
5787
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005788 test -n "$AR" && break
5789 done
5790fi
5791if test -z "$AR"; then
5792 ac_ct_AR=$AR
5793 for ac_prog in ar aal
5794do
5795 # Extract the first word of "$ac_prog", so it can be a program name with args.
5796set dummy $ac_prog; ac_word=$2
5797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5798$as_echo_n "checking for $ac_word... " >&6; }
5799if ${ac_cv_prog_ac_ct_AR+:} false; then :
5800 $as_echo_n "(cached) " >&6
5801else
5802 if test -n "$ac_ct_AR"; then
5803 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5804else
5805as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5806for as_dir in $PATH
5807do
5808 IFS=$as_save_IFS
5809 test -z "$as_dir" && as_dir=.
5810 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005811 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005812 ac_cv_prog_ac_ct_AR="$ac_prog"
5813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5814 break 2
5815 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005817 done
5818IFS=$as_save_IFS
5819
5820fi
5821fi
5822ac_ct_AR=$ac_cv_prog_ac_ct_AR
5823if test -n "$ac_ct_AR"; then
5824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5825$as_echo "$ac_ct_AR" >&6; }
5826else
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5828$as_echo "no" >&6; }
5829fi
5830
5831
5832 test -n "$ac_ct_AR" && break
5833done
5834
5835 if test "x$ac_ct_AR" = x; then
5836 AR="ar"
5837 else
5838 case $cross_compiling:$ac_tool_warned in
5839yes:)
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5841$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5842ac_tool_warned=yes ;;
5843esac
5844 AR=$ac_ct_AR
5845 fi
5846fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847
5848
5849# tweak ARFLAGS only if the user didn't set it on the command line
5850
5851if test -z "$ARFLAGS"
5852then
5853 ARFLAGS="rc"
5854fi
5855
doko@ubuntu.com58844492012-06-30 18:25:32 +02005856if test -n "$ac_tool_prefix"; then
5857 for ac_prog in readelf
5858 do
5859 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5860set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5862$as_echo_n "checking for $ac_word... " >&6; }
5863if ${ac_cv_prog_READELF+:} false; then :
5864 $as_echo_n "(cached) " >&6
5865else
5866 if test -n "$READELF"; then
5867 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5868else
5869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5870for as_dir in $PATH
5871do
5872 IFS=$as_save_IFS
5873 test -z "$as_dir" && as_dir=.
5874 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005875 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005876 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5878 break 2
5879 fi
5880done
5881 done
5882IFS=$as_save_IFS
5883
5884fi
5885fi
5886READELF=$ac_cv_prog_READELF
5887if test -n "$READELF"; then
5888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5889$as_echo "$READELF" >&6; }
5890else
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5892$as_echo "no" >&6; }
5893fi
5894
5895
5896 test -n "$READELF" && break
5897 done
5898fi
5899if test -z "$READELF"; then
5900 ac_ct_READELF=$READELF
5901 for ac_prog in readelf
5902do
5903 # Extract the first word of "$ac_prog", so it can be a program name with args.
5904set dummy $ac_prog; ac_word=$2
5905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5906$as_echo_n "checking for $ac_word... " >&6; }
5907if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5908 $as_echo_n "(cached) " >&6
5909else
5910 if test -n "$ac_ct_READELF"; then
5911 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5912else
5913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5914for as_dir in $PATH
5915do
5916 IFS=$as_save_IFS
5917 test -z "$as_dir" && as_dir=.
5918 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005919 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005920 ac_cv_prog_ac_ct_READELF="$ac_prog"
5921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5922 break 2
5923 fi
5924done
5925 done
5926IFS=$as_save_IFS
5927
5928fi
5929fi
5930ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5931if test -n "$ac_ct_READELF"; then
5932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5933$as_echo "$ac_ct_READELF" >&6; }
5934else
5935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5936$as_echo "no" >&6; }
5937fi
5938
5939
5940 test -n "$ac_ct_READELF" && break
5941done
5942
5943 if test "x$ac_ct_READELF" = x; then
5944 READELF=":"
5945 else
5946 case $cross_compiling:$ac_tool_warned in
5947yes:)
5948{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5949$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5950ac_tool_warned=yes ;;
5951esac
5952 READELF=$ac_ct_READELF
5953 fi
5954fi
5955
5956if test "$cross_compiling" = yes; then
5957 case "$READELF" in
5958 readelf|:)
5959 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5960 ;;
5961 esac
5962fi
5963
5964
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965
Matthias Klosec4c48422012-10-21 23:05:35 +02005966for ac_prog in python$PACKAGE_VERSION python3 python
5967do
5968 # Extract the first word of "$ac_prog", so it can be a program name with args.
5969set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5971$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005972if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005973 $as_echo_n "(cached) " >&6
5974else
Matthias Klosec4c48422012-10-21 23:05:35 +02005975 if test -n "$PYTHON"; then
5976 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005977else
5978as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5979for as_dir in $PATH
5980do
5981 IFS=$as_save_IFS
5982 test -z "$as_dir" && as_dir=.
5983 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005984 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005985 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005986 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5987 break 2
5988 fi
5989done
5990 done
5991IFS=$as_save_IFS
5992
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005993fi
5994fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005995PYTHON=$ac_cv_prog_PYTHON
5996if test -n "$PYTHON"; then
5997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5998$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005999else
6000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6001$as_echo "no" >&6; }
6002fi
6003
6004
Matthias Klosec4c48422012-10-21 23:05:35 +02006005 test -n "$PYTHON" && break
6006done
6007test -n "$PYTHON" || PYTHON="not-found"
6008
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006009if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006010 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6011else
6012 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006013fi
6014
6015
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016case $MACHDEP in
6017bsdos*|hp*|HP*)
6018 # install -d does not work on BSDI or HP-UX
6019 if test -z "$INSTALL"
6020 then
6021 INSTALL="${srcdir}/install-sh -c"
6022 fi
6023esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024# Find a good install program. We prefer a C program (faster),
6025# so one script is as good as another. But avoid the broken or
6026# incompatible versions:
6027# SysV /etc/install, /usr/sbin/install
6028# SunOS /usr/etc/install
6029# IRIX /sbin/install
6030# AIX /bin/install
6031# AmigaOS /C/install, which installs bootblocks on floppy discs
6032# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6033# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6034# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6035# OS/2's system install, which has a completely different semantic
6036# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006037# Reject install programs that cannot install multiple files.
6038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6039$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006041if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043else
6044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045for as_dir in $PATH
6046do
6047 IFS=$as_save_IFS
6048 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006049 # Account for people who put trailing slashes in PATH elements.
6050case $as_dir/ in #((
6051 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054 /usr/ucb/* ) ;;
6055 *)
6056 # OSF1 and SCO ODT 3.0 have their own names for install.
6057 # Don't use installbsd from OSF since it installs stuff as root
6058 # by default.
6059 for ac_prog in ginstall scoinst install; do
6060 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006061 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062 if test $ac_prog = install &&
6063 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6064 # AIX install. It has an incompatible calling convention.
6065 :
6066 elif test $ac_prog = install &&
6067 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6068 # program-specific install script used by HP pwplus--don't use.
6069 :
6070 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006071 rm -rf conftest.one conftest.two conftest.dir
6072 echo one > conftest.one
6073 echo two > conftest.two
6074 mkdir conftest.dir
6075 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6076 test -s conftest.one && test -s conftest.two &&
6077 test -s conftest.dir/conftest.one &&
6078 test -s conftest.dir/conftest.two
6079 then
6080 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6081 break 3
6082 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083 fi
6084 fi
6085 done
6086 done
6087 ;;
6088esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006089
6090 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091IFS=$as_save_IFS
6092
Matthias Kloseb9621712010-04-24 17:59:49 +00006093rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094
6095fi
6096 if test "${ac_cv_path_install+set}" = set; then
6097 INSTALL=$ac_cv_path_install
6098 else
6099 # As a last resort, use the slow shell script. Don't cache a
6100 # value for INSTALL within a source directory, because that will
6101 # break other packages using the cache if that directory is
6102 # removed, or if the value is a relative name.
6103 INSTALL=$ac_install_sh
6104 fi
6105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6107$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006108
6109# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6110# It thinks the first close brace ends the variable substitution.
6111test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6112
6113test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6114
6115test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6116
Matthias Klose93a0ef12012-03-15 18:08:34 +01006117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6118$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6119if test -z "$MKDIR_P"; then
6120 if ${ac_cv_path_mkdir+:} false; then :
6121 $as_echo_n "(cached) " >&6
6122else
6123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6124for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6125do
6126 IFS=$as_save_IFS
6127 test -z "$as_dir" && as_dir=.
6128 for ac_prog in mkdir gmkdir; do
6129 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006130 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006131 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6132 'mkdir (GNU coreutils) '* | \
6133 'mkdir (coreutils) '* | \
6134 'mkdir (fileutils) '4.1*)
6135 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6136 break 3;;
6137 esac
6138 done
6139 done
6140 done
6141IFS=$as_save_IFS
6142
6143fi
6144
6145 test -d ./--version && rmdir ./--version
6146 if test "${ac_cv_path_mkdir+set}" = set; then
6147 MKDIR_P="$ac_cv_path_mkdir -p"
6148 else
6149 # As a last resort, use the slow shell script. Don't cache a
6150 # value for MKDIR_P within a source directory, because that will
6151 # break other packages using the cache if that directory is
6152 # removed, or if the value is a relative name.
6153 MKDIR_P="$ac_install_sh -d"
6154 fi
6155fi
6156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6157$as_echo "$MKDIR_P" >&6; }
6158
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159
6160# Not every filesystem supports hard links
6161
6162if test -z "$LN" ; then
6163 case $ac_sys_system in
6164 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165 *) LN=ln;;
6166 esac
6167fi
6168
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006169# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006170
6171ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006172
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6175$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176
6177# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006178if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179 withval=$with_pydebug;
6180if test "$withval" != no
6181then
6182
Matthias Kloseb9621712010-04-24 17:59:49 +00006183$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184
Matthias Kloseb9621712010-04-24 17:59:49 +00006185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6186$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006188 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006189else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6190$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191fi
6192else
Matthias Kloseb9621712010-04-24 17:59:49 +00006193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6194$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195fi
6196
6197
6198# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6199# merged with this chunk of code?
6200
6201# Optimizer/debugger flags
6202# ------------------------
6203# (The following bit of code is complicated enough - please keep things
6204# indented properly. Just pretend you're editing Python code. ;-)
6205
6206# There are two parallel sets of case statements below, one that checks to
6207# see if OPT was set and one that does BASECFLAGS setting based upon
6208# compiler and platform. BASECFLAGS tweaks need to be made even if the
6209# user set OPT.
6210
6211# tweak OPT based on compiler and platform, only if the user didn't set
6212# it on the command line
6213
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006214if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006215then
6216 case $GCC in
6217 yes)
6218 if test "$CC" != 'g++' ; then
6219 STRICT_PROTO="-Wstrict-prototypes"
6220 fi
6221 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6222 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6223 WRAP="-fwrapv"
6224 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006225
6226 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006227 case $CC in
6228 *clang*) WRAP="-fwrapv"
6229 ;;
6230 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006231
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232 case $ac_cv_prog_cc_g in
6233 yes)
6234 if test "$Py_DEBUG" = 'true' ; then
6235 # Optimization messes up debuggers, so turn it off for
6236 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006237 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238 else
6239 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6240 fi
6241 ;;
6242 *)
6243 OPT="-O3 -Wall $STRICT_PROTO"
6244 ;;
6245 esac
6246 case $ac_sys_system in
6247 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6248 ;;
6249 esac
6250 ;;
6251
6252 *)
6253 OPT="-O"
6254 ;;
6255 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006256fi
6257
6258
6259
6260# The -arch flags for universal builds on OSX
6261UNIVERSAL_ARCH_FLAGS=
6262
6263
6264# tweak BASECFLAGS based on compiler and platform
6265case $GCC in
6266yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006267 # Python doesn't violate C99 aliasing rules, but older versions of
6268 # GCC produce warnings for legal Python code. Enable
6269 # -fno-strict-aliasing on versions of GCC that support but produce
6270 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6272$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273 ac_save_cc="$CC"
6274 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006275 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006276 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006277 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006278else
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006280/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006281
Matthias Kloseb159a552010-04-25 21:00:44 +00006282
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006283int
6284main ()
6285{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006286
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006287 ;
6288 return 0;
6289}
Matthias Kloseb159a552010-04-25 21:00:44 +00006290
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006292if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006293
6294 CC="$ac_save_cc -fstrict-aliasing"
6295 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006297/* end confdefs.h. */
6298
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006299 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006300int
6301main ()
6302{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006303double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006304 ;
6305 return 0;
6306}
Matthias Kloseb159a552010-04-25 21:00:44 +00006307
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006309if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006310
6311 ac_cv_no_strict_aliasing=no
6312
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313else
Matthias Kloseb159a552010-04-25 21:00:44 +00006314
6315 ac_cv_no_strict_aliasing=yes
6316
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006317fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006319
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006320else
Matthias Kloseb159a552010-04-25 21:00:44 +00006321
6322 ac_cv_no_strict_aliasing=no
6323
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006326fi
6327
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006328 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6331$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006332 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333 then
6334 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6335 fi
6336
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6338$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6339 ac_save_cc="$CC"
6340 CC="$CC -Wunused-result -Werror"
6341 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006342 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006343 $as_echo_n "(cached) " >&6
6344else
6345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6346/* end confdefs.h. */
6347
6348
6349int
6350main ()
6351{
6352
6353 ;
6354 return 0;
6355}
6356
6357_ACEOF
6358if ac_fn_c_try_compile "$LINENO"; then :
6359
6360 ac_cv_disable_unused_result_warning=yes
6361
6362else
6363
6364 ac_cv_disable_unused_result_warning=no
6365
6366fi
6367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6368fi
6369
6370 CFLAGS="$save_CFLAGS"
6371 CC="$ac_save_cc"
6372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6373$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6374
6375 if test $ac_cv_disable_unused_result_warning = yes
6376 then
6377 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6378 fi
6379
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006380 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6381 # support. Without this, treatment of subnormals doesn't follow
6382 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006383 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006384 alpha*)
6385 BASECFLAGS="$BASECFLAGS -mieee"
6386 ;;
6387 esac
6388
6389 case $ac_sys_system in
6390 SCO_SV*)
6391 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6392 ;;
6393 # is there any other compiler on Darwin besides gcc?
6394 Darwin*)
6395 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6396 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006397 if test "${CC}" = gcc
6398 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6400$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006401 case "${UNIVERSALSDK}" in
6402 */MacOSX10.4u.sdk)
6403 # Build using 10.4 SDK, force usage of gcc when the
6404 # compiler is gcc, otherwise the user will get very
6405 # confusing error messages when building on OSX 10.6
6406 CC=gcc-4.0
6407 CPP=cpp-4.0
6408 ;;
6409 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6411$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006412 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006413
6414
6415 if test "${enable_universalsdk}"; then
6416 UNIVERSAL_ARCH_FLAGS=""
6417 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6418 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6419 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006420 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6422 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006423 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006424 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006425
6426 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6427 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006428 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006429 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006430
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006431 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6432 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006433 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006434 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006435
6436 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6437 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006438 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006439 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006440
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006441 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006442 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 +00006443
6444 fi
6445
6446
Ronald Oussoren666028b2010-04-18 19:07:43 +00006447 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6448 if test "${UNIVERSALSDK}" != "/"
6449 then
6450 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6451 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006452 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006453 fi
6454 fi
6455
6456 # Calculate the right deployment target for this build.
6457 #
6458 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006459 if test ${cur_target} '>' 10.2 && \
6460 test ${cur_target} '<' 10.6
6461 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006462 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006463 if test ${enable_universalsdk}; then
6464 if test "${UNIVERSAL_ARCHS}" = "all"; then
6465 # Ensure that the default platform for a
6466 # 4-way universal build is OSX 10.5,
6467 # that's the first OS release where
6468 # 4-way builds make sense.
6469 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006470
6471 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6472 cur_target='10.5'
6473
6474 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6475 cur_target='10.5'
6476
6477 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6478 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006479 fi
6480 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006481 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006482 # On Intel macs default to a deployment
6483 # target of 10.4, that's the first OSX
6484 # release with Intel support.
6485 cur_target="10.4"
6486 fi
6487 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006488 fi
6489 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6490
6491 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6492 # environment with a value that is the same as what we'll use
6493 # in the Makefile to ensure that we'll get the same compiler
6494 # environment during configure and build time.
6495 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6496 export MACOSX_DEPLOYMENT_TARGET
6497 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6498
6499 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006500 esac
6501 ;;
6502
6503*)
6504 case $ac_sys_system in
6505 OpenUNIX*|UnixWare*)
6506 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6507 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006508 SCO_SV*)
6509 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6510 ;;
6511 esac
6512 ;;
6513esac
6514
6515if test "$Py_DEBUG" = 'true'; then
6516 :
6517else
6518 OPT="-DNDEBUG $OPT"
6519fi
6520
6521if test "$ac_arch_flags"
6522then
6523 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6524fi
6525
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006526# Check whether GCC supports PyArg_ParseTuple format
6527if test "$GCC" = "yes"
6528then
Matthias Kloseb9621712010-04-24 17:59:49 +00006529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6530$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006531 save_CFLAGS=$CFLAGS
6532 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006534/* end confdefs.h. */
6535
6536 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006537int
6538main ()
6539{
6540
6541 ;
6542 return 0;
6543}
Matthias Kloseb159a552010-04-25 21:00:44 +00006544
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006546if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006547
Matthias Kloseb159a552010-04-25 21:00:44 +00006548
Matthias Kloseb9621712010-04-24 17:59:49 +00006549$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006550
Matthias Kloseb159a552010-04-25 21:00:44 +00006551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006552$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006553
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006554else
Matthias Kloseb159a552010-04-25 21:00:44 +00006555
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006557$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006558
6559fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6561 CFLAGS=$save_CFLAGS
6562fi
6563
6564# On some compilers, pthreads are available without further options
6565# (e.g. MacOS X). On some of these systems, the compiler will not
6566# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6567# So we have to see first whether pthreads are available without
6568# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6570$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006571if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006572 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006573else
Matthias Kloseb9621712010-04-24 17:59:49 +00006574 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006575 ac_cv_pthread_is_default=no
6576else
Matthias Kloseb9621712010-04-24 17:59:49 +00006577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006578/* end confdefs.h. */
6579
Stefan Krah7dba5942012-11-22 22:49:11 +01006580#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006581#include <pthread.h>
6582
6583void* routine(void* p){return NULL;}
6584
6585int main(){
6586 pthread_t p;
6587 if(pthread_create(&p,NULL,routine,NULL)!=0)
6588 return 1;
6589 (void)pthread_detach(p);
6590 return 0;
6591}
6592
6593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006594if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006595
6596 ac_cv_pthread_is_default=yes
6597 ac_cv_kthread=no
6598 ac_cv_pthread=no
6599
6600else
Matthias Kloseb9621712010-04-24 17:59:49 +00006601 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006603rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6604 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006605fi
6606
6607
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006608fi
6609
Matthias Kloseb9621712010-04-24 17:59:49 +00006610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6611$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006612
6613
6614if test $ac_cv_pthread_is_default = yes
6615then
6616 ac_cv_kpthread=no
6617else
6618# -Kpthread, if available, provides the right #defines
6619# and linker options to make pthread_create available
6620# Some compilers won't report that they do not support -Kpthread,
6621# so we need to run a program to see whether it really made the
6622# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6624$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006625if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006626 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006627else
6628 ac_save_cc="$CC"
6629CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006630if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006631 ac_cv_kpthread=no
6632else
Matthias Kloseb9621712010-04-24 17:59:49 +00006633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006634/* end confdefs.h. */
6635
Stefan Krah7dba5942012-11-22 22:49:11 +01006636#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006637#include <pthread.h>
6638
6639void* routine(void* p){return NULL;}
6640
6641int main(){
6642 pthread_t p;
6643 if(pthread_create(&p,NULL,routine,NULL)!=0)
6644 return 1;
6645 (void)pthread_detach(p);
6646 return 0;
6647}
6648
6649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006650if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006651 ac_cv_kpthread=yes
6652else
Matthias Kloseb9621712010-04-24 17:59:49 +00006653 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006655rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6656 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006657fi
6658
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006659CC="$ac_save_cc"
6660fi
6661
Matthias Kloseb9621712010-04-24 17:59:49 +00006662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6663$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006664fi
6665
6666if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6667then
6668# -Kthread, if available, provides the right #defines
6669# and linker options to make pthread_create available
6670# Some compilers won't report that they do not support -Kthread,
6671# so we need to run a program to see whether it really made the
6672# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6674$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006675if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006676 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006677else
6678 ac_save_cc="$CC"
6679CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006680if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681 ac_cv_kthread=no
6682else
Matthias Kloseb9621712010-04-24 17:59:49 +00006683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684/* end confdefs.h. */
6685
Stefan Krah7dba5942012-11-22 22:49:11 +01006686#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006687#include <pthread.h>
6688
6689void* routine(void* p){return NULL;}
6690
6691int main(){
6692 pthread_t p;
6693 if(pthread_create(&p,NULL,routine,NULL)!=0)
6694 return 1;
6695 (void)pthread_detach(p);
6696 return 0;
6697}
6698
6699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006700if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006701 ac_cv_kthread=yes
6702else
Matthias Kloseb9621712010-04-24 17:59:49 +00006703 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6706 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006707fi
6708
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709CC="$ac_save_cc"
6710fi
6711
Matthias Kloseb9621712010-04-24 17:59:49 +00006712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6713$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006714fi
6715
6716if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6717then
6718# -pthread, if available, provides the right #defines
6719# and linker options to make pthread_create available
6720# Some compilers won't report that they do not support -pthread,
6721# so we need to run a program to see whether it really made the
6722# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6724$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006725if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006726 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727else
6728 ac_save_cc="$CC"
6729CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006730if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006731 ac_cv_pthread=no
6732else
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006734/* end confdefs.h. */
6735
Stefan Krah7dba5942012-11-22 22:49:11 +01006736#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006737#include <pthread.h>
6738
6739void* routine(void* p){return NULL;}
6740
6741int main(){
6742 pthread_t p;
6743 if(pthread_create(&p,NULL,routine,NULL)!=0)
6744 return 1;
6745 (void)pthread_detach(p);
6746 return 0;
6747}
6748
6749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006750if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751 ac_cv_pthread=yes
6752else
Matthias Kloseb9621712010-04-24 17:59:49 +00006753 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6756 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006757fi
6758
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006759CC="$ac_save_cc"
6760fi
6761
Matthias Kloseb9621712010-04-24 17:59:49 +00006762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6763$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764fi
6765
6766# If we have set a CC compiler flag for thread support then
6767# check if it works for CXX, too.
6768ac_cv_cxx_thread=no
6769if test ! -z "$CXX"
6770then
Matthias Kloseb9621712010-04-24 17:59:49 +00006771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6772$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006773ac_save_cxx="$CXX"
6774
6775if test "$ac_cv_kpthread" = "yes"
6776then
6777 CXX="$CXX -Kpthread"
6778 ac_cv_cxx_thread=yes
6779elif test "$ac_cv_kthread" = "yes"
6780then
6781 CXX="$CXX -Kthread"
6782 ac_cv_cxx_thread=yes
6783elif test "$ac_cv_pthread" = "yes"
6784then
6785 CXX="$CXX -pthread"
6786 ac_cv_cxx_thread=yes
6787fi
6788
6789if test $ac_cv_cxx_thread = yes
6790then
6791 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6792 $CXX -c conftest.$ac_ext 2>&5
6793 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6794 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6795 then
6796 ac_cv_cxx_thread=yes
6797 else
6798 ac_cv_cxx_thread=no
6799 fi
6800 rm -fr conftest*
6801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6803$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804fi
6805CXX="$ac_save_cxx"
6806
6807
6808# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6810$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006811if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006812 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813else
Matthias Kloseb9621712010-04-24 17:59:49 +00006814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815/* end confdefs.h. */
6816#include <stdlib.h>
6817#include <stdarg.h>
6818#include <string.h>
6819#include <float.h>
6820
6821int
6822main ()
6823{
6824
6825 ;
6826 return 0;
6827}
6828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006829if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830 ac_cv_header_stdc=yes
6831else
Matthias Kloseb9621712010-04-24 17:59:49 +00006832 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006833fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6835
6836if test $ac_cv_header_stdc = yes; then
6837 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839/* end confdefs.h. */
6840#include <string.h>
6841
6842_ACEOF
6843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006844 $EGREP "memchr" >/dev/null 2>&1; then :
6845
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846else
6847 ac_cv_header_stdc=no
6848fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006849rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006850
6851fi
6852
6853if test $ac_cv_header_stdc = yes; then
6854 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006856/* end confdefs.h. */
6857#include <stdlib.h>
6858
6859_ACEOF
6860if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006861 $EGREP "free" >/dev/null 2>&1; then :
6862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863else
6864 ac_cv_header_stdc=no
6865fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006866rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867
6868fi
6869
6870if test $ac_cv_header_stdc = yes; then
6871 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006872 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006873 :
6874else
Matthias Kloseb9621712010-04-24 17:59:49 +00006875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876/* end confdefs.h. */
6877#include <ctype.h>
6878#include <stdlib.h>
6879#if ((' ' & 0x0FF) == 0x020)
6880# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6881# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6882#else
6883# define ISLOWER(c) \
6884 (('a' <= (c) && (c) <= 'i') \
6885 || ('j' <= (c) && (c) <= 'r') \
6886 || ('s' <= (c) && (c) <= 'z'))
6887# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6888#endif
6889
6890#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6891int
6892main ()
6893{
6894 int i;
6895 for (i = 0; i < 256; i++)
6896 if (XOR (islower (i), ISLOWER (i))
6897 || toupper (i) != TOUPPER (i))
6898 return 2;
6899 return 0;
6900}
6901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006902if ac_fn_c_try_run "$LINENO"; then :
6903
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904else
Matthias Kloseb9621712010-04-24 17:59:49 +00006905 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6908 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909fi
6910
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006911fi
6912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6914$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915if test $ac_cv_header_stdc = yes; then
6916
Matthias Kloseb9621712010-04-24 17:59:49 +00006917$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006918
6919fi
6920
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006921ac_save_cppflags="$CPPFLAGS"
6922CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006923for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006924fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006925ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006926sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006927unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006928poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006929sys/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 +01006930sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006931sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006932sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006933sys/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 -07006934libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006935bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006936do :
6937 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6938ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006939if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006940 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006941#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006942_ACEOF
6943
6944fi
6945
Guido van Rossum627b2d71993-12-24 10:39:16 +00006946done
6947
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006948CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006949ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006950for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6953$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006954if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006955 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006956else
Matthias Kloseb9621712010-04-24 17:59:49 +00006957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006958/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006959#include <sys/types.h>
6960#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006961
Martin v. Löwis11437992002-04-12 09:54:03 +00006962int
6963main ()
6964{
6965if ((DIR *) 0)
6966return 0;
6967 ;
6968 return 0;
6969}
6970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006971if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006972 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006973else
Matthias Kloseb9621712010-04-24 17:59:49 +00006974 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006978eval ac_res=\$$as_ac_Header
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6980$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006981if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006982 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006983#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006984_ACEOF
6985
6986ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006987fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006988
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006989done
6990# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6991if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6993$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006994if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006995 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006996else
Martin v. Löwis11437992002-04-12 09:54:03 +00006997 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007001/* Override any GCC internal prototype to avoid an error.
7002 Use char because int might match the return type of a GCC
7003 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007004#ifdef __cplusplus
7005extern "C"
7006#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007007char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007008int
7009main ()
7010{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007011return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007012 ;
7013 return 0;
7014}
7015_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007016for ac_lib in '' dir; do
7017 if test -z "$ac_lib"; then
7018 ac_res="none required"
7019 else
7020 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007021 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007022 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007024 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007026rm -f core conftest.err conftest.$ac_objext \
7027 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007028 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007029 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007031done
Victor Stinnere0be4232011-10-25 13:06:09 +02007032if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007034else
7035 ac_cv_search_opendir=no
7036fi
7037rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007038LIBS=$ac_func_search_save_LIBS
7039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7041$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007042ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007043if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007045
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007046fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007047
Michael W. Hudson54241132001-12-07 15:38:26 +00007048else
Matthias Kloseb9621712010-04-24 17:59:49 +00007049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7050$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007051if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007053else
7054 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007058/* Override any GCC internal prototype to avoid an error.
7059 Use char because int might match the return type of a GCC
7060 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007061#ifdef __cplusplus
7062extern "C"
7063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007064char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007065int
7066main ()
7067{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007068return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007069 ;
7070 return 0;
7071}
7072_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007073for ac_lib in '' x; do
7074 if test -z "$ac_lib"; then
7075 ac_res="none required"
7076 else
7077 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007078 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007079 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007081 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007083rm -f core conftest.err conftest.$ac_objext \
7084 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007085 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007088done
Victor Stinnere0be4232011-10-25 13:06:09 +02007089if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007091else
7092 ac_cv_search_opendir=no
7093fi
7094rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007095LIBS=$ac_func_search_save_LIBS
7096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7098$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007100if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007101 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007102
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007103fi
7104
7105fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007106
Matthias Kloseb9621712010-04-24 17:59:49 +00007107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7108$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007109if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007110 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007111else
Matthias Kloseb9621712010-04-24 17:59:49 +00007112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007113/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007114#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007115int
7116main ()
7117{
7118return makedev(0, 0);
7119 ;
7120 return 0;
7121}
7122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007124 ac_cv_header_sys_types_h_makedev=yes
7125else
Matthias Kloseb9621712010-04-24 17:59:49 +00007126 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007128rm -f core conftest.err conftest.$ac_objext \
7129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007130
7131fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7133$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007134
7135if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007136ac_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 +02007137if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007138
Matthias Kloseb9621712010-04-24 17:59:49 +00007139$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007140
7141fi
7142
7143
7144
7145 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007146 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 +02007147if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007148
Matthias Kloseb9621712010-04-24 17:59:49 +00007149$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007150
7151fi
7152
7153
7154 fi
7155fi
7156
Michael W. Hudson54241132001-12-07 15:38:26 +00007157
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007158# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7159for ac_header in net/if.h
7160do :
7161 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7162#ifdef STDC_HEADERS
7163# include <stdlib.h>
7164# include <stddef.h>
7165#else
7166# ifdef HAVE_STDLIB_H
7167# include <stdlib.h>
7168# endif
7169#endif
7170#ifdef HAVE_SYS_SOCKET_H
7171# include <sys/socket.h>
7172#endif
7173
7174"
Victor Stinnere0be4232011-10-25 13:06:09 +02007175if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007176 cat >>confdefs.h <<_ACEOF
7177#define HAVE_NET_IF_H 1
7178_ACEOF
7179
7180fi
7181
7182done
7183
7184
7185
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007186# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007187for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007188do :
7189 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007190#ifdef HAVE_CURSES_H
7191#include <curses.h>
7192#endif
7193
Matthias Kloseb9621712010-04-24 17:59:49 +00007194"
Victor Stinnere0be4232011-10-25 13:06:09 +02007195if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007196 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007197#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007198_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007199
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007200fi
7201
7202done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007203
7204
Martin v. Löwis11017b12006-01-14 18:12:57 +00007205# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007206for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007207do :
7208 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 +00007209#ifdef HAVE_ASM_TYPES_H
7210#include <asm/types.h>
7211#endif
7212#ifdef HAVE_SYS_SOCKET_H
7213#include <sys/socket.h>
7214#endif
7215
Matthias Kloseb9621712010-04-24 17:59:49 +00007216"
Victor Stinnere0be4232011-10-25 13:06:09 +02007217if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007218 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007219#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007220_ACEOF
7221
7222fi
7223
7224done
7225
7226
Charles-François Natali47413c12011-10-06 19:47:44 +02007227# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007228for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007229do :
7230 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7231ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7232#ifdef HAVE_SYS_SOCKET_H
7233#include <sys/socket.h>
7234#endif
7235
7236"
7237if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7238 cat >>confdefs.h <<_ACEOF
7239#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7240_ACEOF
7241
7242fi
7243
7244done
7245
7246
Guido van Rossum627b2d71993-12-24 10:39:16 +00007247# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007248was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7250$as_echo_n "checking for clock_t in time.h... " >&6; }
7251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007252/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007253#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007254
7255_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007256if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007257 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007258 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007259else
Martin v. Löwis11437992002-04-12 09:54:03 +00007260
7261
Matthias Kloseb9621712010-04-24 17:59:49 +00007262$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007263
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007264
Guido van Rossum627b2d71993-12-24 10:39:16 +00007265fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007266rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007267
Matthias Kloseb9621712010-04-24 17:59:49 +00007268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7269$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007270
Matthias Kloseb9621712010-04-24 17:59:49 +00007271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7272$as_echo_n "checking for makedev... " >&6; }
7273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007274/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007275
Jesus Cea740f53a2010-04-28 11:35:30 +00007276#if defined(MAJOR_IN_MKDEV)
7277#include <sys/mkdev.h>
7278#elif defined(MAJOR_IN_SYSMACROS)
7279#include <sys/sysmacros.h>
7280#else
7281#include <sys/types.h>
7282#endif
7283
Neal Norwitz11690112002-07-30 01:08:28 +00007284int
7285main ()
7286{
Jesus Cea740f53a2010-04-28 11:35:30 +00007287
7288 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007289 ;
7290 return 0;
7291}
Matthias Kloseb159a552010-04-25 21:00:44 +00007292
Neal Norwitz11690112002-07-30 01:08:28 +00007293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007294if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007295 ac_cv_has_makedev=yes
7296else
Matthias Kloseb9621712010-04-24 17:59:49 +00007297 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007299rm -f core conftest.err conftest.$ac_objext \
7300 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7302$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007303if test "$ac_cv_has_makedev" = "yes"; then
7304
Matthias Kloseb9621712010-04-24 17:59:49 +00007305$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007306
7307fi
7308
Martin v. Löwis399a6892002-10-04 10:22:02 +00007309# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7310# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7311# defined, but the compiler does not support pragma redefine_extname,
7312# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7313# structures (such as rlimit64) without declaring them. As a
7314# work-around, disable LFS on such configurations
7315
7316use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7318$as_echo_n "checking Solaris LFS bug... " >&6; }
7319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007320/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007321
7322#define _LARGEFILE_SOURCE 1
7323#define _FILE_OFFSET_BITS 64
7324#include <sys/resource.h>
7325
Martin v. Löwis399a6892002-10-04 10:22:02 +00007326int
7327main ()
7328{
7329struct rlimit foo;
7330 ;
7331 return 0;
7332}
7333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007335 sol_lfs_bug=no
7336else
Matthias Kloseb9621712010-04-24 17:59:49 +00007337 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7341$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007342if test "$sol_lfs_bug" = "yes"; then
7343 use_lfs=no
7344fi
7345
7346if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007347# Two defines needed to enable largefile support on various platforms
7348# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007349case $ac_sys_system/$ac_sys_release in
7350AIX*)
7351
7352$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7353
7354 ;;
7355esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007356
Matthias Kloseb9621712010-04-24 17:59:49 +00007357$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007358
7359
Matthias Kloseb9621712010-04-24 17:59:49 +00007360$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007361
Martin v. Löwis399a6892002-10-04 10:22:02 +00007362fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007363
Guido van Rossum84e7b241996-08-19 21:59:00 +00007364# Add some code to confdefs.h so that the test for off_t works on SCO
7365cat >> confdefs.h <<\EOF
7366#if defined(SCO_DS)
7367#undef _OFF_T
7368#endif
7369EOF
7370
Guido van Rossumef2255b2000-03-10 22:30:29 +00007371# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007372ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007373if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007374
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007375else
Martin v. Löwis11437992002-04-12 09:54:03 +00007376
7377cat >>confdefs.h <<_ACEOF
7378#define mode_t int
7379_ACEOF
7380
7381fi
7382
Matthias Kloseb9621712010-04-24 17:59:49 +00007383ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007384if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007385
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007386else
Martin v. Löwis11437992002-04-12 09:54:03 +00007387
7388cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007389#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007390_ACEOF
7391
7392fi
7393
Matthias Kloseb9621712010-04-24 17:59:49 +00007394ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007395if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007396
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007397else
Martin v. Löwis11437992002-04-12 09:54:03 +00007398
7399cat >>confdefs.h <<_ACEOF
7400#define pid_t int
7401_ACEOF
7402
7403fi
7404
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007405
Martin v. Löwis11437992002-04-12 09:54:03 +00007406cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007407#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007408_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007409
Matthias Kloseb9621712010-04-24 17:59:49 +00007410ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007411if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007412
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007413else
Martin v. Löwis11437992002-04-12 09:54:03 +00007414
7415cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007416#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007417_ACEOF
7418
7419fi
7420
Matthias Kloseb9621712010-04-24 17:59:49 +00007421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7422$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007423if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007424 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007425else
Matthias Kloseb9621712010-04-24 17:59:49 +00007426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007427/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007428#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007429
7430_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007431if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007432 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007433 ac_cv_type_uid_t=yes
7434else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007435 ac_cv_type_uid_t=no
7436fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007437rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007438
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7441$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007442if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007443
Matthias Kloseb9621712010-04-24 17:59:49 +00007444$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007445
7446
Matthias Kloseb9621712010-04-24 17:59:49 +00007447$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007448
7449fi
7450
Mark Dickinson983bc162012-12-02 12:11:38 +00007451
7452# There are two separate checks for each of the exact-width integer types we
7453# need. First we check whether the type is available using the usual
7454# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7455# and <stdint.h> where available). We then also use the special type checks of
7456# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7457# directly, #define's uint32_t to be a suitable type.
7458
7459ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7460if test "x$ac_cv_type_uint32_t" = xyes; then :
7461
7462$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7463
7464fi
7465
Matthias Kloseb9621712010-04-24 17:59:49 +00007466ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7467case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007468 no|yes) ;; #(
7469 *)
7470
Matthias Kloseb9621712010-04-24 17:59:49 +00007471$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007472
7473
7474cat >>confdefs.h <<_ACEOF
7475#define uint32_t $ac_cv_c_uint32_t
7476_ACEOF
7477;;
7478 esac
7479
Mark Dickinson983bc162012-12-02 12:11:38 +00007480
7481ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7482if test "x$ac_cv_type_uint64_t" = xyes; then :
7483
7484$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7485
7486fi
7487
Matthias Kloseb9621712010-04-24 17:59:49 +00007488ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7489case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007490 no|yes) ;; #(
7491 *)
7492
Matthias Kloseb9621712010-04-24 17:59:49 +00007493$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007494
7495
7496cat >>confdefs.h <<_ACEOF
7497#define uint64_t $ac_cv_c_uint64_t
7498_ACEOF
7499;;
7500 esac
7501
Mark Dickinson983bc162012-12-02 12:11:38 +00007502
7503ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7504if test "x$ac_cv_type_int32_t" = xyes; then :
7505
7506$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7507
7508fi
7509
Matthias Kloseb9621712010-04-24 17:59:49 +00007510ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7511case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007512 no|yes) ;; #(
7513 *)
7514
7515cat >>confdefs.h <<_ACEOF
7516#define int32_t $ac_cv_c_int32_t
7517_ACEOF
7518;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007519esac
7520
Mark Dickinson983bc162012-12-02 12:11:38 +00007521
7522ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7523if test "x$ac_cv_type_int64_t" = xyes; then :
7524
7525$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7526
7527fi
7528
Matthias Kloseb9621712010-04-24 17:59:49 +00007529ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7530case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007531 no|yes) ;; #(
7532 *)
7533
7534cat >>confdefs.h <<_ACEOF
7535#define int64_t $ac_cv_c_int64_t
7536_ACEOF
7537;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007538esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007539
Mark Dickinson983bc162012-12-02 12:11:38 +00007540
Matthias Kloseb9621712010-04-24 17:59:49 +00007541ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007542if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007543
Matthias Kloseb9621712010-04-24 17:59:49 +00007544$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007545
7546fi
7547
Stefan Krah1919b7e2012-03-21 18:25:23 +01007548ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7549if test "x$ac_cv_type___uint128_t" = xyes; then :
7550
7551$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7552
7553fi
7554
Jack Jansendd19cf82001-12-06 22:36:17 +00007555
Michael W. Hudson54241132001-12-07 15:38:26 +00007556# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007557# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007558# The cast to long int works around a bug in the HP C Compiler
7559# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7560# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7561# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7563$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007564if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007565 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007566else
Matthias Kloseb9621712010-04-24 17:59:49 +00007567 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 +00007568
Martin v. Löwis11437992002-04-12 09:54:03 +00007569else
Matthias Kloseb9621712010-04-24 17:59:49 +00007570 if test "$ac_cv_type_int" = yes; then
7571 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7572$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007573as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007574See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007575 else
7576 ac_cv_sizeof_int=0
7577 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007579
Martin v. Löwis11437992002-04-12 09:54:03 +00007580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7582$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007583
7584
7585
Martin v. Löwis11437992002-04-12 09:54:03 +00007586cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007587#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007588_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007589
7590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007591# The cast to long int works around a bug in the HP C Compiler
7592# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7593# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7594# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7596$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007597if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007599else
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 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 +00007601
Martin v. Löwis11437992002-04-12 09:54:03 +00007602else
Matthias Kloseb9621712010-04-24 17:59:49 +00007603 if test "$ac_cv_type_long" = yes; then
7604 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7605$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007606as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007607See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608 else
7609 ac_cv_sizeof_long=0
7610 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007612
Martin v. Löwis11437992002-04-12 09:54:03 +00007613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7615$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007616
7617
7618
Martin v. Löwis11437992002-04-12 09:54:03 +00007619cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007620#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007621_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007622
7623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007624# The cast to long int works around a bug in the HP C Compiler
7625# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7626# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7627# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7629$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007630if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007631 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007632else
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 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 +00007634
Martin v. Löwis11437992002-04-12 09:54:03 +00007635else
Matthias Kloseb9621712010-04-24 17:59:49 +00007636 if test "$ac_cv_type_void_p" = yes; then
7637 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007639as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007640See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007641 else
7642 ac_cv_sizeof_void_p=0
7643 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007645
Martin v. Löwis11437992002-04-12 09:54:03 +00007646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7648$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007649
7650
7651
Martin v. Löwis11437992002-04-12 09:54:03 +00007652cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007653#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007654_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007655
7656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007657# The cast to long int works around a bug in the HP C Compiler
7658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7660# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7662$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007663if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007664 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007665else
Matthias Kloseb9621712010-04-24 17:59:49 +00007666 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 +00007667
Martin v. Löwis11437992002-04-12 09:54:03 +00007668else
Matthias Kloseb9621712010-04-24 17:59:49 +00007669 if test "$ac_cv_type_short" = yes; then
7670 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007672as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007673See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007674 else
7675 ac_cv_sizeof_short=0
7676 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007678
Martin v. Löwis11437992002-04-12 09:54:03 +00007679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7681$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007682
7683
7684
Martin v. Löwis11437992002-04-12 09:54:03 +00007685cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007686#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007687_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007688
7689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007690# The cast to long int works around a bug in the HP C Compiler
7691# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7692# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7693# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7695$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007696if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007697 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007698else
Matthias Kloseb9621712010-04-24 17:59:49 +00007699 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 +00007700
Martin v. Löwis11437992002-04-12 09:54:03 +00007701else
Matthias Kloseb9621712010-04-24 17:59:49 +00007702 if test "$ac_cv_type_float" = yes; then
7703 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007705as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007706See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007707 else
7708 ac_cv_sizeof_float=0
7709 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007711
Martin v. Löwis11437992002-04-12 09:54:03 +00007712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7714$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007715
7716
7717
Martin v. Löwis11437992002-04-12 09:54:03 +00007718cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007719#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007720_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007721
7722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007723# The cast to long int works around a bug in the HP C Compiler
7724# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7725# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7726# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7728$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007729if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007730 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007731else
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 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 +00007733
Martin v. Löwis11437992002-04-12 09:54:03 +00007734else
Matthias Kloseb9621712010-04-24 17:59:49 +00007735 if test "$ac_cv_type_double" = yes; then
7736 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007738as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007739See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740 else
7741 ac_cv_sizeof_double=0
7742 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007744
Martin v. Löwis11437992002-04-12 09:54:03 +00007745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7747$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748
7749
7750
Martin v. Löwis11437992002-04-12 09:54:03 +00007751cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007752#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007753_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007754
7755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756# The cast to long int works around a bug in the HP C Compiler
7757# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7758# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7759# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7761$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007762if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007764else
Matthias Kloseb9621712010-04-24 17:59:49 +00007765 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 +00007766
Martin v. Löwis11437992002-04-12 09:54:03 +00007767else
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 if test "$ac_cv_type_fpos_t" = yes; then
7769 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7770$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007771as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007772See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773 else
7774 ac_cv_sizeof_fpos_t=0
7775 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007777
Martin v. Löwis11437992002-04-12 09:54:03 +00007778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7780$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781
7782
7783
Martin v. Löwis11437992002-04-12 09:54:03 +00007784cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007785#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007786_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007787
Michael W. Hudson54241132001-12-07 15:38:26 +00007788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789# The cast to long int works around a bug in the HP C Compiler
7790# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7791# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7792# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7794$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007795if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007796 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007797else
Matthias Kloseb9621712010-04-24 17:59:49 +00007798 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 +00007799
Martin v. Löwis18e16552006-02-15 17:27:45 +00007800else
Matthias Kloseb9621712010-04-24 17:59:49 +00007801 if test "$ac_cv_type_size_t" = yes; then
7802 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007804as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007805See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806 else
7807 ac_cv_sizeof_size_t=0
7808 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007810
Martin v. Löwis18e16552006-02-15 17:27:45 +00007811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7813$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814
7815
7816
Martin v. Löwis18e16552006-02-15 17:27:45 +00007817cat >>confdefs.h <<_ACEOF
7818#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7819_ACEOF
7820
7821
Christian Heimes400adb02008-02-01 08:12:03 +00007822# The cast to long int works around a bug in the HP C Compiler
7823# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7824# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7825# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7827$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007828if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007830else
Matthias Kloseb9621712010-04-24 17:59:49 +00007831 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 +00007832
Christian Heimes400adb02008-02-01 08:12:03 +00007833else
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 if test "$ac_cv_type_pid_t" = yes; then
7835 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007837as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007838See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007839 else
7840 ac_cv_sizeof_pid_t=0
7841 fi
7842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007843
Christian Heimes400adb02008-02-01 08:12:03 +00007844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7846$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007847
7848
7849
7850cat >>confdefs.h <<_ACEOF
7851#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7852_ACEOF
7853
7854
Michael W. Hudson54241132001-12-07 15:38:26 +00007855
Matthias Kloseb9621712010-04-24 17:59:49 +00007856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7857$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007858have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007860/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007861
Martin v. Löwis11437992002-04-12 09:54:03 +00007862int
7863main ()
7864{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007865long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007866 ;
7867 return 0;
7868}
7869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007870if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007871
7872
Matthias Kloseb9621712010-04-24 17:59:49 +00007873$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007874
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007875 have_long_long=yes
7876
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7880$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007881if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882# The cast to long int works around a bug in the HP C Compiler
7883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7885# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7887$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007888if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007890else
Matthias Kloseb9621712010-04-24 17:59:49 +00007891 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 +00007892
Martin v. Löwis11437992002-04-12 09:54:03 +00007893else
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 if test "$ac_cv_type_long_long" = yes; then
7895 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007897as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007898See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899 else
7900 ac_cv_sizeof_long_long=0
7901 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007903
Martin v. Löwis11437992002-04-12 09:54:03 +00007904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7906$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907
7908
7909
Martin v. Löwis11437992002-04-12 09:54:03 +00007910cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007911#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007912_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007913
Michael W. Hudson54241132001-12-07 15:38:26 +00007914
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007915fi
7916
Matthias Kloseb9621712010-04-24 17:59:49 +00007917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7918$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007919have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007921/* end confdefs.h. */
7922
7923int
7924main ()
7925{
7926long double x; x = (long double)0;
7927 ;
7928 return 0;
7929}
7930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007931if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007932
7933
Matthias Kloseb9621712010-04-24 17:59:49 +00007934$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007935
7936 have_long_double=yes
7937
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007938fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7941$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007942if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007943# The cast to long int works around a bug in the HP C Compiler
7944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7946# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7948$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007949if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007951else
Matthias Kloseb9621712010-04-24 17:59:49 +00007952 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 +00007953
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007954else
Matthias Kloseb9621712010-04-24 17:59:49 +00007955 if test "$ac_cv_type_long_double" = yes; then
7956 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007958as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007959See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007960 else
7961 ac_cv_sizeof_long_double=0
7962 fi
7963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007964
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7967$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007968
7969
7970
7971cat >>confdefs.h <<_ACEOF
7972#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7973_ACEOF
7974
7975
7976fi
7977
7978
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7980$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007981have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007983/* end confdefs.h. */
7984
7985int
7986main ()
7987{
7988_Bool x; x = (_Bool)0;
7989 ;
7990 return 0;
7991}
7992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007993if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007994
7995
Matthias Kloseb9621712010-04-24 17:59:49 +00007996$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007997
7998 have_c99_bool=yes
7999
Thomas Woutersb2137042007-02-01 18:02:27 +00008000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8003$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008004if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005# The cast to long int works around a bug in the HP C Compiler
8006# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8007# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8008# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8010$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008011if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008013else
Matthias Kloseb9621712010-04-24 17:59:49 +00008014 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 +00008015
Thomas Woutersb2137042007-02-01 18:02:27 +00008016else
Matthias Kloseb9621712010-04-24 17:59:49 +00008017 if test "$ac_cv_type__Bool" = yes; then
8018 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008020as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008021See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008022 else
8023 ac_cv_sizeof__Bool=0
8024 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008026
Thomas Woutersb2137042007-02-01 18:02:27 +00008027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8029$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030
8031
8032
Thomas Woutersb2137042007-02-01 18:02:27 +00008033cat >>confdefs.h <<_ACEOF
8034#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8035_ACEOF
8036
8037
8038fi
8039
Matthias Kloseb9621712010-04-24 17:59:49 +00008040ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008041 #include <stdint.h>
8042 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008043 #ifdef HAVE_INTTYPES_H
8044 #include <inttypes.h>
8045 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008046"
Victor Stinnere0be4232011-10-25 13:06:09 +02008047if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008048
8049cat >>confdefs.h <<_ACEOF
8050#define HAVE_UINTPTR_T 1
8051_ACEOF
8052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008053# The cast to long int works around a bug in the HP C Compiler
8054# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8055# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8056# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8058$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008059if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008060 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008061else
Matthias Kloseb9621712010-04-24 17:59:49 +00008062 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 +00008063
Martin v. Löwis11437992002-04-12 09:54:03 +00008064else
Matthias Kloseb9621712010-04-24 17:59:49 +00008065 if test "$ac_cv_type_uintptr_t" = yes; then
8066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008068as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008069See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070 else
8071 ac_cv_sizeof_uintptr_t=0
8072 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008074
Martin v. Löwis11437992002-04-12 09:54:03 +00008075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8077$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078
8079
8080
Martin v. Löwis11437992002-04-12 09:54:03 +00008081cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008082#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008083_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008084
Michael W. Hudson54241132001-12-07 15:38:26 +00008085
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008086fi
8087
Thomas Wouters89f507f2006-12-13 04:49:30 +00008088
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008089# The cast to long int works around a bug in the HP C Compiler
8090# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8091# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8092# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8094$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008095if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008097else
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008099#ifdef HAVE_SYS_TYPES_H
8100#include <sys/types.h>
8101#endif
8102
Matthias Kloseb9621712010-04-24 17:59:49 +00008103"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008104
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008105else
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 if test "$ac_cv_type_off_t" = yes; then
8107 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8108$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008109as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008110See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008111 else
8112 ac_cv_sizeof_off_t=0
8113 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008115
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8118$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008119
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008120
8121
Martin v. Löwis11437992002-04-12 09:54:03 +00008122cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008123#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008124_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008125
Michael W. Hudson54241132001-12-07 15:38:26 +00008126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008127
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8129$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008130if test "$have_long_long" = yes
8131then
8132if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008133 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008136
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8138$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008139else
Matthias Kloseb9621712010-04-24 17:59:49 +00008140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8141$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008142fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008143else
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8145$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008146fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008148# The cast to long int works around a bug in the HP C Compiler
8149# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8150# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8151# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8153$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008154if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008155 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008156else
Matthias Kloseb9621712010-04-24 17:59:49 +00008157 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008158#ifdef HAVE_SYS_TYPES_H
8159#include <sys/types.h>
8160#endif
8161#ifdef HAVE_TIME_H
8162#include <time.h>
8163#endif
8164
Matthias Kloseb9621712010-04-24 17:59:49 +00008165"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008167else
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 if test "$ac_cv_type_time_t" = yes; then
8169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008171as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008172See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008173 else
8174 ac_cv_sizeof_time_t=0
8175 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008177
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008178fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8180$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008182
8183
Martin v. Löwis11437992002-04-12 09:54:03 +00008184cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008185#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008186_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008187
Michael W. Hudson54241132001-12-07 15:38:26 +00008188
8189
Trent Mick635f6fb2000-08-23 21:33:05 +00008190# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008191ac_save_cc="$CC"
8192if test "$ac_cv_kpthread" = "yes"
8193then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008194elif test "$ac_cv_kthread" = "yes"
8195then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008196elif test "$ac_cv_pthread" = "yes"
8197then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008198fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008199
Matthias Kloseb9621712010-04-24 17:59:49 +00008200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8201$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008202have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008204/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008205
8206 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008207int
8208main ()
8209{
Guido van Rossum12580492000-09-24 16:47:19 +00008210pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008211 ;
8212 return 0;
8213}
Matthias Kloseb159a552010-04-25 21:00:44 +00008214
Martin v. Löwis11437992002-04-12 09:54:03 +00008215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008216if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008217 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8221$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008222if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008223 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008224# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8225# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8226# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8228$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008229if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008231else
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008233#ifdef HAVE_PTHREAD_H
8234#include <pthread.h>
8235#endif
8236
Matthias Kloseb9621712010-04-24 17:59:49 +00008237"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008238
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008239else
Matthias Kloseb9621712010-04-24 17:59:49 +00008240 if test "$ac_cv_type_pthread_t" = yes; then
8241 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8242$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008243as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008244See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008245 else
8246 ac_cv_sizeof_pthread_t=0
8247 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008249
Trent Mick635f6fb2000-08-23 21:33:05 +00008250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8252$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008253
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008254
8255
Martin v. Löwis11437992002-04-12 09:54:03 +00008256cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008257#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008258_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008259
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008260
Trent Mick635f6fb2000-08-23 21:33:05 +00008261fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008262CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008263
Michael W. Hudson54241132001-12-07 15:38:26 +00008264
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008265case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008266 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008267 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8268 ;;
8269 Darwin/*)
8270 OTHER_LIBTOOL_OPT=""
8271 ;;
8272esac
8273
8274
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008275ARCH_RUN_32BIT=""
8276
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008277case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008278 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008279 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8280 if test "${enable_universalsdk}"; then
8281 :
8282 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008283 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008284 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008285 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008286 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008287 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008288 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008289 if test ${gcc_version} '<' 4.0
8290 then
8291 LIBTOOL_CRUFT="-lcc_dynamic"
8292 else
8293 LIBTOOL_CRUFT=""
8294 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008295 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008296 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008297else
Matthias Kloseb9621712010-04-24 17:59:49 +00008298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008299/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008300
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008301 #include <unistd.h>
8302 int main(int argc, char*argv[])
8303 {
8304 if (sizeof(long) == 4) {
8305 return 0;
8306 } else {
8307 return 1;
8308 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008309 }
8310
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008312if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008313 ac_osx_32bit=yes
8314else
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008316fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8318 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008319fi
8320
8321
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008322 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008323 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008324 i386)
8325 MACOSX_DEFAULT_ARCH="i386"
8326 ;;
8327 ppc)
8328 MACOSX_DEFAULT_ARCH="ppc"
8329 ;;
8330 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008331 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008332 ;;
8333 esac
8334 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008335 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008336 i386)
8337 MACOSX_DEFAULT_ARCH="x86_64"
8338 ;;
8339 ppc)
8340 MACOSX_DEFAULT_ARCH="ppc64"
8341 ;;
8342 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008343 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008344 ;;
8345 esac
8346
8347 #ARCH_RUN_32BIT="true"
8348 fi
8349
8350 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008351 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008352 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008353esac
8354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8356$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008357if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008358then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008359 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008360 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008361 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008364
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8366$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008367 if test $enable_shared = "yes"
8368 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008369 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 +00008370 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008371else
Matthias Kloseb9621712010-04-24 17:59:49 +00008372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8373$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008374fi
8375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8377$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008378case $ac_sys_system/$ac_sys_release in
8379 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008380
Matthias Kloseb9621712010-04-24 17:59:49 +00008381$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008382
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8384$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008385 ;;
8386 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8388$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008389 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008390esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008391
Guido van Rossum0a516c91994-09-12 10:58:40 +00008392# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008393
Michael W. Hudson54241132001-12-07 15:38:26 +00008394
8395
8396
8397
Benjamin Peterson99f03762010-04-11 22:15:28 +00008398
Thomas Wouters477c8d52006-05-27 19:21:47 +00008399
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008400# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8401# -- usually .so, .sl on HP-UX, .dll on Cygwin
8402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8403$as_echo_n "checking the extension of shared libraries... " >&6; }
8404if test -z "$SHLIB_SUFFIX"; then
8405 case $ac_sys_system in
8406 hp*|HP*)
8407 case `uname -m` in
8408 ia64) SHLIB_SUFFIX=.so;;
8409 *) SHLIB_SUFFIX=.sl;;
8410 esac
8411 ;;
8412 CYGWIN*) SHLIB_SUFFIX=.dll;;
8413 *) SHLIB_SUFFIX=.so;;
8414 esac
8415fi
8416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8417$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008418
Guido van Rossum0a516c91994-09-12 10:58:40 +00008419# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008420# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008421# (Shared libraries in this instance are shared modules to be loaded into
8422# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8424$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008425if test -z "$LDSHARED"
8426then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008427 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008428 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008429 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008430 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008431 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008432 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008433 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008434 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008435 if test "$GCC" = "yes" ; then
8436 LDSHARED='$(CC) -shared'
8437 LDCXXSHARED='$(CXX) -shared'
8438 else
8439 LDSHARED='$(CC) -G'
8440 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008441 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008442 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008443 if test "$GCC" = "yes" ; then
8444 LDSHARED='$(CC) -shared'
8445 LDCXXSHARED='$(CXX) -shared'
8446 else
8447 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008448 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008449 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008450 LDSHARED='$(CC) -bundle'
8451 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008452 if test "$enable_framework" ; then
8453 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008454 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8455 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008456 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008457 else
8458 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008459 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008460 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008461 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008462 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008463 LDSHARED='$(CC) -bundle'
8464 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008465 if test "$enable_framework" ; then
8466 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008467 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8468 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008469 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008470 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008471 # No framework, use the Python app as bundle-loader
8472 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008473 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008474 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008475 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008476 Darwin/*)
8477 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8478 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008479
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008480 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008481 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008482 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008483 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008484 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008485 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8486 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008487 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008488 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008489 LDSHARED='$(CC) -bundle'
8490 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008491 if test "$enable_framework" ; then
8492 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008493 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8494 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008495 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008496 else
8497 # No framework, use the Python app as bundle-loader
8498 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8499 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008500 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008501 fi
8502 fi
8503 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008504 Linux*|GNU*|QNX*)
8505 LDSHARED='$(CC) -shared'
8506 LDCXXSHARED='$(CXX) -shared';;
8507 BSD/OS*/4*)
8508 LDSHARED="gcc -shared"
8509 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008510 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008511 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008512 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008513 LDSHARED='$(CC) -shared'
8514 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008515 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008516 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008517 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008518 OpenBSD*)
8519 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8520 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008521 LDSHARED='$(CC) -shared $(CCSHARED)'
8522 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008523 else
8524 case `uname -r` in
8525 [01].* | 2.[0-7] | 2.[0-7].*)
8526 LDSHARED="ld -Bshareable ${LDFLAGS}"
8527 ;;
8528 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008529 LDSHARED='$(CC) -shared $(CCSHARED)'
8530 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008531 ;;
8532 esac
8533 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008534 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008535 LDSHARED='$(CC) -shared'
8536 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008537 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008538 if test "$GCC" = "yes" ; then
8539 LDSHARED='$(CC) -shared'
8540 LDCXXSHARED='$(CXX) -shared'
8541 else
8542 LDSHARED='$(CC) -G'
8543 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008544 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008545 SCO_SV*)
8546 LDSHARED='$(CC) -Wl,-G,-Bexport'
8547 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8548 CYGWIN*)
8549 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8550 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008551 *) LDSHARED="ld";;
8552 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8555$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008556LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008557BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008558# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008559# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8561$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008562if test -z "$CCSHARED"
8563then
Guido van Rossum07397971997-04-29 21:49:50 +00008564 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008565 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008566 then CCSHARED="-fPIC";
8567 elif test `uname -p` = sparc;
8568 then CCSHARED="-xcode=pic32";
8569 else CCSHARED="-Kpic";
8570 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008571 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008572 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008573 else CCSHARED="+z";
8574 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008575 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008576 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008577 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008578 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008579 if test "$GCC" = "yes"
8580 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008581 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008582 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008583 SCO_SV*)
8584 if test "$GCC" = "yes"
8585 then CCSHARED="-fPIC"
8586 else CCSHARED="-Kpic -belf"
8587 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008588 IRIX*/6*) case $CC in
8589 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008590 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008591 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008592 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8595$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008596# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008597# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8599$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008600if test -z "$LINKFORSHARED"
8601then
Guido van Rossum07397971997-04-29 21:49:50 +00008602 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008603 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008604 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008605 LINKFORSHARED="-Wl,-E -Wl,+s";;
8606# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008607 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008608 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008609 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008611 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008612 if test "$enable_framework"
8613 then
Jack Jansenda49e192005-01-07 13:08:22 +00008614 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008615 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008616 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008617 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008618 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008619 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008620 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008621 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8622 then
8623 LINKFORSHARED="-Wl,--export-dynamic"
8624 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008625 SunOS/5*) case $CC in
8626 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008627 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008628 then
8629 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008630 fi;;
8631 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008632 CYGWIN*)
8633 if test $enable_shared = "no"
8634 then
8635 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8636 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008637 QNX*)
8638 # -Wl,-E causes the symbols to be added to the dynamic
8639 # symbol table so that they can be found when a module
8640 # is loaded. -N 2048K causes the stack size to be set
8641 # to 2048 kilobytes so that the stack doesn't overflow
8642 # when running test_compile.py.
8643 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008644 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8647$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008648
Michael W. Hudson54241132001-12-07 15:38:26 +00008649
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008650
Matthias Kloseb9621712010-04-24 17:59:49 +00008651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8652$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008653if test ! "$LIBRARY" = "$LDLIBRARY"
8654then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008655 case $ac_sys_system in
8656 CYGWIN*)
8657 # Cygwin needs CCSHARED when building extension DLLs
8658 # but not when building the interpreter DLL.
8659 CFLAGSFORSHARED='';;
8660 *)
8661 CFLAGSFORSHARED='$(CCSHARED)'
8662 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8665$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008666
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008667# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8668# library (with --enable-shared).
8669# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008670# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8671# if it is not required, since it creates a dependency of the shared library
8672# to LIBS. This, in turn, means that applications linking the shared libpython
8673# don't need to link LIBS explicitly. The default should be only changed
8674# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008675
Matthias Kloseb9621712010-04-24 17:59:49 +00008676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8677$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008678case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008679 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008680 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008681esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8683$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008684
8685
Guido van Rossum627b2d71993-12-24 10:39:16 +00008686# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8688$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008689if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008690 $as_echo_n "(cached) " >&6
8691else
8692 ac_check_lib_save_LIBS=$LIBS
8693LIBS="-lsendfile $LIBS"
8694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8695/* end confdefs.h. */
8696
8697/* Override any GCC internal prototype to avoid an error.
8698 Use char because int might match the return type of a GCC
8699 builtin and then its argument prototype would still apply. */
8700#ifdef __cplusplus
8701extern "C"
8702#endif
8703char sendfile ();
8704int
8705main ()
8706{
8707return sendfile ();
8708 ;
8709 return 0;
8710}
8711_ACEOF
8712if ac_fn_c_try_link "$LINENO"; then :
8713 ac_cv_lib_sendfile_sendfile=yes
8714else
8715 ac_cv_lib_sendfile_sendfile=no
8716fi
8717rm -f core conftest.err conftest.$ac_objext \
8718 conftest$ac_exeext conftest.$ac_ext
8719LIBS=$ac_check_lib_save_LIBS
8720fi
8721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8722$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008723if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008724 cat >>confdefs.h <<_ACEOF
8725#define HAVE_LIBSENDFILE 1
8726_ACEOF
8727
8728 LIBS="-lsendfile $LIBS"
8729
8730fi
8731
Matthias Kloseb9621712010-04-24 17:59:49 +00008732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8733$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008734if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008735 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008736else
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008738LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008742/* Override any GCC internal prototype to avoid an error.
8743 Use char because int might match the return type of a GCC
8744 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008745#ifdef __cplusplus
8746extern "C"
8747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008748char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008749int
8750main ()
8751{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008753 ;
8754 return 0;
8755}
8756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008757if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008758 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762rm -f core conftest.err conftest.$ac_objext \
8763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008764LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8767$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008768if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008769 cat >>confdefs.h <<_ACEOF
8770#define HAVE_LIBDL 1
8771_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008772
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008773 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008774
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008775fi
8776 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8778$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008779if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008781else
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008783LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787/* Override any GCC internal prototype to avoid an error.
8788 Use char because int might match the return type of a GCC
8789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008790#ifdef __cplusplus
8791extern "C"
8792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008793char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008794int
8795main ()
8796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008797return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 ;
8799 return 0;
8800}
8801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008802if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008804else
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008807rm -f core conftest.err conftest.$ac_objext \
8808 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008809LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8812$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008813if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 cat >>confdefs.h <<_ACEOF
8815#define HAVE_LIBDLD 1
8816_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008817
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008818 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008819
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008820fi
8821 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008822
Georg Brandlb1441c72009-01-03 22:33:39 +00008823# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008824if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8826$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008827if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008829else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008830 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008834/* Override any GCC internal prototype to avoid an error.
8835 Use char because int might match the return type of a GCC
8836 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008837#ifdef __cplusplus
8838extern "C"
8839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008840char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008841int
8842main ()
8843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008844return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008845 ;
8846 return 0;
8847}
8848_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008849for ac_lib in '' pthread rt posix4; do
8850 if test -z "$ac_lib"; then
8851 ac_res="none required"
8852 else
8853 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008854 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008855 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008857 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008859rm -f core conftest.err conftest.$ac_objext \
8860 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008861 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008862 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864done
Victor Stinnere0be4232011-10-25 13:06:09 +02008865if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008867else
8868 ac_cv_search_sem_init=no
8869fi
8870rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008871LIBS=$ac_func_search_save_LIBS
8872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8874$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008875ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008876if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008877 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008878
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008879fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008880 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008881 # posix4 on Solaris 2.6
8882 # pthread (first!) on Linux
8883fi
8884
Martin v. Löwis19d17342003-06-14 21:03:05 +00008885# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8887$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008888if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008890else
8891 ac_check_lib_save_LIBS=$LIBS
8892LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008894/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008895
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008896/* Override any GCC internal prototype to avoid an error.
8897 Use char because int might match the return type of a GCC
8898 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008899#ifdef __cplusplus
8900extern "C"
8901#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008902char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008903int
8904main ()
8905{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008906return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008907 ;
8908 return 0;
8909}
8910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008911if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008912 ac_cv_lib_intl_textdomain=yes
8913else
Matthias Kloseb9621712010-04-24 17:59:49 +00008914 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008916rm -f core conftest.err conftest.$ac_objext \
8917 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008918LIBS=$ac_check_lib_save_LIBS
8919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8921$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008922if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008923
Matthias Kloseb9621712010-04-24 17:59:49 +00008924$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008925
Brett Cannonc6d936e2009-06-07 20:09:53 +00008926 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008927fi
8928
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008929
8930# checks for system dependent C++ extensions support
8931case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8933$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008935/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008936
Georg Brandl59e87bd2011-02-15 19:48:59 +00008937 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008938int
8939main ()
8940{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008941loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 ;
8943 return 0;
8944}
Matthias Kloseb159a552010-04-25 21:00:44 +00008945
Martin v. Löwis11437992002-04-12 09:54:03 +00008946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008947if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008948
Matthias Kloseb159a552010-04-25 21:00:44 +00008949
Matthias Kloseb9621712010-04-24 17:59:49 +00008950$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008951
Matthias Kloseb159a552010-04-25 21:00:44 +00008952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008953$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008954
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008955else
Matthias Kloseb159a552010-04-25 21:00:44 +00008956
8957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008958$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008959
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008961rm -f core conftest.err conftest.$ac_objext \
8962 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008963 *) ;;
8964esac
8965
Guido van Rossum70c7f481998-03-26 18:44:10 +00008966# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8968$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008969if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008971else
Martin v. Löwis11437992002-04-12 09:54:03 +00008972 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008973LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008977/* Override any GCC internal prototype to avoid an error.
8978 Use char because int might match the return type of a GCC
8979 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008980#ifdef __cplusplus
8981extern "C"
8982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008983char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008984int
8985main ()
8986{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008987return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008988 ;
8989 return 0;
8990}
8991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008992if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008994else
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008997rm -f core conftest.err conftest.$ac_objext \
8998 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008999LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9002$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009003if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009004 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009005fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009006 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9008$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009009if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009011else
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009013LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009017/* Override any GCC internal prototype to avoid an error.
9018 Use char because int might match the return type of a GCC
9019 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009020#ifdef __cplusplus
9021extern "C"
9022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009023char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009024int
9025main ()
9026{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 ;
9029 return 0;
9030}
9031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009032if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009033 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009034else
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009037rm -f core conftest.err conftest.$ac_objext \
9038 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009039LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9042$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009043if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009044 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009045fi
9046 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009047
Matthias Kloseb9621712010-04-24 17:59:49 +00009048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9049$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009051# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009052if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009053 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9055$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009056LIBS="$withval $LIBS"
9057
9058else
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9060$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009061fi
9062
Guido van Rossum7f43da71994-08-01 12:15:30 +00009063
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009064if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009065 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9066set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9068$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009069if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009071else
9072 case $PKG_CONFIG in
9073 [\\/]* | ?:[\\/]*)
9074 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9075 ;;
9076 *)
9077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9078for as_dir in $PATH
9079do
9080 IFS=$as_save_IFS
9081 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009082 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009084 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009086 break 2
9087 fi
9088done
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009090IFS=$as_save_IFS
9091
9092 ;;
9093esac
9094fi
9095PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9096if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9098$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009099else
Matthias Kloseb9621712010-04-24 17:59:49 +00009100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9101$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009102fi
9103
9104
9105fi
9106if test -z "$ac_cv_path_PKG_CONFIG"; then
9107 ac_pt_PKG_CONFIG=$PKG_CONFIG
9108 # Extract the first word of "pkg-config", so it can be a program name with args.
9109set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9111$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009112if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009113 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009114else
9115 case $ac_pt_PKG_CONFIG in
9116 [\\/]* | ?:[\\/]*)
9117 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9118 ;;
9119 *)
9120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9121for as_dir in $PATH
9122do
9123 IFS=$as_save_IFS
9124 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009126 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009127 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009129 break 2
9130 fi
9131done
Matthias Kloseb9621712010-04-24 17:59:49 +00009132 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009133IFS=$as_save_IFS
9134
9135 ;;
9136esac
9137fi
9138ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9139if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9141$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009142else
Matthias Kloseb9621712010-04-24 17:59:49 +00009143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9144$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009145fi
9146
9147 if test "x$ac_pt_PKG_CONFIG" = x; then
9148 PKG_CONFIG=""
9149 else
9150 case $cross_compiling:$ac_tool_warned in
9151yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009152{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9153$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009154ac_tool_warned=yes ;;
9155esac
9156 PKG_CONFIG=$ac_pt_PKG_CONFIG
9157 fi
9158else
9159 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9160fi
9161
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009162
9163# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9165$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009166
9167# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009168if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009169 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009170else
9171 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009172fi
9173
9174
Matthias Kloseb9621712010-04-24 17:59:49 +00009175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9176$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009177
9178# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9180$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009181
9182# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009183if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009184 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009185else
9186 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009187fi
9188
9189
9190if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009191 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9192else
9193 LIBFFI_INCLUDEDIR=""
9194fi
9195
9196
Matthias Kloseb9621712010-04-24 17:59:49 +00009197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9198$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009199
Stefan Krah60187b52012-03-23 19:06:27 +01009200# Check for use of the system libmpdec library
9201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9202$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9203
9204# Check whether --with-system_libmpdec was given.
9205if test "${with_system_libmpdec+set}" = set; then :
9206 withval=$with_system_libmpdec;
9207else
9208 with_system_libmpdec="no"
9209fi
9210
9211
9212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9213$as_echo "$with_system_libmpdec" >&6; }
9214
Benjamin Peterson076ed002010-10-31 17:11:02 +00009215# Check for support for loadable sqlite extensions
9216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9217$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9218# Check whether --enable-loadable-sqlite-extensions was given.
9219if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9220 enableval=$enable_loadable_sqlite_extensions;
9221else
9222 enable_loadable_sqlite_extensions="no"
9223fi
9224
9225
9226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9227$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9228
Matthias Klose55708cc2009-04-30 08:06:49 +00009229# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9231$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009232
9233# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009234if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009235 withval=$with_dbmliborder;
9236if test x$with_dbmliborder = xyes
9237then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009238as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009239else
9240 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9241 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9242 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009243 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009244 fi
9245 done
9246fi
9247fi
9248
Matthias Kloseb9621712010-04-24 17:59:49 +00009249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9250$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009251
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009252# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009253
9254
Matthias Kloseb9621712010-04-24 17:59:49 +00009255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9256$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009259if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009260 withval=$with_signal_module;
9261fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009262
9263
9264if test -z "$with_signal_module"
9265then with_signal_module="yes"
9266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9268$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009269
9270if test "${with_signal_module}" = "yes"; then
9271 USE_SIGNAL_MODULE=""
9272 SIGNAL_OBJS=""
9273else
9274 USE_SIGNAL_MODULE="#"
9275 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9276fi
9277
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009278# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009279
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009280USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009281
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009282
Martin v. Löwis11437992002-04-12 09:54:03 +00009283
9284# Templates for things AC_DEFINEd more than once.
9285# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009286
9287
Martin v. Löwis11437992002-04-12 09:54:03 +00009288
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9290$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009291
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009292# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009293if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009294 withval=$with_threads;
9295fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009296
9297
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009298# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009299
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009300# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009301if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009302 withval=$with_thread; with_threads=$with_thread
9303fi
9304
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009305
9306if test -z "$with_threads"
9307then with_threads="yes"
9308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9310$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009311
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009312
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009313if test "$with_threads" = "no"
9314then
9315 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009316elif test "$ac_cv_pthread_is_default" = yes
9317then
Matthias Kloseb9621712010-04-24 17:59:49 +00009318 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009319
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009320 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009321 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009322
9323 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009325elif test "$ac_cv_kpthread" = "yes"
9326then
9327 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009328 if test "$ac_cv_cxx_thread" = "yes"; then
9329 CXX="$CXX -Kpthread"
9330 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009331 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009332
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009333 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009334 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009335elif test "$ac_cv_kthread" = "yes"
9336then
9337 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009338 if test "$ac_cv_cxx_thread" = "yes"; then
9339 CXX="$CXX -Kthread"
9340 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009341 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009342
9343 posix_threads=yes
9344 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009345elif test "$ac_cv_pthread" = "yes"
9346then
9347 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009348 if test "$ac_cv_cxx_thread" = "yes"; then
9349 CXX="$CXX -pthread"
9350 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009352
9353 posix_threads=yes
9354 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009355else
9356 if test ! -z "$with_threads" -a -d "$with_threads"
9357 then LDFLAGS="$LDFLAGS -L$with_threads"
9358 fi
9359 if test ! -z "$withval" -a -d "$withval"
9360 then LDFLAGS="$LDFLAGS -L$withval"
9361 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009362
9363 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009364 # define _POSIX_THREADS in unistd.h. Some apparently don't
9365 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9367$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009369/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009370
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009371#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009372#ifdef _POSIX_THREADS
9373yes
9374#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009375
9376_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009377if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009378 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009379 unistd_defines_pthreads=yes
9380else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009381 unistd_defines_pthreads=no
9382fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009383rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009384
Matthias Kloseb9621712010-04-24 17:59:49 +00009385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9386$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009387
Matthias Kloseb9621712010-04-24 17:59:49 +00009388 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009389
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009390 # Just looking for pthread_create in libpthread is not enough:
9391 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9392 # So we really have to include pthread.h, and then link.
9393 _libs=$LIBS
9394 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9396$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009398/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009399
9400#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009401#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009402
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009403void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009404int
9405main ()
9406{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009407
9408pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 ;
9410 return 0;
9411}
9412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009413if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009414
Matthias Kloseb9621712010-04-24 17:59:49 +00009415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9416$as_echo "yes" >&6; }
9417 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009418
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009419 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009420 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009421else
Martin v. Löwis11437992002-04-12 09:54:03 +00009422
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009423 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009424 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009425if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009426 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009427
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009428 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009429 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009430else
Guido van Rossumad678af1998-10-02 14:42:15 +00009431
Matthias Kloseb9621712010-04-24 17:59:49 +00009432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9433$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009434if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009435 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009436else
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009438LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009442/* Override any GCC internal prototype to avoid an error.
9443 Use char because int might match the return type of a GCC
9444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009445#ifdef __cplusplus
9446extern "C"
9447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009448char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009449int
9450main ()
9451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 ;
9454 return 0;
9455}
9456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009459else
Matthias Kloseb9621712010-04-24 17:59:49 +00009460 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009462rm -f core conftest.err conftest.$ac_objext \
9463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009464LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9467$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009468if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009469 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009470
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009471 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009472 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009473 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009474else
Greg Steinadf63d62000-07-05 10:38:09 +00009475
Matthias Kloseb9621712010-04-24 17:59:49 +00009476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9477$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009478if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009480else
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009482LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486/* Override any GCC internal prototype to avoid an error.
9487 Use char because int might match the return type of a GCC
9488 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009489#ifdef __cplusplus
9490extern "C"
9491#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009492char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009493int
9494main ()
9495{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ;
9498 return 0;
9499}
9500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009501if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009503else
Matthias Kloseb9621712010-04-24 17:59:49 +00009504 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009506rm -f core conftest.err conftest.$ac_objext \
9507 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009508LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9511$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009512if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009513 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009514
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009515 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009516 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009517 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009518else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009519
Matthias Kloseb9621712010-04-24 17:59:49 +00009520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9521$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009522if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009523 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009524else
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009526LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009528/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530/* Override any GCC internal prototype to avoid an error.
9531 Use char because int might match the return type of a GCC
9532 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009533#ifdef __cplusplus
9534extern "C"
9535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009536char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009537int
9538main ()
9539{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009540return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 ;
9542 return 0;
9543}
9544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009545if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009547else
Matthias Kloseb9621712010-04-24 17:59:49 +00009548 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009550rm -f core conftest.err conftest.$ac_objext \
9551 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009552LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9555$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009556if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009557 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009558
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009559 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009560 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009561 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009562else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009563
Matthias Kloseb9621712010-04-24 17:59:49 +00009564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9565$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009566if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009567 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009568else
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009570LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574/* Override any GCC internal prototype to avoid an error.
9575 Use char because int might match the return type of a GCC
9576 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009577#ifdef __cplusplus
9578extern "C"
9579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009580char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009581int
9582main ()
9583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009584return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 ;
9586 return 0;
9587}
9588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009589if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009591else
Matthias Kloseb9621712010-04-24 17:59:49 +00009592 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009594rm -f core conftest.err conftest.$ac_objext \
9595 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009596LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9599$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009600if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009601 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009602
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009603 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009604 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009605 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009606else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009607
Martin v. Löwis130fb172001-07-19 11:00:41 +00009608 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009609fi
9610
Guido van Rossum627b2d71993-12-24 10:39:16 +00009611
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009612fi
9613
Guido van Rossum0be3e491997-05-22 20:33:33 +00009614fi
9615
Guido van Rossum49545951997-12-02 19:28:29 +00009616fi
9617
Guido van Rossumb93a8621998-05-07 13:27:32 +00009618fi
9619
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009621rm -f core conftest.err conftest.$ac_objext \
9622 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009623
Matthias Kloseb9621712010-04-24 17:59:49 +00009624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9625$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009626if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009627 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009628else
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009630LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009632/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634/* Override any GCC internal prototype to avoid an error.
9635 Use char because int might match the return type of a GCC
9636 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009637#ifdef __cplusplus
9638extern "C"
9639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009640char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009641int
9642main ()
9643{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 ;
9646 return 0;
9647}
9648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009649if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009651else
Matthias Kloseb9621712010-04-24 17:59:49 +00009652 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009654rm -f core conftest.err conftest.$ac_objext \
9655 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009656LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9659$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009660if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009661 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009662
Martin v. Löwis130fb172001-07-19 11:00:41 +00009663 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009664 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009665 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009666fi
9667
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009668
Neal Norwitza978ab02002-11-02 16:58:05 +00009669 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9671$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009672if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009673 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009674else
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009676LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009680/* Override any GCC internal prototype to avoid an error.
9681 Use char because int might match the return type of a GCC
9682 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009683#ifdef __cplusplus
9684extern "C"
9685#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009686char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009687int
9688main ()
9689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 ;
9692 return 0;
9693}
9694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009695if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009697else
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009700rm -f core conftest.err conftest.$ac_objext \
9701 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009702LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9705$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009706if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009707 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009708
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009709 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009710 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009711 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009712fi
9713
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009714 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009715fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009716
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009717if test "$posix_threads" = "yes"; then
9718 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009719
Matthias Kloseb9621712010-04-24 17:59:49 +00009720$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009721
9722 fi
9723
9724 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9725 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009726 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009727$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009728
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009729 ;;
9730 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009731$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009732
9733 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009734 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009735$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009736
9737 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009738 esac
9739
Matthias Kloseb9621712010-04-24 17:59:49 +00009740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9741$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009742 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009743 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009744else
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009746 ac_cv_pthread_system_supported=no
9747else
Matthias Kloseb9621712010-04-24 17:59:49 +00009748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009749/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009750
9751 #include <stdio.h>
9752 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009753 void *foo(void *parm) {
9754 return NULL;
9755 }
9756 main() {
9757 pthread_attr_t attr;
9758 pthread_t id;
9759 if (pthread_attr_init(&attr)) exit(-1);
9760 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9761 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9762 exit(0);
9763 }
9764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009765if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009766 ac_cv_pthread_system_supported=yes
9767else
Matthias Kloseb9621712010-04-24 17:59:49 +00009768 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9771 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009772fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009774
Guido van Rossum627b2d71993-12-24 10:39:16 +00009775fi
9776
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9778$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009779 if test "$ac_cv_pthread_system_supported" = "yes"; then
9780
Matthias Kloseb9621712010-04-24 17:59:49 +00009781$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009782
9783 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 for ac_func in pthread_sigmask
9785do :
9786 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009787if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009788 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009789#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009790_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009791 case $ac_sys_system in
9792 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009793
Matthias Kloseb9621712010-04-24 17:59:49 +00009794$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009795
9796 ;;
9797 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009798fi
9799done
9800
9801fi
9802
9803
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009804# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009805
Matthias Kloseb9621712010-04-24 17:59:49 +00009806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9807$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009809if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009810 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009811 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9813$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009814 ipv6=no
9815 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009816 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9817$as_echo "yes" >&6; }
9818 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009819
9820 ipv6=yes
9821 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009823else
Martin v. Löwis11437992002-04-12 09:54:03 +00009824
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009826/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009827 /* AF_INET6 available check */
9828#include <sys/types.h>
9829#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009830int
9831main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009832{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009833int domain = AF_INET6;
9834 ;
9835 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009836}
Martin v. Löwis11437992002-04-12 09:54:03 +00009837_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009838if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009839
Matthias Kloseb9621712010-04-24 17:59:49 +00009840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9841$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009842 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009843
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009844else
Matthias Kloseb159a552010-04-25 21:00:44 +00009845
Matthias Kloseb9621712010-04-24 17:59:49 +00009846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9847$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009848 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009849
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009850fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009852
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009853if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9855$as_echo_n "checking if RFC2553 API is available... " >&6; }
9856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009857/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009858
9859 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009860#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009861int
9862main ()
9863{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009864struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009865 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009866 ;
9867 return 0;
9868}
Matthias Kloseb159a552010-04-25 21:00:44 +00009869
Martin v. Löwis11437992002-04-12 09:54:03 +00009870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009871if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009872
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009874$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009875 ipv6=yes
9876
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009877else
Matthias Kloseb159a552010-04-25 21:00:44 +00009878
9879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009880$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009881 ipv6=no
9882
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009885fi
9886
9887if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009889
9890fi
9891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892fi
9893
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009894
9895ipv6type=unknown
9896ipv6lib=none
9897ipv6trylibc=no
9898
9899if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9901$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009902 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9903 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009904 case $i in
9905 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009907/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009908
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009909#include <netinet/in.h>
9910#ifdef IPV6_INRIA_VERSION
9911yes
9912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009913_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009916 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009917fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009918rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009919
9920 ;;
9921 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009923/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009924
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009925#include <netinet/in.h>
9926#ifdef __KAME__
9927yes
9928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009929_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009931 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009932 ipv6type=$i;
9933 ipv6lib=inet6
9934 ipv6libdir=/usr/local/v6/lib
9935 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009936fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009937rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009938
9939 ;;
9940 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009942/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009943
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009944#include <features.h>
9945#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9946yes
9947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009948_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009949if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009950 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009951 ipv6type=$i;
9952 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009953fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009954rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009955
9956 ;;
9957 linux-inet6)
9958 if test -d /usr/inet6; then
9959 ipv6type=$i
9960 ipv6lib=inet6
9961 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009962 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009963 fi
9964 ;;
9965 solaris)
9966 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009967 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009968 ipv6type=$i
9969 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009970 fi
9971 fi
9972 ;;
9973 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009975/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009976
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009977#include <sys/param.h>
9978#ifdef _TOSHIBA_INET6
9979yes
9980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009981_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009984 ipv6type=$i;
9985 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009986 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009987fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009988rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009989
9990 ;;
9991 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009993/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009994
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009995#include </usr/local/v6/include/sys/v6config.h>
9996#ifdef __V6D__
9997yes
9998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009999_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010002 ipv6type=$i;
10003 ipv6lib=v6;
10004 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010005 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010006fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010007rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010008
10009 ;;
10010 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010012/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010013
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010014#include <sys/param.h>
10015#ifdef _ZETA_MINAMI_INET6
10016yes
10017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010018_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010019if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010021 ipv6type=$i;
10022 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010023 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010024fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010025rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010026
10027 ;;
10028 esac
10029 if test "$ipv6type" != "unknown"; then
10030 break
10031 fi
10032 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10034$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010035fi
10036
10037if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10038 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10039 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10040 echo "using lib$ipv6lib"
10041 else
10042 if test $ipv6trylibc = "yes"; then
10043 echo "using libc"
10044 else
10045 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10046 echo "You need to fetch lib$ipv6lib.a from appropriate"
10047 echo 'ipv6 kit and compile beforehand.'
10048 exit 1
10049 fi
10050 fi
10051fi
10052
Matthias Kloseb9621712010-04-24 17:59:49 +000010053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10054$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010056/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010057
10058 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010059int
10060main ()
10061{
10062FSIORefNum fRef = 0
10063 ;
10064 return 0;
10065}
Matthias Kloseb159a552010-04-25 21:00:44 +000010066
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010068if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010069
Matthias Kloseb159a552010-04-25 21:00:44 +000010070
Matthias Kloseb9621712010-04-24 17:59:49 +000010071$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010072
Matthias Kloseb9621712010-04-24 17:59:49 +000010073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10074$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010075
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010076else
Matthias Kloseb159a552010-04-25 21:00:44 +000010077
Matthias Kloseb9621712010-04-24 17:59:49 +000010078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10079$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010080
10081fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10083
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010084# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10086$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010088# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010089if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010090 withval=$with_doc_strings;
10091fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010092
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010093
10094if test -z "$with_doc_strings"
10095then with_doc_strings="yes"
10096fi
10097if test "$with_doc_strings" != "no"
10098then
10099
Matthias Kloseb9621712010-04-24 17:59:49 +000010100$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010101
10102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10104$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010105
Antoine Pitrou042b1282010-08-13 21:15:58 +000010106# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10108$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010111if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010113if test "$withval" != no
10114then
10115
Matthias Kloseb9621712010-04-24 17:59:49 +000010116$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010117
Matthias Kloseb9621712010-04-24 17:59:49 +000010118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10119$as_echo "yes" >&6; }
10120else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10121$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010122fi
10123else
Matthias Kloseb9621712010-04-24 17:59:49 +000010124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10125$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010126fi
10127
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010128
10129# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10131$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010134if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135 withval=$with_pymalloc;
10136fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010137
Neil Schemenauera35c6882001-02-27 04:45:05 +000010138
Neil Schemenauer16c22972002-03-22 15:34:49 +000010139if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010140then
10141 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010142fi
10143if test "$with_pymalloc" != "no"
10144then
Martin v. Löwis11437992002-04-12 09:54:03 +000010145
Matthias Kloseb9621712010-04-24 17:59:49 +000010146$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010147
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010148 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10151$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010152
Benjamin Peterson05159c42009-12-03 03:01:27 +000010153# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10155$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010156
10157# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010158if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010159 withval=$with_valgrind;
10160else
10161 with_valgrind=no
10162fi
10163
Matthias Kloseb9621712010-04-24 17:59:49 +000010164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10165$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010166if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 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 +020010168if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010169
Matthias Kloseb9621712010-04-24 17:59:49 +000010170$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010171
10172else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010173 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010174
10175fi
10176
10177
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010178 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010179fi
10180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010181# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010182
Guido van Rossum98935bf2001-09-05 19:13:16 +000010183DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010184
Guido van Rossume97ee181999-12-20 21:27:22 +000010185# the dlopen() function means we might want to use dynload_shlib.o. some
10186# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010187for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010188do :
10189 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010190if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010192#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010193_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010194
Guido van Rossume97ee181999-12-20 21:27:22 +000010195fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010196done
Guido van Rossume97ee181999-12-20 21:27:22 +000010197
Michael W. Hudson54241132001-12-07 15:38:26 +000010198
Guido van Rossume97ee181999-12-20 21:27:22 +000010199# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10200# loading of modules.
10201
Matthias Kloseb9621712010-04-24 17:59:49 +000010202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10203$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010204if test -z "$DYNLOADFILE"
10205then
10206 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010207 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10208 if test "$ac_cv_func_dlopen" = yes
10209 then DYNLOADFILE="dynload_shlib.o"
10210 else DYNLOADFILE="dynload_aix.o"
10211 fi
10212 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010213 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010214 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10215 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010216 *)
10217 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10218 # out any dynamic loading
10219 if test "$ac_cv_func_dlopen" = yes
10220 then DYNLOADFILE="dynload_shlib.o"
10221 else DYNLOADFILE="dynload_stub.o"
10222 fi
10223 ;;
10224 esac
10225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10227$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010228if test "$DYNLOADFILE" != "dynload_stub.o"
10229then
Martin v. Löwis11437992002-04-12 09:54:03 +000010230
Matthias Kloseb9621712010-04-24 17:59:49 +000010231$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010232
10233fi
10234
Neil Schemenauer4e425612001-06-19 15:44:15 +000010235# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10236
Michael W. Hudson54241132001-12-07 15:38:26 +000010237
Matthias Kloseb9621712010-04-24 17:59:49 +000010238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10239$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010240if test -z "$MACHDEP_OBJS"
10241then
Jack Jansene578a632001-08-15 01:27:14 +000010242 MACHDEP_OBJS=$extra_machdep_objs
10243else
10244 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010245fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010246if test -z "$MACHDEP_OBJS"; then
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10248$as_echo "none" >&6; }
10249else
10250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10251$as_echo "$MACHDEP_OBJS" >&6; }
10252fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010253
Guido van Rossum627b2d71993-12-24 10:39:16 +000010254# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010255for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010256 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010257 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010258 futimens futimes gai_strerror \
10259 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010260 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010261 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010262 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10263 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010264 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010265 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010266 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010267 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010268 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010269 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010270 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10271 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010272 sigaction sigaltstack siginterrupt sigpending sigrelse \
10273 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010274 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010275 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010276 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010277do :
10278 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10279ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010280if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010281 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010282#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010283_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010284
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010285fi
10286done
10287
Michael W. Hudson54241132001-12-07 15:38:26 +000010288
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010289ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10290 #include <dirent.h>
10291"
10292if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10293
10294$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10295
10296fi
10297
10298
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010299# For some functions, having a definition is not sufficient, since
10300# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10302$as_echo_n "checking for chroot... " >&6; }
10303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010304/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010305#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010306int
10307main ()
10308{
10309void *x=chroot
10310 ;
10311 return 0;
10312}
10313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010314if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010315
Matthias Kloseb9621712010-04-24 17:59:49 +000010316$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010317
Matthias Kloseb159a552010-04-25 21:00:44 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010319$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010320else
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10322$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010323
10324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10327$as_echo_n "checking for link... " >&6; }
10328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010329/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010330#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010331int
10332main ()
10333{
10334void *x=link
10335 ;
10336 return 0;
10337}
10338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010340
Matthias Kloseb9621712010-04-24 17:59:49 +000010341$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010342
Matthias Kloseb159a552010-04-25 21:00:44 +000010343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010344$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010345else
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10347$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010348
10349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10352$as_echo_n "checking for symlink... " >&6; }
10353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010354/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010355#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010356int
10357main ()
10358{
10359void *x=symlink
10360 ;
10361 return 0;
10362}
10363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010365
Matthias Kloseb9621712010-04-24 17:59:49 +000010366$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010367
Matthias Kloseb159a552010-04-25 21:00:44 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010369$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010370else
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10372$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010373
10374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10377$as_echo_n "checking for fchdir... " >&6; }
10378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010379/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010380#include <unistd.h>
10381int
10382main ()
10383{
10384void *x=fchdir
10385 ;
10386 return 0;
10387}
10388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010390
Matthias Kloseb9621712010-04-24 17:59:49 +000010391$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010392
Matthias Kloseb159a552010-04-25 21:00:44 +000010393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010394$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010395else
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10397$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010398
10399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10402$as_echo_n "checking for fsync... " >&6; }
10403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010404/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010405#include <unistd.h>
10406int
10407main ()
10408{
10409void *x=fsync
10410 ;
10411 return 0;
10412}
10413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010415
Matthias Kloseb9621712010-04-24 17:59:49 +000010416$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010417
Matthias Kloseb159a552010-04-25 21:00:44 +000010418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010419$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010420else
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10422$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010423
10424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10427$as_echo_n "checking for fdatasync... " >&6; }
10428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010429/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010430#include <unistd.h>
10431int
10432main ()
10433{
10434void *x=fdatasync
10435 ;
10436 return 0;
10437}
10438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010439if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010440
Matthias Kloseb9621712010-04-24 17:59:49 +000010441$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010442
Matthias Kloseb159a552010-04-25 21:00:44 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010444$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010445else
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010448
10449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10452$as_echo_n "checking for epoll... " >&6; }
10453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010454/* end confdefs.h. */
10455#include <sys/epoll.h>
10456int
10457main ()
10458{
10459void *x=epoll_create
10460 ;
10461 return 0;
10462}
10463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010465
Matthias Kloseb9621712010-04-24 17:59:49 +000010466$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010467
Matthias Kloseb159a552010-04-25 21:00:44 +000010468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010469$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010470else
Matthias Kloseb9621712010-04-24 17:59:49 +000010471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10472$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010473
10474fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10477$as_echo_n "checking for epoll_create1... " >&6; }
10478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10479/* end confdefs.h. */
10480#include <sys/epoll.h>
10481int
10482main ()
10483{
10484void *x=epoll_create1
10485 ;
10486 return 0;
10487}
10488_ACEOF
10489if ac_fn_c_try_compile "$LINENO"; then :
10490
10491$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10492
10493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10494$as_echo "yes" >&6; }
10495else
10496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10497$as_echo "no" >&6; }
10498
10499fi
10500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10502$as_echo_n "checking for kqueue... " >&6; }
10503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010504/* end confdefs.h. */
10505
10506#include <sys/types.h>
10507#include <sys/event.h>
10508
10509int
10510main ()
10511{
10512int x=kqueue()
10513 ;
10514 return 0;
10515}
10516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010517if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010518
Matthias Kloseb9621712010-04-24 17:59:49 +000010519$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010520
Matthias Kloseb159a552010-04-25 21:00:44 +000010521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010522$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010523else
Matthias Kloseb9621712010-04-24 17:59:49 +000010524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010526
10527fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010529# On some systems (eg. FreeBSD 5), we would find a definition of the
10530# functions ctermid_r, setgroups in the library, but no prototype
10531# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10532# address to avoid compiler warnings and potential miscompilations
10533# because of the missing prototypes.
10534
Matthias Kloseb9621712010-04-24 17:59:49 +000010535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10536$as_echo_n "checking for ctermid_r... " >&6; }
10537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010538/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010539
Martin v. Löwisd5843682002-11-21 20:41:28 +000010540#include <stdio.h>
10541
Martin v. Löwisd5843682002-11-21 20:41:28 +000010542int
10543main ()
10544{
10545void* p = ctermid_r
10546 ;
10547 return 0;
10548}
10549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010550if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010551
Matthias Kloseb9621712010-04-24 17:59:49 +000010552$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010553
Matthias Kloseb159a552010-04-25 21:00:44 +000010554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010555$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010556else
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10558$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010559
10560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10562
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10564$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010565if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010566 $as_echo_n "(cached) " >&6
10567else
10568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010569/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010570#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010571int
10572main ()
10573{
10574void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010575
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010576 ;
10577 return 0;
10578}
10579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010580if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010581 ac_cv_flock_decl=yes
10582else
10583 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010584
10585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010587
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010588fi
10589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10590$as_echo "$ac_cv_flock_decl" >&6; }
10591if test "x${ac_cv_flock_decl}" = xyes; then
10592 for ac_func in flock
10593do :
10594 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010595if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010596 cat >>confdefs.h <<_ACEOF
10597#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010598_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010599
Antoine Pitroua3000072010-09-07 14:52:42 +000010600else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010602$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010603if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010604 $as_echo_n "(cached) " >&6
10605else
10606 ac_check_lib_save_LIBS=$LIBS
10607LIBS="-lbsd $LIBS"
10608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10609/* end confdefs.h. */
10610
10611/* Override any GCC internal prototype to avoid an error.
10612 Use char because int might match the return type of a GCC
10613 builtin and then its argument prototype would still apply. */
10614#ifdef __cplusplus
10615extern "C"
10616#endif
10617char flock ();
10618int
10619main ()
10620{
10621return flock ();
10622 ;
10623 return 0;
10624}
10625_ACEOF
10626if ac_fn_c_try_link "$LINENO"; then :
10627 ac_cv_lib_bsd_flock=yes
10628else
10629 ac_cv_lib_bsd_flock=no
10630fi
10631rm -f core conftest.err conftest.$ac_objext \
10632 conftest$ac_exeext conftest.$ac_ext
10633LIBS=$ac_check_lib_save_LIBS
10634fi
10635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10636$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010637if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010638 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010639
10640
10641$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10642
10643
10644fi
10645
10646
10647fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010648done
10649
Antoine Pitroua3000072010-09-07 14:52:42 +000010650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651
Matthias Kloseb9621712010-04-24 17:59:49 +000010652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10653$as_echo_n "checking for getpagesize... " >&6; }
10654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010655/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010656
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010657#include <unistd.h>
10658
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010659int
10660main ()
10661{
10662void* p = getpagesize
10663 ;
10664 return 0;
10665}
10666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010667if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010668
Matthias Kloseb9621712010-04-24 17:59:49 +000010669$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010670
Matthias Kloseb159a552010-04-25 21:00:44 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010672$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010673else
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10675$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010676
10677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010679
Victor Stinner984890f2011-11-24 13:53:38 +010010680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10681$as_echo_n "checking for broken unsetenv... " >&6; }
10682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10683/* end confdefs.h. */
10684
10685#include <stdlib.h>
10686
10687int
10688main ()
10689{
10690int res = unsetenv("DUMMY")
10691 ;
10692 return 0;
10693}
10694_ACEOF
10695if ac_fn_c_try_compile "$LINENO"; then :
10696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
10698else
10699
10700$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10701
10702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10703$as_echo "yes" >&6; }
10704
10705fi
10706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10707
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010708for ac_prog in true
10709do
10710 # Extract the first word of "$ac_prog", so it can be a program name with args.
10711set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10713$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010714if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010716else
10717 if test -n "$TRUE"; then
10718 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10719else
10720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10721for as_dir in $PATH
10722do
10723 IFS=$as_save_IFS
10724 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010727 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 $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 +000010729 break 2
10730 fi
10731done
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010733IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010734
10735fi
10736fi
10737TRUE=$ac_cv_prog_TRUE
10738if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10740$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010741else
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10743$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010744fi
10745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010746
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010747 test -n "$TRUE" && break
10748done
10749test -n "$TRUE" || TRUE="/bin/true"
10750
10751
Matthias Kloseb9621712010-04-24 17:59:49 +000010752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10753$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010754if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010756else
10757 ac_check_lib_save_LIBS=$LIBS
10758LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010760/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762/* Override any GCC internal prototype to avoid an error.
10763 Use char because int might match the return type of a GCC
10764 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010765#ifdef __cplusplus
10766extern "C"
10767#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010768char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010769int
10770main ()
10771{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010772return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010773 ;
10774 return 0;
10775}
10776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010777if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010778 ac_cv_lib_c_inet_aton=yes
10779else
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010782rm -f core conftest.err conftest.$ac_objext \
10783 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010784LIBS=$ac_check_lib_save_LIBS
10785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10787$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010788if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010789 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010790else
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10792$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010793if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010794 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010795else
10796 ac_check_lib_save_LIBS=$LIBS
10797LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010799/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010801/* Override any GCC internal prototype to avoid an error.
10802 Use char because int might match the return type of a GCC
10803 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010804#ifdef __cplusplus
10805extern "C"
10806#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010807char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010808int
10809main ()
10810{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010811return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010812 ;
10813 return 0;
10814}
10815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010816if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010817 ac_cv_lib_resolv_inet_aton=yes
10818else
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010821rm -f core conftest.err conftest.$ac_objext \
10822 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010823LIBS=$ac_check_lib_save_LIBS
10824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10826$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010827if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010828 cat >>confdefs.h <<_ACEOF
10829#define HAVE_LIBRESOLV 1
10830_ACEOF
10831
10832 LIBS="-lresolv $LIBS"
10833
10834fi
10835
10836
10837fi
10838
10839
Christian Heimesd0764e22007-12-04 15:00:33 +000010840# On Tru64, chflags seems to be present, but calling it will
10841# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10843$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010844if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010846else
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010848 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010849else
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010851/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010852
Christian Heimesd0764e22007-12-04 15:00:33 +000010853#include <sys/stat.h>
10854#include <unistd.h>
10855int main(int argc, char*argv[])
10856{
10857 if(chflags(argv[0], 0) != 0)
10858 return 1;
10859 return 0;
10860}
Ned Deily3eb67d52011-06-28 00:00:28 -070010861
Christian Heimesd0764e22007-12-04 15:00:33 +000010862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010863if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010864 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010865else
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010867fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10869 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010870fi
10871
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010872
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010873fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10875$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010876if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010878if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010879 ac_cv_have_chflags="yes"
10880else
10881 ac_cv_have_chflags="no"
10882fi
10883
10884fi
10885if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010888
10889fi
10890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10892$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010893if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010895else
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010897 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010898else
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010900/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010901
Christian Heimesd0764e22007-12-04 15:00:33 +000010902#include <sys/stat.h>
10903#include <unistd.h>
10904int main(int argc, char*argv[])
10905{
10906 if(lchflags(argv[0], 0) != 0)
10907 return 1;
10908 return 0;
10909}
Ned Deily3eb67d52011-06-28 00:00:28 -070010910
Christian Heimesd0764e22007-12-04 15:00:33 +000010911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010912if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010913 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010914else
Matthias Kloseb9621712010-04-24 17:59:49 +000010915 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10918 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010919fi
10920
10921
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10924$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010925if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010926 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010927if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010928 ac_cv_have_lchflags="yes"
10929else
10930 ac_cv_have_lchflags="no"
10931fi
10932
10933fi
10934if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010935
Matthias Kloseb9621712010-04-24 17:59:49 +000010936$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010937
10938fi
10939
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010940case $ac_sys_system/$ac_sys_release in
10941Darwin/*)
10942 _CUR_CFLAGS="${CFLAGS}"
10943 _CUR_LDFLAGS="${LDFLAGS}"
10944 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10945 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10946 ;;
10947esac
10948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10950$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010951if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010953else
10954 ac_check_lib_save_LIBS=$LIBS
10955LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010957/* end confdefs.h. */
10958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010959/* Override any GCC internal prototype to avoid an error.
10960 Use char because int might match the return type of a GCC
10961 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010962#ifdef __cplusplus
10963extern "C"
10964#endif
10965char inflateCopy ();
10966int
10967main ()
10968{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010970 ;
10971 return 0;
10972}
10973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010974if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010975 ac_cv_lib_z_inflateCopy=yes
10976else
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010979rm -f core conftest.err conftest.$ac_objext \
10980 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010981LIBS=$ac_check_lib_save_LIBS
10982fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10984$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010985if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010988
10989fi
10990
10991
10992case $ac_sys_system/$ac_sys_release in
10993Darwin/*)
10994 CFLAGS="${_CUR_CFLAGS}"
10995 LDFLAGS="${_CUR_LDFLAGS}"
10996 ;;
10997esac
10998
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11000$as_echo_n "checking for hstrerror... " >&6; }
11001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011002/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011003
Martin v. Löwise9416172003-05-03 10:12:45 +000011004#include <netdb.h>
11005
Martin v. Löwise9416172003-05-03 10:12:45 +000011006int
11007main ()
11008{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011009void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011010 ;
11011 return 0;
11012}
11013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011014if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011015
Matthias Kloseb9621712010-04-24 17:59:49 +000011016$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011017
Matthias Kloseb159a552010-04-25 21:00:44 +000011018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011019$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011020else
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11022$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011023
11024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011025rm -f core conftest.err conftest.$ac_objext \
11026 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011027
Matthias Kloseb9621712010-04-24 17:59:49 +000011028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11029$as_echo_n "checking for inet_aton... " >&6; }
11030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011031/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011032
Martin v. Löwis86d66262006-02-17 08:40:11 +000011033#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011034#include <sys/socket.h>
11035#include <netinet/in.h>
11036#include <arpa/inet.h>
11037
Martin v. Löwise9416172003-05-03 10:12:45 +000011038int
11039main ()
11040{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011041void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011042 ;
11043 return 0;
11044}
11045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011046if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011047
Matthias Kloseb9621712010-04-24 17:59:49 +000011048$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011049
Matthias Kloseb159a552010-04-25 21:00:44 +000011050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011051$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011052else
Matthias Kloseb9621712010-04-24 17:59:49 +000011053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11054$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011055
11056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011057rm -f core conftest.err conftest.$ac_objext \
11058 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011059
Matthias Kloseb9621712010-04-24 17:59:49 +000011060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11061$as_echo_n "checking for inet_pton... " >&6; }
11062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011063/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011064
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011065#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011066#include <sys/socket.h>
11067#include <netinet/in.h>
11068#include <arpa/inet.h>
11069
Martin v. Löwise9416172003-05-03 10:12:45 +000011070int
11071main ()
11072{
11073void* p = inet_pton
11074 ;
11075 return 0;
11076}
11077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011078if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011079
Matthias Kloseb9621712010-04-24 17:59:49 +000011080$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011081
Matthias Kloseb159a552010-04-25 21:00:44 +000011082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011083$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011084else
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11086$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011087
11088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011090
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011091# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11093$as_echo_n "checking for setgroups... " >&6; }
11094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011095/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011096
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011097#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011098#ifdef HAVE_GRP_H
11099#include <grp.h>
11100#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011101
Martin v. Löwisd5843682002-11-21 20:41:28 +000011102int
11103main ()
11104{
11105void* p = setgroups
11106 ;
11107 return 0;
11108}
11109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011110if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011111
Matthias Kloseb9621712010-04-24 17:59:49 +000011112$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011113
Matthias Kloseb159a552010-04-25 21:00:44 +000011114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011115$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011116else
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11118$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011119
11120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011122
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011123# check for openpty and forkpty
11124
11125for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011126do :
11127 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011128if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011129 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011130#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011131_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011132
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011133else
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11135$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011136if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011138else
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011140LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011144/* Override any GCC internal prototype to avoid an error.
11145 Use char because int might match the return type of a GCC
11146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011147#ifdef __cplusplus
11148extern "C"
11149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011150char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011151int
11152main ()
11153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011154return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 ;
11156 return 0;
11157}
11158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011161else
Matthias Kloseb9621712010-04-24 17:59:49 +000011162 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011164rm -f core conftest.err conftest.$ac_objext \
11165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011166LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11169$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011170if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011171 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011172 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011173else
Matthias Kloseb9621712010-04-24 17:59:49 +000011174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11175$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011176if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011177 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011178else
11179 ac_check_lib_save_LIBS=$LIBS
11180LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011182/* end confdefs.h. */
11183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011184/* Override any GCC internal prototype to avoid an error.
11185 Use char because int might match the return type of a GCC
11186 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011187#ifdef __cplusplus
11188extern "C"
11189#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011190char openpty ();
11191int
11192main ()
11193{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011194return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011195 ;
11196 return 0;
11197}
11198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011199if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011200 ac_cv_lib_bsd_openpty=yes
11201else
Matthias Kloseb9621712010-04-24 17:59:49 +000011202 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011204rm -f core conftest.err conftest.$ac_objext \
11205 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011206LIBS=$ac_check_lib_save_LIBS
11207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11209$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011210if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011211 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011212 LIBS="$LIBS -lbsd"
11213fi
11214
11215
11216fi
11217
Fred Drake8cef4cf2000-06-28 16:40:38 +000011218
11219fi
11220done
11221
11222for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011223do :
11224 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011225if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011226 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011227#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011228_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011229
Fred Drake8cef4cf2000-06-28 16:40:38 +000011230else
Matthias Kloseb9621712010-04-24 17:59:49 +000011231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11232$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011233if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011234 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011235else
Martin v. Löwis11437992002-04-12 09:54:03 +000011236 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011237LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011241/* Override any GCC internal prototype to avoid an error.
11242 Use char because int might match the return type of a GCC
11243 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011244#ifdef __cplusplus
11245extern "C"
11246#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011247char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011248int
11249main ()
11250{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011251return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 ;
11253 return 0;
11254}
11255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011256if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011257 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011258else
Matthias Kloseb9621712010-04-24 17:59:49 +000011259 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011261rm -f core conftest.err conftest.$ac_objext \
11262 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011263LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11266$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011267if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011268 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011269 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011270else
Matthias Kloseb9621712010-04-24 17:59:49 +000011271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11272$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011273if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011274 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011275else
11276 ac_check_lib_save_LIBS=$LIBS
11277LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011279/* end confdefs.h. */
11280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011281/* Override any GCC internal prototype to avoid an error.
11282 Use char because int might match the return type of a GCC
11283 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011284#ifdef __cplusplus
11285extern "C"
11286#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011287char forkpty ();
11288int
11289main ()
11290{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011292 ;
11293 return 0;
11294}
11295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011296if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011297 ac_cv_lib_bsd_forkpty=yes
11298else
Matthias Kloseb9621712010-04-24 17:59:49 +000011299 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011301rm -f core conftest.err conftest.$ac_objext \
11302 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011303LIBS=$ac_check_lib_save_LIBS
11304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11306$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011307if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011308 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011309 LIBS="$LIBS -lbsd"
11310fi
11311
11312
11313fi
11314
Fred Drake8cef4cf2000-06-28 16:40:38 +000011315
11316fi
11317done
11318
Jack Jansendd19cf82001-12-06 22:36:17 +000011319
Christian Heimesb186d002008-03-18 15:15:01 +000011320# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011321for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011322do :
11323 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011324if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011325 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011326#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011327_ACEOF
11328
11329fi
11330done
11331
11332
Michael W. Hudson54241132001-12-07 15:38:26 +000011333# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011334for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011335do :
11336 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11337ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011338if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011339 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011340#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011341_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011342
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011343fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011344done
11345
Michael W. Hudson54241132001-12-07 15:38:26 +000011346
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011347ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011348if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011349 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011350
Martin v. Löwis1142de32002-03-29 16:28:31 +000011351else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011352 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011353 *" dup2.$ac_objext "* ) ;;
11354 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011356esac
11357
Martin v. Löwis1142de32002-03-29 16:28:31 +000011358fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011359
11360ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011361if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011362 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11363
11364else
11365 case " $LIBOBJS " in
11366 *" getcwd.$ac_objext "* ) ;;
11367 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11368 ;;
11369esac
11370
11371fi
11372
11373ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011374if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011375 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11376
11377else
11378 case " $LIBOBJS " in
11379 *" strdup.$ac_objext "* ) ;;
11380 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11381 ;;
11382esac
11383
11384fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011385
11386
11387for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011388do :
11389 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011390if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011391 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011392#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +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. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011396#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011397int
11398main ()
11399{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011400getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011401 ;
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 GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011408
Guido van Rossum627b2d71993-12-24 10:39:16 +000011409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011411
Guido van Rossum627b2d71993-12-24 10:39:16 +000011412fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011413done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011414
Jack Jansen150753c2003-03-29 22:07:47 +000011415for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011416do :
11417 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011418if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011419 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011420#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +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. */
Jack Jansen150753c2003-03-29 22:07:47 +000011424#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011425int
11426main ()
11427{
11428setpgrp(0,0);
11429 ;
11430 return 0;
11431}
11432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011434
Matthias Kloseb9621712010-04-24 17:59:49 +000011435$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011436
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011439
11440fi
11441done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011442
Thomas Wouters3a584202000-08-05 23:28:51 +000011443for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011444do :
11445 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011446if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011448#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011451/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011452#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011453int
11454main ()
11455{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011456gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011457 ;
11458 return 0;
11459}
11460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011461if ac_fn_c_try_compile "$LINENO"; then :
11462
Guido van Rossum627b2d71993-12-24 10:39:16 +000011463else
Skip Montanaro6dead952003-09-25 14:50:04 +000011464
Matthias Kloseb9621712010-04-24 17:59:49 +000011465$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011466
Martin v. Löwis11437992002-04-12 09:54:03 +000011467
Guido van Rossum627b2d71993-12-24 10:39:16 +000011468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011470
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011471fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011472done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011473
Michael W. Hudson54241132001-12-07 15:38:26 +000011474
Victor Stinnere0be4232011-10-25 13:06:09 +020011475for ac_func in clock_gettime
11476do :
11477 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11478if test "x$ac_cv_func_clock_gettime" = xyes; then :
11479 cat >>confdefs.h <<_ACEOF
11480#define HAVE_CLOCK_GETTIME 1
11481_ACEOF
11482
11483else
11484
11485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11486$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11487if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11488 $as_echo_n "(cached) " >&6
11489else
11490 ac_check_lib_save_LIBS=$LIBS
11491LIBS="-lrt $LIBS"
11492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11493/* end confdefs.h. */
11494
11495/* Override any GCC internal prototype to avoid an error.
11496 Use char because int might match the return type of a GCC
11497 builtin and then its argument prototype would still apply. */
11498#ifdef __cplusplus
11499extern "C"
11500#endif
11501char clock_gettime ();
11502int
11503main ()
11504{
11505return clock_gettime ();
11506 ;
11507 return 0;
11508}
11509_ACEOF
11510if ac_fn_c_try_link "$LINENO"; then :
11511 ac_cv_lib_rt_clock_gettime=yes
11512else
11513 ac_cv_lib_rt_clock_gettime=no
11514fi
11515rm -f core conftest.err conftest.$ac_objext \
11516 conftest$ac_exeext conftest.$ac_ext
11517LIBS=$ac_check_lib_save_LIBS
11518fi
11519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11520$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11521if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11522
11523 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11524
11525
11526$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11527
11528
11529fi
11530
11531
11532fi
11533done
11534
11535
11536for ac_func in clock_getres
11537do :
11538 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11539if test "x$ac_cv_func_clock_getres" = xyes; then :
11540 cat >>confdefs.h <<_ACEOF
11541#define HAVE_CLOCK_GETRES 1
11542_ACEOF
11543
11544else
11545
11546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11547$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11548if ${ac_cv_lib_rt_clock_getres+:} false; then :
11549 $as_echo_n "(cached) " >&6
11550else
11551 ac_check_lib_save_LIBS=$LIBS
11552LIBS="-lrt $LIBS"
11553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11554/* end confdefs.h. */
11555
11556/* Override any GCC internal prototype to avoid an error.
11557 Use char because int might match the return type of a GCC
11558 builtin and then its argument prototype would still apply. */
11559#ifdef __cplusplus
11560extern "C"
11561#endif
11562char clock_getres ();
11563int
11564main ()
11565{
11566return clock_getres ();
11567 ;
11568 return 0;
11569}
11570_ACEOF
11571if ac_fn_c_try_link "$LINENO"; then :
11572 ac_cv_lib_rt_clock_getres=yes
11573else
11574 ac_cv_lib_rt_clock_getres=no
11575fi
11576rm -f core conftest.err conftest.$ac_objext \
11577 conftest$ac_exeext conftest.$ac_ext
11578LIBS=$ac_check_lib_save_LIBS
11579fi
11580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11581$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11582if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11583
11584 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11585
11586
11587fi
11588
11589
11590fi
11591done
11592
11593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11595$as_echo_n "checking for major... " >&6; }
11596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011597/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011598
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011599#if defined(MAJOR_IN_MKDEV)
11600#include <sys/mkdev.h>
11601#elif defined(MAJOR_IN_SYSMACROS)
11602#include <sys/sysmacros.h>
11603#else
11604#include <sys/types.h>
11605#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011606
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011607int
11608main ()
11609{
11610
11611 makedev(major(0),minor(0));
11612
11613 ;
11614 return 0;
11615}
11616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011617if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011618
11619
Matthias Kloseb9621712010-04-24 17:59:49 +000011620$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011621
Matthias Kloseb9621712010-04-24 17:59:49 +000011622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11623$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011624
11625else
Skip Montanaro6dead952003-09-25 14:50:04 +000011626
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11628$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011629
11630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011631rm -f core conftest.err conftest.$ac_objext \
11632 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011633
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011634# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011635# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11637$as_echo_n "checking for getaddrinfo... " >&6; }
11638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011639/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011640
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011641#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011642#include <sys/socket.h>
11643#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011644#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011645
Martin v. Löwis11437992002-04-12 09:54:03 +000011646int
11647main ()
11648{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011649getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011650 ;
11651 return 0;
11652}
11653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011654if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011655 have_getaddrinfo=yes
11656else
Matthias Kloseb9621712010-04-24 17:59:49 +000011657 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011659rm -f core conftest.err conftest.$ac_objext \
11660 conftest$ac_exeext conftest.$ac_ext
11661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11662$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011663if test $have_getaddrinfo = yes
11664then
Matthias Kloseb9621712010-04-24 17:59:49 +000011665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11666$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011667 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011668 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011669else
Matthias Kloseb9621712010-04-24 17:59:49 +000011670 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011671
11672if test "${enable_ipv6+set}" = set; then
11673 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11674else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011675 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011676fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011677else
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011679/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011680
Stefan Krah19c21392012-11-22 23:47:32 +010011681#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011682#include <sys/types.h>
11683#include <netdb.h>
11684#include <string.h>
11685#include <sys/socket.h>
11686#include <netinet/in.h>
11687
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011688int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011689{
11690 int passive, gaierr, inet4 = 0, inet6 = 0;
11691 struct addrinfo hints, *ai, *aitop;
11692 char straddr[INET6_ADDRSTRLEN], strport[16];
11693
11694 for (passive = 0; passive <= 1; passive++) {
11695 memset(&hints, 0, sizeof(hints));
11696 hints.ai_family = AF_UNSPEC;
11697 hints.ai_flags = passive ? AI_PASSIVE : 0;
11698 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011699 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011700 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11701 (void)gai_strerror(gaierr);
11702 goto bad;
11703 }
11704 for (ai = aitop; ai; ai = ai->ai_next) {
11705 if (ai->ai_addr == NULL ||
11706 ai->ai_addrlen == 0 ||
11707 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11708 straddr, sizeof(straddr), strport, sizeof(strport),
11709 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11710 goto bad;
11711 }
11712 switch (ai->ai_family) {
11713 case AF_INET:
11714 if (strcmp(strport, "54321") != 0) {
11715 goto bad;
11716 }
11717 if (passive) {
11718 if (strcmp(straddr, "0.0.0.0") != 0) {
11719 goto bad;
11720 }
11721 } else {
11722 if (strcmp(straddr, "127.0.0.1") != 0) {
11723 goto bad;
11724 }
11725 }
11726 inet4++;
11727 break;
11728 case AF_INET6:
11729 if (strcmp(strport, "54321") != 0) {
11730 goto bad;
11731 }
11732 if (passive) {
11733 if (strcmp(straddr, "::") != 0) {
11734 goto bad;
11735 }
11736 } else {
11737 if (strcmp(straddr, "::1") != 0) {
11738 goto bad;
11739 }
11740 }
11741 inet6++;
11742 break;
11743 case AF_UNSPEC:
11744 goto bad;
11745 break;
11746 default:
11747 /* another family support? */
11748 break;
11749 }
11750 }
11751 }
11752
11753 if (!(inet4 == 0 || inet4 == 2))
11754 goto bad;
11755 if (!(inet6 == 0 || inet6 == 2))
11756 goto bad;
11757
11758 if (aitop)
11759 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011760 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011761
11762 bad:
11763 if (aitop)
11764 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011765 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011766}
11767
Martin v. Löwis11437992002-04-12 09:54:03 +000011768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011769if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011770 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011771else
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11775 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011777
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011778fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011779
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011781
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11783$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11784
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011785if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011786then
11787 if test $ipv6 = yes
11788 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011789 echo 'Fatal: You must get working getaddrinfo() function.'
11790 echo ' or you can specify "--disable-ipv6"'.
11791 exit 1
11792 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011793else
Martin v. Löwis11437992002-04-12 09:54:03 +000011794
Matthias Kloseb9621712010-04-24 17:59:49 +000011795$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011796
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011797fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011798
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011799for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011800do :
11801 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011802if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011803 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011804#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011805_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011806
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011807fi
11808done
11809
Michael W. Hudson54241132001-12-07 15:38:26 +000011810
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011811# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11813$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011814if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011816else
Matthias Kloseb9621712010-04-24 17:59:49 +000011817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011818/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011819#include <sys/types.h>
11820#include <sys/time.h>
11821#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011822
Martin v. Löwis11437992002-04-12 09:54:03 +000011823int
11824main ()
11825{
11826if ((struct tm *) 0)
11827return 0;
11828 ;
11829 return 0;
11830}
11831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011832if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011833 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011834else
Matthias Kloseb9621712010-04-24 17:59:49 +000011835 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011838fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11840$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011841if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011842
Matthias Kloseb9621712010-04-24 17:59:49 +000011843$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011844
11845fi
11846
Matthias Kloseb9621712010-04-24 17:59:49 +000011847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11848$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011849if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011851else
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011853/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011854#include <sys/types.h>
11855#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011856
Martin v. Löwis11437992002-04-12 09:54:03 +000011857int
11858main ()
11859{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011860struct tm tm;
11861 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011863 ;
11864 return 0;
11865}
11866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011867if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011868 ac_cv_struct_tm=time.h
11869else
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011873fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11875$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011876if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011877
Matthias Kloseb9621712010-04-24 17:59:49 +000011878$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011879
11880fi
11881
Matthias Kloseb9621712010-04-24 17:59:49 +000011882ac_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 +000011883#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885"
Victor Stinnere0be4232011-10-25 13:06:09 +020011886if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011887
11888cat >>confdefs.h <<_ACEOF
11889#define HAVE_STRUCT_TM_TM_ZONE 1
11890_ACEOF
11891
11892
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011893fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011894
Martin v. Löwis11437992002-04-12 09:54:03 +000011895if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011898
11899else
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11901"
Victor Stinnere0be4232011-10-25 13:06:09 +020011902if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011903 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011904else
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011906fi
11907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011908cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011909#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011910_ACEOF
11911
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11913$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011914if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011915 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011916else
Matthias Kloseb9621712010-04-24 17:59:49 +000011917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011918/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011919#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011920#if !HAVE_DECL_TZNAME
11921extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011923
Martin v. Löwis11437992002-04-12 09:54:03 +000011924int
11925main ()
11926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011927return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011928 ;
11929 return 0;
11930}
11931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011932if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011933 ac_cv_var_tzname=yes
11934else
Matthias Kloseb9621712010-04-24 17:59:49 +000011935 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011937rm -f core conftest.err conftest.$ac_objext \
11938 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011939fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11941$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011942 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011943
Matthias Kloseb9621712010-04-24 17:59:49 +000011944$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011945
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011946 fi
11947fi
11948
Matthias Kloseb9621712010-04-24 17:59:49 +000011949ac_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 +020011950if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011951
11952cat >>confdefs.h <<_ACEOF
11953#define HAVE_STRUCT_STAT_ST_RDEV 1
11954_ACEOF
11955
11956
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011957fi
11958
Matthias Kloseb9621712010-04-24 17:59:49 +000011959ac_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 +020011960if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011961
Martin v. Löwis11437992002-04-12 09:54:03 +000011962cat >>confdefs.h <<_ACEOF
11963#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11964_ACEOF
11965
11966
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011967fi
11968
Matthias Kloseb9621712010-04-24 17:59:49 +000011969ac_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 +020011970if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011971
11972cat >>confdefs.h <<_ACEOF
11973#define HAVE_STRUCT_STAT_ST_FLAGS 1
11974_ACEOF
11975
11976
11977fi
11978
Matthias Kloseb9621712010-04-24 17:59:49 +000011979ac_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 +020011980if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011981
11982cat >>confdefs.h <<_ACEOF
11983#define HAVE_STRUCT_STAT_ST_GEN 1
11984_ACEOF
11985
11986
11987fi
11988
Matthias Kloseb9621712010-04-24 17:59:49 +000011989ac_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 +020011990if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011991
11992cat >>confdefs.h <<_ACEOF
11993#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11994_ACEOF
11995
11996
11997fi
11998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999ac_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 +020012000if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012001
Martin v. Löwis11437992002-04-12 09:54:03 +000012002cat >>confdefs.h <<_ACEOF
12003#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12004_ACEOF
12005
12006
Matthias Kloseb9621712010-04-24 17:59:49 +000012007$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012008
12009else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012010 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012011 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012012 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12013 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012014esac
12015
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012016fi
12017
Michael W. Hudson54241132001-12-07 15:38:26 +000012018
Martin v. Löwis11437992002-04-12 09:54:03 +000012019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12021$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012022if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012024else
Matthias Kloseb159a552010-04-25 21:00:44 +000012025
Matthias Kloseb9621712010-04-24 17:59:49 +000012026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012027/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012028#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012029int
12030main ()
12031{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012032return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012033 ;
12034 return 0;
12035}
12036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012037if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012038 ac_cv_header_time_altzone=yes
12039else
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012044fi
12045
Matthias Kloseb9621712010-04-24 17:59:49 +000012046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12047$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012048if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012049
Matthias Kloseb9621712010-04-24 17:59:49 +000012050$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012051
12052fi
12053
Guido van Rossumda88dad1995-01-26 00:46:29 +000012054was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12056$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012058/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012059
12060#include <sys/types.h>
12061#include <sys/select.h>
12062#include <sys/time.h>
12063
Martin v. Löwis11437992002-04-12 09:54:03 +000012064int
12065main ()
12066{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012067;
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öwis11437992002-04-12 09:54:03 +000012073
12074
Matthias Kloseb9621712010-04-24 17:59:49 +000012075$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012076
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012077 was_it_defined=yes
12078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12082$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012083
Matthias Kloseb9621712010-04-24 17:59:49 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12085$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012086if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012088else
Matthias Kloseb9621712010-04-24 17:59:49 +000012089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012090/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012091#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012092int
12093main ()
12094{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012095struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012096 ;
12097 return 0;
12098}
12099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012100if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012101 ac_cv_struct_addrinfo=yes
12102else
Matthias Kloseb9621712010-04-24 17:59:49 +000012103 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12106fi
12107
Matthias Kloseb9621712010-04-24 17:59:49 +000012108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12109$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012110if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012111
Matthias Kloseb9621712010-04-24 17:59:49 +000012112$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012113
12114fi
12115
Matthias Kloseb9621712010-04-24 17:59:49 +000012116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12117$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012118if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012122/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012123
12124# include <sys/types.h>
12125# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012126int
12127main ()
12128{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012129struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012130 ;
12131 return 0;
12132}
12133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012134if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012135 ac_cv_struct_sockaddr_storage=yes
12136else
Matthias Kloseb9621712010-04-24 17:59:49 +000012137 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12140fi
12141
Matthias Kloseb9621712010-04-24 17:59:49 +000012142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12143$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012144if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012145
Matthias Kloseb9621712010-04-24 17:59:49 +000012146$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012147
12148fi
12149
Guido van Rossum627b2d71993-12-24 10:39:16 +000012150# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012151
Matthias Kloseb9621712010-04-24 17:59:49 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12153$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012154if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012156else
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012159$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012160int
12161main ()
12162{
12163static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012164test_array [0] = 0;
12165return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012166
12167 ;
12168 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012169}
Martin v. Löwis11437992002-04-12 09:54:03 +000012170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012171if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012172 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012173else
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12179$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012180if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012182
12183fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012184
Matthias Kloseb9621712010-04-24 17:59:49 +000012185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12186$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012187if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012189else
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012191/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012192
Martin v. Löwis11437992002-04-12 09:54:03 +000012193int
12194main ()
12195{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012196
Martin v. Löwis11437992002-04-12 09:54:03 +000012197#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012198 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012200 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012201 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012202 char const *const *pcpcc;
12203 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 /* NEC SVR4.0.2 mips cc rejects this. */
12205 struct point {int x, y;};
12206 static struct point const zero = {0,0};
12207 /* AIX XL C 1.02.0.0 rejects this.
12208 It does not let you subtract one const X* pointer from another in
12209 an arm of an if-expression whose if-part is not a constant
12210 expression */
12211 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012212 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012213 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214 ++pcpcc;
12215 ppc = (char**) pcpcc;
12216 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012217 { /* SCO 3.2v4 cc rejects this sort of thing. */
12218 char tx;
12219 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012221
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012223 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012224 }
12225 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12226 int x[] = {25, 17};
12227 const int *foo = &x[0];
12228 ++foo;
12229 }
12230 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12231 typedef const int *iptr;
12232 iptr p = 0;
12233 ++p;
12234 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012235 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012236 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012237 struct s { int j; const int *ap[3]; } bx;
12238 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012239 }
12240 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12241 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012242 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012244 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012245#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012246
Martin v. Löwis11437992002-04-12 09:54:03 +000012247 ;
12248 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012249}
Martin v. Löwis11437992002-04-12 09:54:03 +000012250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012251if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012252 ac_cv_c_const=yes
12253else
Matthias Kloseb9621712010-04-24 17:59:49 +000012254 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12259$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012260if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012261
Matthias Kloseb9621712010-04-24 17:59:49 +000012262$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012263
12264fi
12265
Michael W. Hudson54241132001-12-07 15:38:26 +000012266
Guido van Rossumda88dad1995-01-26 00:46:29 +000012267works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12269$as_echo_n "checking for working volatile... " >&6; }
12270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012271/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012272
Martin v. Löwis11437992002-04-12 09:54:03 +000012273int
12274main ()
12275{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012276volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 ;
12278 return 0;
12279}
12280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012281if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012282 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012283else
Skip Montanaro6dead952003-09-25 14:50:04 +000012284
Matthias Kloseb9621712010-04-24 17:59:49 +000012285$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012286
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012287
Guido van Rossum627b2d71993-12-24 10:39:16 +000012288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12291$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012292
Guido van Rossumda88dad1995-01-26 00:46:29 +000012293works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12295$as_echo_n "checking for working signed char... " >&6; }
12296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012297/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012298
Martin v. Löwis11437992002-04-12 09:54:03 +000012299int
12300main ()
12301{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012302signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012303 ;
12304 return 0;
12305}
12306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012307if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012308 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012309else
Skip Montanaro6dead952003-09-25 14:50:04 +000012310
Matthias Kloseb9621712010-04-24 17:59:49 +000012311$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012312
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012313
Guido van Rossum7f43da71994-08-01 12:15:30 +000012314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12317$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012318
Guido van Rossumda88dad1995-01-26 00:46:29 +000012319have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12321$as_echo_n "checking for prototypes... " >&6; }
12322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012323/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012324int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012325int
12326main ()
12327{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012328return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012329 ;
12330 return 0;
12331}
12332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012334
Matthias Kloseb9621712010-04-24 17:59:49 +000012335$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012336
Matthias Kloseb159a552010-04-25 21:00:44 +000012337 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12341$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012342
Guido van Rossumda88dad1995-01-26 00:46:29 +000012343works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12345$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012347/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012348
12349#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012350int foo(int x, ...) {
12351 va_list va;
12352 va_start(va, x);
12353 va_arg(va, int);
12354 va_arg(va, char *);
12355 va_arg(va, double);
12356 return 0;
12357}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012358
Martin v. Löwis11437992002-04-12 09:54:03 +000012359int
12360main ()
12361{
Guido van Rossum90eea071996-08-30 20:58:57 +000012362return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012363 ;
12364 return 0;
12365}
12366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012368
12369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012371
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012372 works=yes
12373
Guido van Rossum627b2d71993-12-24 10:39:16 +000012374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12377$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012378
Martin v. Löwisd6320502004-08-12 13:45:08 +000012379# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12381$as_echo_n "checking for socketpair... " >&6; }
12382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012383/* end confdefs.h. */
12384
12385#include <sys/types.h>
12386#include <sys/socket.h>
12387
12388int
12389main ()
12390{
12391void *x=socketpair
12392 ;
12393 return 0;
12394}
12395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012397
Matthias Kloseb9621712010-04-24 17:59:49 +000012398$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012399
Matthias Kloseb159a552010-04-25 21:00:44 +000012400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012401$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012402else
Matthias Kloseb9621712010-04-24 17:59:49 +000012403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12404$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012405
12406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012408
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012409# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12411$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012413/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012414#include <sys/types.h>
12415#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012416int
12417main ()
12418{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012419struct sockaddr x;
12420x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 ;
12422 return 0;
12423}
12424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012425if ac_fn_c_try_compile "$LINENO"; then :
12426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12427$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012428
Matthias Kloseb9621712010-04-24 17:59:49 +000012429$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012430
12431else
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12433$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012434
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012437
Guido van Rossumda88dad1995-01-26 00:46:29 +000012438va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12440$as_echo_n "checking whether va_list is an array... " >&6; }
12441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012442/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012443
12444#ifdef HAVE_STDARG_PROTOTYPES
12445#include <stdarg.h>
12446#else
12447#include <varargs.h>
12448#endif
12449
Martin v. Löwis11437992002-04-12 09:54:03 +000012450int
12451main ()
12452{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012453va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012454 ;
12455 return 0;
12456}
12457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012458if ac_fn_c_try_compile "$LINENO"; then :
12459
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012460else
Skip Montanaro6dead952003-09-25 14:50:04 +000012461
Martin v. Löwis11437992002-04-12 09:54:03 +000012462
Matthias Kloseb9621712010-04-24 17:59:49 +000012463$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012464
Guido van Rossumda88dad1995-01-26 00:46:29 +000012465 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012466
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12470$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012471
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012472# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012473
12474
Matthias Kloseb9621712010-04-24 17:59:49 +000012475ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012476if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012477
Matthias Kloseb9621712010-04-24 17:59:49 +000012478 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012479
Matthias Kloseb9621712010-04-24 17:59:49 +000012480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12481$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012482 OLD_CFLAGS=$CFLAGS
12483 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012485/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012486
12487# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012488
Martin v. Löwis11437992002-04-12 09:54:03 +000012489int
12490main ()
12491{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012492
12493 char *name;
12494 struct hostent *he, *res;
12495 char buffer[2048];
12496 int buflen = 2048;
12497 int h_errnop;
12498
12499 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012500
12501 ;
12502 return 0;
12503}
12504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012505if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012506
Matthias Kloseb9621712010-04-24 17:59:49 +000012507 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012508
Martin v. Löwis11437992002-04-12 09:54:03 +000012509
Matthias Kloseb9621712010-04-24 17:59:49 +000012510$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012511
Matthias Kloseb9621712010-04-24 17:59:49 +000012512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12513$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012514
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012515else
Skip Montanaro6dead952003-09-25 14:50:04 +000012516
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12518$as_echo "no" >&6; }
12519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12520$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012522/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012523
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012524# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012525
Martin v. Löwis11437992002-04-12 09:54:03 +000012526int
12527main ()
12528{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012529
12530 char *name;
12531 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012532 char buffer[2048];
12533 int buflen = 2048;
12534 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012535
Matthias Kloseb159a552010-04-25 21:00:44 +000012536 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012537
12538 ;
12539 return 0;
12540}
12541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012542if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012543
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012545
Martin v. Löwis11437992002-04-12 09:54:03 +000012546
Matthias Kloseb159a552010-04-25 21:00:44 +000012547$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012548
Matthias Kloseb9621712010-04-24 17:59:49 +000012549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12550$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012551
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012552else
Skip Montanaro6dead952003-09-25 14:50:04 +000012553
Matthias Kloseb9621712010-04-24 17:59:49 +000012554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12555$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12557$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12559/* end confdefs.h. */
12560
12561# include <netdb.h>
12562
12563int
12564main ()
12565{
12566
12567 char *name;
12568 struct hostent *he;
12569 struct hostent_data data;
12570
12571 (void) gethostbyname_r(name, he, &data);
12572
12573 ;
12574 return 0;
12575}
12576_ACEOF
12577if ac_fn_c_try_compile "$LINENO"; then :
12578
12579 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12580
12581
12582$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12583
12584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12585$as_echo "yes" >&6; }
12586
12587else
12588
12589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12590$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012591
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012594
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012597
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012600 CFLAGS=$OLD_CFLAGS
12601
12602else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012603
Matthias Kloseb9621712010-04-24 17:59:49 +000012604 for ac_func in gethostbyname
12605do :
12606 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012607if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012609#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012610_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012611
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012612fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012613done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012614
Michael W. Hudson54241132001-12-07 15:38:26 +000012615
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012616fi
12617
Michael W. Hudson54241132001-12-07 15:38:26 +000012618
12619
12620
12621
12622
12623
Guido van Rossum627b2d71993-12-24 10:39:16 +000012624# checks for system services
12625# (none yet)
12626
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012627# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012628ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012629if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012630
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012631else
Matthias Kloseb9621712010-04-24 17:59:49 +000012632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12633$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012634if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012635 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012636else
Martin v. Löwis11437992002-04-12 09:54:03 +000012637 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012638LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012642/* Override any GCC internal prototype to avoid an error.
12643 Use char because int might match the return type of a GCC
12644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012645#ifdef __cplusplus
12646extern "C"
12647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012648char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012649int
12650main ()
12651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012652return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012653 ;
12654 return 0;
12655}
12656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012657if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012659else
Matthias Kloseb9621712010-04-24 17:59:49 +000012660 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012662rm -f core conftest.err conftest.$ac_objext \
12663 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012664LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12667$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012668if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012669 cat >>confdefs.h <<_ACEOF
12670#define HAVE_LIBIEEE 1
12671_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012672
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012673 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012674
Guido van Rossum627b2d71993-12-24 10:39:16 +000012675fi
12676
Michael W. Hudson54241132001-12-07 15:38:26 +000012677
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012678fi
12679
Michael W. Hudson54241132001-12-07 15:38:26 +000012680
Guido van Rossum7f253911997-05-09 02:42:48 +000012681# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12683$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012686if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012688if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012689then
12690
Matthias Kloseb9621712010-04-24 17:59:49 +000012691$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012692
Matthias Kloseb9621712010-04-24 17:59:49 +000012693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12694$as_echo "yes" >&6; }
12695else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12696$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012697fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012698else
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12700$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701fi
12702
Guido van Rossum7f253911997-05-09 02:42:48 +000012703
Guido van Rossum7f43da71994-08-01 12:15:30 +000012704# check for --with-libm=...
12705
Guido van Rossum563e7081996-09-10 18:20:48 +000012706case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012707Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012708*) LIBM=-lm
12709esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12711$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012713# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012714if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012716if test "$withval" = no
12717then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12719$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012720elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012721then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12723$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012724else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012725fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012726else
Matthias Kloseb9621712010-04-24 17:59:49 +000012727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12728$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012729fi
12730
Guido van Rossum7f43da71994-08-01 12:15:30 +000012731
12732# check for --with-libc=...
12733
Matthias Kloseb9621712010-04-24 17:59:49 +000012734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12735$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012738if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012739 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012740if test "$withval" = no
12741then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12743$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012744elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012745then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12747$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012748else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012749fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012750else
Matthias Kloseb9621712010-04-24 17:59:49 +000012751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12752$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012753fi
12754
Guido van Rossum7f43da71994-08-01 12:15:30 +000012755
Stefan Krah1919b7e2012-03-21 18:25:23 +010012756# **************************************
12757# * Check for gcc x64 inline assembler *
12758# **************************************
12759
12760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12761$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12763/* end confdefs.h. */
12764
12765int
12766main ()
12767{
12768
12769 __asm__ __volatile__ ("movq %rcx, %rax");
12770
12771 ;
12772 return 0;
12773}
12774_ACEOF
12775if ac_fn_c_try_compile "$LINENO"; then :
12776 have_gcc_asm_for_x64=yes
12777else
12778 have_gcc_asm_for_x64=no
12779fi
12780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12782$as_echo "$have_gcc_asm_for_x64" >&6; }
12783if test "$have_gcc_asm_for_x64" = yes
12784then
12785
12786$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12787
12788fi
12789
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012790# **************************************************
12791# * Check for various properties of floating point *
12792# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012793
Matthias Kloseb9621712010-04-24 17:59:49 +000012794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12795$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012796if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012797 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012798else
12799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012801 ac_cv_little_endian_double=no
12802else
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012804/* end confdefs.h. */
12805
12806#include <string.h>
12807int main() {
12808 double x = 9006104071832581.0;
12809 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12810 return 0;
12811 else
12812 return 1;
12813}
12814
12815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012816if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012817 ac_cv_little_endian_double=yes
12818else
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12822 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012823fi
12824
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012825fi
12826
Matthias Kloseb9621712010-04-24 17:59:49 +000012827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12828$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012829if test "$ac_cv_little_endian_double" = yes
12830then
12831
Matthias Kloseb9621712010-04-24 17:59:49 +000012832$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012833
12834fi
12835
Matthias Kloseb9621712010-04-24 17:59:49 +000012836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12837$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012838if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012840else
12841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012843 ac_cv_big_endian_double=no
12844else
Matthias Kloseb9621712010-04-24 17:59:49 +000012845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012846/* end confdefs.h. */
12847
12848#include <string.h>
12849int main() {
12850 double x = 9006104071832581.0;
12851 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12852 return 0;
12853 else
12854 return 1;
12855}
12856
12857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012858if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012859 ac_cv_big_endian_double=yes
12860else
Matthias Kloseb9621712010-04-24 17:59:49 +000012861 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012862fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12864 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012865fi
12866
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012867fi
12868
Matthias Kloseb9621712010-04-24 17:59:49 +000012869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12870$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012871if test "$ac_cv_big_endian_double" = yes
12872then
12873
Matthias Kloseb9621712010-04-24 17:59:49 +000012874$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012875
12876fi
12877
12878# Some ARM platforms use a mixed-endian representation for doubles.
12879# While Python doesn't currently have full support for these platforms
12880# (see e.g., issue 1762561), we can at least make sure that float <-> string
12881# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12883$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012884if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012885 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012886else
12887
Matthias Kloseb9621712010-04-24 17:59:49 +000012888if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012889 ac_cv_mixed_endian_double=no
12890else
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012892/* end confdefs.h. */
12893
12894#include <string.h>
12895int main() {
12896 double x = 9006104071832581.0;
12897 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12898 return 0;
12899 else
12900 return 1;
12901}
12902
12903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012904if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012905 ac_cv_mixed_endian_double=yes
12906else
Matthias Kloseb9621712010-04-24 17:59:49 +000012907 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012911fi
12912
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012913fi
12914
Matthias Kloseb9621712010-04-24 17:59:49 +000012915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12916$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012917if test "$ac_cv_mixed_endian_double" = yes
12918then
12919
Matthias Kloseb9621712010-04-24 17:59:49 +000012920$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012921
12922fi
12923
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012924# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012925# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012926# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012927# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012928# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012929# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012930
12931# This inline assembler syntax may also work for suncc and icc,
12932# so we try it on all platforms.
12933
Matthias Kloseb9621712010-04-24 17:59:49 +000012934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12935$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012937/* end confdefs.h. */
12938
12939int
12940main ()
12941{
12942
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012943 unsigned short cw;
12944 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12945 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012946
12947 ;
12948 return 0;
12949}
12950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012951if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012952 have_gcc_asm_for_x87=yes
12953else
Matthias Kloseb9621712010-04-24 17:59:49 +000012954 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012955fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12958$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012959if test "$have_gcc_asm_for_x87" = yes
12960then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012961
Matthias Kloseb9621712010-04-24 17:59:49 +000012962$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012963
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012964fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012965
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012966# Detect whether system arithmetic is subject to x87-style double
12967# rounding issues. The result of this test has little meaning on non
12968# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12969# mode is round-to-nearest and double rounding issues are present, and
12970# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12972$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012973# $BASECFLAGS may affect the result
12974ac_save_cc="$CC"
12975CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012976if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012977 ac_cv_x87_double_rounding=no
12978else
Matthias Kloseb9621712010-04-24 17:59:49 +000012979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012980/* end confdefs.h. */
12981
12982#include <stdlib.h>
12983#include <math.h>
12984int main() {
12985 volatile double x, y, z;
12986 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12987 x = 0.99999999999999989; /* 1-2**-53 */
12988 y = 1./x;
12989 if (y != 1.)
12990 exit(0);
12991 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12992 x = 1e16;
12993 y = 2.99999;
12994 z = x + y;
12995 if (z != 1e16+4.)
12996 exit(0);
12997 /* both tests show evidence of double rounding */
12998 exit(1);
12999}
13000
13001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013002if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013003 ac_cv_x87_double_rounding=no
13004else
Matthias Kloseb9621712010-04-24 17:59:49 +000013005 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013007rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13008 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013009fi
13010
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013011CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13013$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013014if test "$ac_cv_x87_double_rounding" = yes
13015then
13016
Matthias Kloseb9621712010-04-24 17:59:49 +000013017$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013018
13019fi
13020
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013021# ************************************
13022# * Check for mathematical functions *
13023# ************************************
13024
13025LIBS_SAVE=$LIBS
13026LIBS="$LIBS $LIBM"
13027
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013028for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13029do :
13030 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13031ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013032if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013033 cat >>confdefs.h <<_ACEOF
13034#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13035_ACEOF
13036
13037fi
13038done
13039
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013040for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013041do :
13042 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13043ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013044if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013045 cat >>confdefs.h <<_ACEOF
13046#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13047_ACEOF
13048
13049fi
13050done
13051
13052ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13053"
Victor Stinnere0be4232011-10-25 13:06:09 +020013054if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013055 ac_have_decl=1
13056else
13057 ac_have_decl=0
13058fi
13059
13060cat >>confdefs.h <<_ACEOF
13061#define HAVE_DECL_ISINF $ac_have_decl
13062_ACEOF
13063ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13064"
Victor Stinnere0be4232011-10-25 13:06:09 +020013065if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013066 ac_have_decl=1
13067else
13068 ac_have_decl=0
13069fi
13070
13071cat >>confdefs.h <<_ACEOF
13072#define HAVE_DECL_ISNAN $ac_have_decl
13073_ACEOF
13074ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13075"
Victor Stinnere0be4232011-10-25 13:06:09 +020013076if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013077 ac_have_decl=1
13078else
13079 ac_have_decl=0
13080fi
13081
13082cat >>confdefs.h <<_ACEOF
13083#define HAVE_DECL_ISFINITE $ac_have_decl
13084_ACEOF
13085
13086
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013087# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13088# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13090$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013091if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013092 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013093else
13094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013096 ac_cv_tanh_preserves_zero_sign=no
13097else
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013099/* end confdefs.h. */
13100
13101#include <math.h>
13102#include <stdlib.h>
13103int main() {
13104 /* return 0 if either negative zeros don't exist
13105 on this platform or if negative zeros exist
13106 and tanh(-0.) == -0. */
13107 if (atan2(0., -1.) == atan2(-0., -1.) ||
13108 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13109 else exit(1);
13110}
13111
13112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013113if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013114 ac_cv_tanh_preserves_zero_sign=yes
13115else
Matthias Kloseb9621712010-04-24 17:59:49 +000013116 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13119 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013120fi
13121
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013122fi
13123
Matthias Kloseb9621712010-04-24 17:59:49 +000013124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13125$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013126if test "$ac_cv_tanh_preserves_zero_sign" = yes
13127then
13128
Matthias Kloseb9621712010-04-24 17:59:49 +000013129$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013130
13131fi
13132
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013133if test "$ac_cv_func_log1p" = yes
13134then
13135 # On some versions of AIX, log1p(-0.) returns 0. instead of
13136 # -0. See issue #9920.
13137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13138$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013139 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013140 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013141else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013142
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013143 if test "$cross_compiling" = yes; then :
13144 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013145else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13147/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013148
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013149 #include <math.h>
13150 #include <stdlib.h>
13151 int main() {
13152 /* Fail if the signs of log1p(-0.) and -0. can be
13153 distinguished. */
13154 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13155 return 0;
13156 else
13157 return 1;
13158 }
13159
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013160_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013161if ac_fn_c_try_run "$LINENO"; then :
13162 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013163else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013164 ac_cv_log1p_drops_zero_sign=yes
13165fi
13166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013168fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013169
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013170fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013171
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13173$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13174fi
13175if test "$ac_cv_log1p_drops_zero_sign" = yes
13176then
13177
13178$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13179
13180fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013181
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013182LIBS=$LIBS_SAVE
13183
Mark Dickinsona614f042009-11-28 12:48:43 +000013184# For multiprocessing module, check that sem_open
13185# actually works. For FreeBSD versions <= 7.2,
13186# the kernel module that provides POSIX semaphores
13187# isn't loaded by default, so an attempt to call
13188# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13190$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013191if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013192 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013195 ac_cv_posix_semaphores_enabled=yes
13196else
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013198/* end confdefs.h. */
13199
13200#include <unistd.h>
13201#include <fcntl.h>
13202#include <stdio.h>
13203#include <semaphore.h>
13204#include <sys/stat.h>
13205
13206int main(void) {
13207 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13208 if (a == SEM_FAILED) {
13209 perror("sem_open");
13210 return 1;
13211 }
13212 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013213 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013214 return 0;
13215}
13216
13217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013218if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013219 ac_cv_posix_semaphores_enabled=yes
13220else
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13224 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013225fi
13226
13227
Mark Dickinsona614f042009-11-28 12:48:43 +000013228fi
13229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13231$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013232if test $ac_cv_posix_semaphores_enabled = no
13233then
13234
Matthias Kloseb9621712010-04-24 17:59:49 +000013235$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013236
13237fi
13238
Mark Dickinson10683072009-04-18 21:18:19 +000013239# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13241$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013242if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013243 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013244else
Matthias Kloseb9621712010-04-24 17:59:49 +000013245 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013246 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013247else
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013249/* end confdefs.h. */
13250
13251#include <unistd.h>
13252#include <fcntl.h>
13253#include <stdio.h>
13254#include <semaphore.h>
13255#include <sys/stat.h>
13256
13257int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013258 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013259 int count;
13260 int res;
13261 if(a==SEM_FAILED){
13262 perror("sem_open");
13263 return 1;
13264
13265 }
13266 res = sem_getvalue(a, &count);
13267 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013268 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013269 return res==-1 ? 1 : 0;
13270}
13271
Mark Dickinson10683072009-04-18 21:18:19 +000013272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013273if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013274 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013275else
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13279 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013280fi
13281
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013282
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013283fi
13284
Matthias Kloseb9621712010-04-24 17:59:49 +000013285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13286$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013287if test $ac_cv_broken_sem_getvalue = yes
13288then
13289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013291
13292fi
13293
Mark Dickinsonbd792642009-03-18 20:06:12 +000013294# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13296$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013297# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013298if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013299 enableval=$enable_big_digits; case $enable_big_digits in
13300yes)
13301 enable_big_digits=30 ;;
13302no)
13303 enable_big_digits=15 ;;
1330415|30)
13305 ;;
13306*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013307 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 +000013308esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13310$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013311
13312cat >>confdefs.h <<_ACEOF
13313#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13314_ACEOF
13315
13316
13317else
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13319$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013320fi
13321
13322
Guido van Rossumef2255b2000-03-10 22:30:29 +000013323# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013324ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013325if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013326
13327
Matthias Kloseb9621712010-04-24 17:59:49 +000013328$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013329
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013330 wchar_h="yes"
13331
Guido van Rossumef2255b2000-03-10 22:30:29 +000013332else
Martin v. Löwis11437992002-04-12 09:54:03 +000013333 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013334
13335fi
13336
Michael W. Hudson54241132001-12-07 15:38:26 +000013337
Martin v. Löwis11437992002-04-12 09:54:03 +000013338
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013339# determine wchar_t size
13340if test "$wchar_h" = yes
13341then
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013343# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13344# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13345# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13347$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013348if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013350else
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13352"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013353
Martin v. Löwis11437992002-04-12 09:54:03 +000013354else
Matthias Kloseb9621712010-04-24 17:59:49 +000013355 if test "$ac_cv_type_wchar_t" = yes; then
13356 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13357$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013358as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013359See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013360 else
13361 ac_cv_sizeof_wchar_t=0
13362 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013363fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013364
Martin v. Löwis11437992002-04-12 09:54:03 +000013365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13367$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368
13369
13370
Martin v. Löwis11437992002-04-12 09:54:03 +000013371cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013372#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013373_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013374
Michael W. Hudson54241132001-12-07 15:38:26 +000013375
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013376fi
13377
Matthias Kloseb9621712010-04-24 17:59:49 +000013378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13379$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013380have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013382/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013383
13384#include <tcl.h>
13385#if TCL_UTF_MAX != 6
13386# error "NOT UCS4_TCL"
13387#endif
13388int
13389main ()
13390{
13391
13392 ;
13393 return 0;
13394}
13395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013397
13398
Matthias Kloseb9621712010-04-24 17:59:49 +000013399$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013400
13401 have_ucs4_tcl=yes
13402
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13406$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013407
Skip Montanaro6dead952003-09-25 14:50:04 +000013408# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013409if test "$wchar_h" = yes
13410then
13411 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13413$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013414 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013416else
13417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013419 ac_cv_wchar_t_signed=yes
13420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013422/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013423
13424 #include <wchar.h>
13425 int main()
13426 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013427 /* Success: exit code 0 */
13428 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013429 }
13430
13431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013432if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013433 ac_cv_wchar_t_signed=yes
13434else
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13438 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013439fi
13440
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013441fi
13442
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13444$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013445fi
13446
Georg Brandl52d168a2008-01-07 18:10:24 +000013447# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013448if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013449 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013450then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013451 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013454
Georg Brandl52d168a2008-01-07 18:10:24 +000013455else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013456 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013457fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13459$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013460
13461# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13463$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013464if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013466else
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 ac_cv_c_bigendian=unknown
13468 # See if we're dealing with a universal compiler.
13469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13470/* end confdefs.h. */
13471#ifndef __APPLE_CC__
13472 not a universal capable compiler
13473 #endif
13474 typedef int dummy;
13475
Skip Montanaro6dead952003-09-25 14:50:04 +000013476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013477if ac_fn_c_try_compile "$LINENO"; then :
13478
13479 # Check for potential -arch flags. It is not universal unless
13480 # there are at least two -arch flags with different values.
13481 ac_arch=
13482 ac_prev=
13483 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13484 if test -n "$ac_prev"; then
13485 case $ac_word in
13486 i?86 | x86_64 | ppc | ppc64)
13487 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13488 ac_arch=$ac_word
13489 else
13490 ac_cv_c_bigendian=universal
13491 break
13492 fi
13493 ;;
13494 esac
13495 ac_prev=
13496 elif test "x$ac_word" = "x-arch"; then
13497 ac_prev=arch
13498 fi
13499 done
13500fi
13501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13502 if test $ac_cv_c_bigendian = unknown; then
13503 # See if sys/param.h defines the BYTE_ORDER macro.
13504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013505/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013506#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013507 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013508
Martin v. Löwis11437992002-04-12 09:54:03 +000013509int
13510main ()
13511{
Matthias Kloseb9621712010-04-24 17:59:49 +000013512#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13513 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13514 && LITTLE_ENDIAN)
13515 bogus endian macros
13516 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013517
13518 ;
13519 return 0;
13520}
13521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013522if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013523 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013525/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013526#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013528
Martin v. Löwis11437992002-04-12 09:54:03 +000013529int
13530main ()
13531{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013532#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 not big endian
13534 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013535
13536 ;
13537 return 0;
13538}
13539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013540if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013541 ac_cv_c_bigendian=yes
13542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013546fi
13547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13548 fi
13549 if test $ac_cv_c_bigendian = unknown; then
13550 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013552/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013553#include <limits.h>
13554
Martin v. Löwis11437992002-04-12 09:54:03 +000013555int
13556main ()
13557{
Matthias Kloseb9621712010-04-24 17:59:49 +000013558#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13559 bogus endian macros
13560 #endif
13561
Martin v. Löwis11437992002-04-12 09:54:03 +000013562 ;
13563 return 0;
13564}
13565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013566if ac_fn_c_try_compile "$LINENO"; then :
13567 # It does; now see whether it defined to _BIG_ENDIAN or not.
13568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13569/* end confdefs.h. */
13570#include <limits.h>
13571
13572int
13573main ()
13574{
13575#ifndef _BIG_ENDIAN
13576 not big endian
13577 #endif
13578
13579 ;
13580 return 0;
13581}
13582_ACEOF
13583if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013584 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013585else
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13589fi
13590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13591 fi
13592 if test $ac_cv_c_bigendian = unknown; then
13593 # Compile a test program.
13594 if test "$cross_compiling" = yes; then :
13595 # Try to guess by grepping values from an object file.
13596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13597/* end confdefs.h. */
13598short int ascii_mm[] =
13599 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13600 short int ascii_ii[] =
13601 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13602 int use_ascii (int i) {
13603 return ascii_mm[i] + ascii_ii[i];
13604 }
13605 short int ebcdic_ii[] =
13606 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13607 short int ebcdic_mm[] =
13608 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13609 int use_ebcdic (int i) {
13610 return ebcdic_mm[i] + ebcdic_ii[i];
13611 }
13612 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013613
Matthias Kloseb9621712010-04-24 17:59:49 +000013614int
13615main ()
13616{
13617return use_ascii (foo) == use_ebcdic (foo);
13618 ;
13619 return 0;
13620}
13621_ACEOF
13622if ac_fn_c_try_compile "$LINENO"; then :
13623 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13624 ac_cv_c_bigendian=yes
13625 fi
13626 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13627 if test "$ac_cv_c_bigendian" = unknown; then
13628 ac_cv_c_bigendian=no
13629 else
13630 # finding both strings is unlikely to happen, but who knows?
13631 ac_cv_c_bigendian=unknown
13632 fi
13633 fi
13634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013636else
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013638/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013639$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013640int
13641main ()
13642{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 /* Are we little or big endian? From Harbison&Steele. */
13645 union
13646 {
13647 long int l;
13648 char c[sizeof (long int)];
13649 } u;
13650 u.l = 1;
13651 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013652
13653 ;
13654 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013655}
Martin v. Löwis11437992002-04-12 09:54:03 +000013656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013657if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013658 ac_cv_c_bigendian=no
13659else
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13663 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013665
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13669$as_echo "$ac_cv_c_bigendian" >&6; }
13670 case $ac_cv_c_bigendian in #(
13671 yes)
13672 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13673;; #(
13674 no)
13675 ;; #(
13676 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013679
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 ;; #(
13681 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013682 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013683 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013685
Michael W. Hudson54241132001-12-07 15:38:26 +000013686
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013687# ABI version string for Python extension modules. This appears between the
13688# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13689# from the following attributes which affect the ABI of this Python build (in
13690# this order):
13691#
13692# * The Python implementation (always 'cpython-' for us)
13693# * The major and minor version numbers
13694# * --with-pydebug (adds a 'd')
13695# * --with-pymalloc (adds a 'm')
13696# * --with-wide-unicode (adds a 'u')
13697#
13698# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013699# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13700# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013701
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13703$as_echo_n "checking ABIFLAGS... " >&6; }
13704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13705$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13707$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013708SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13710$as_echo "$SOABI" >&6; }
13711
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013712
13713case $ac_sys_system in
13714 Linux*|GNU*)
13715 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13716 *)
13717 EXT_SUFFIX=${SHLIB_SUFFIX};;
13718esac
13719
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13721$as_echo_n "checking LDVERSION... " >&6; }
13722LDVERSION='$(VERSION)$(ABIFLAGS)'
13723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13724$as_echo "$LDVERSION" >&6; }
13725
doko@python.org87421192013-01-26 11:39:31 +010013726
13727LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
13728
13729
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013730# Check whether right shifting a negative integer extends the sign bit
13731# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13733$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013734if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013736else
Martin v. Löwis11437992002-04-12 09:54:03 +000013737
Matthias Kloseb9621712010-04-24 17:59:49 +000013738if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013739 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013740else
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013742/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013743
13744int main()
13745{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013746 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013747}
13748
Martin v. Löwis11437992002-04-12 09:54:03 +000013749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013750if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013751 ac_cv_rshift_extends_sign=yes
13752else
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13756 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013757fi
13758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759fi
13760
Matthias Kloseb9621712010-04-24 17:59:49 +000013761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13762$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013763if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013764then
Martin v. Löwis11437992002-04-12 09:54:03 +000013765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013767
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013768fi
13769
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013770# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13772$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013773if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013774 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013775else
Martin v. Löwis11437992002-04-12 09:54:03 +000013776
Matthias Kloseb9621712010-04-24 17:59:49 +000013777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013778/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013779#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013780int
13781main ()
13782{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013783
13784 FILE *f = fopen("/dev/null", "r");
13785 flockfile(f);
13786 getc_unlocked(f);
13787 funlockfile(f);
13788
Martin v. Löwis11437992002-04-12 09:54:03 +000013789 ;
13790 return 0;
13791}
13792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013793if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013794 ac_cv_have_getc_unlocked=yes
13795else
Matthias Kloseb9621712010-04-24 17:59:49 +000013796 ac_cv_have_getc_unlocked=no
13797fi
13798rm -f core conftest.err conftest.$ac_objext \
13799 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013801
Matthias Kloseb9621712010-04-24 17:59:49 +000013802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13803$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013804if test "$ac_cv_have_getc_unlocked" = yes
13805then
Martin v. Löwis11437992002-04-12 09:54:03 +000013806
Matthias Kloseb9621712010-04-24 17:59:49 +000013807$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013808
13809fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013810
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013811# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013812# save the value of LIBS so we don't actually link Python with readline
13813LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013814
Gregory P. Smith18820942008-09-07 06:24:49 +000013815# On some systems we need to link readline to a termcap compatible
13816# library. NOTE: Keep the precedence of listed libraries synchronised
13817# with setup.py.
13818py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13820$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013821for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013822 if test -z "$py_libtermcap"; then
13823 READLINE_LIBS="-lreadline"
13824 else
13825 READLINE_LIBS="-lreadline -l$py_libtermcap"
13826 fi
13827 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013829/* end confdefs.h. */
13830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831/* Override any GCC internal prototype to avoid an error.
13832 Use char because int might match the return type of a GCC
13833 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013834#ifdef __cplusplus
13835extern "C"
13836#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013837char readline ();
13838int
13839main ()
13840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013841return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013842 ;
13843 return 0;
13844}
13845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013846if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013847 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013849rm -f core conftest.err conftest.$ac_objext \
13850 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013851 if test $py_cv_lib_readline = yes; then
13852 break
13853 fi
13854done
13855# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13856#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013857if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13859$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013860else
Matthias Kloseb9621712010-04-24 17:59:49 +000013861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13862$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013865
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013866fi
13867
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013868# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13870$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013871if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013873else
13874 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013875LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013877/* end confdefs.h. */
13878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013879/* Override any GCC internal prototype to avoid an error.
13880 Use char because int might match the return type of a GCC
13881 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013882#ifdef __cplusplus
13883extern "C"
13884#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013885char rl_callback_handler_install ();
13886int
13887main ()
13888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013889return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013890 ;
13891 return 0;
13892}
13893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013894if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013895 ac_cv_lib_readline_rl_callback_handler_install=yes
13896else
Matthias Kloseb9621712010-04-24 17:59:49 +000013897 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013899rm -f core conftest.err conftest.$ac_objext \
13900 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013901LIBS=$ac_check_lib_save_LIBS
13902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13904$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013905if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013906
Matthias Kloseb9621712010-04-24 17:59:49 +000013907$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013908
13909fi
13910
13911
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013912# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013914/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013915#include <readline/readline.h>
13916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013917if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013918 have_readline=yes
13919else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013920 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013921
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013922fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013923rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013924if test $have_readline = yes
13925then
Matthias Kloseb9621712010-04-24 17:59:49 +000013926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013927/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013928#include <readline/readline.h>
13929
13930_ACEOF
13931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013933
Matthias Kloseb9621712010-04-24 17:59:49 +000013934$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013935
13936fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013937rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013938
Matthias Kloseb9621712010-04-24 17:59:49 +000013939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013940/* end confdefs.h. */
13941#include <readline/readline.h>
13942
13943_ACEOF
13944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013948
13949fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013950rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013951
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013952fi
13953
Martin v. Löwis0daad592001-09-30 21:09:59 +000013954# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13956$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013957if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013959else
Martin v. Löwis11437992002-04-12 09:54:03 +000013960 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013961LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965/* Override any GCC internal prototype to avoid an error.
13966 Use char because int might match the return type of a GCC
13967 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013968#ifdef __cplusplus
13969extern "C"
13970#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013971char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013972int
13973main ()
13974{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013975return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 ;
13977 return 0;
13978}
13979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013980if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013981 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013982else
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013984fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013985rm -f core conftest.err conftest.$ac_objext \
13986 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013987LIBS=$ac_check_lib_save_LIBS
13988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13990$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013991if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013992
Matthias Kloseb9621712010-04-24 17:59:49 +000013993$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013994
Martin v. Löwis0daad592001-09-30 21:09:59 +000013995fi
13996
Michael W. Hudson54241132001-12-07 15:38:26 +000013997
Thomas Wouters89d996e2007-09-08 17:39:28 +000013998# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14000$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014001if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014002 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014003else
14004 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014005LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014007/* end confdefs.h. */
14008
14009/* Override any GCC internal prototype to avoid an error.
14010 Use char because int might match the return type of a GCC
14011 builtin and then its argument prototype would still apply. */
14012#ifdef __cplusplus
14013extern "C"
14014#endif
14015char rl_completion_display_matches_hook ();
14016int
14017main ()
14018{
14019return rl_completion_display_matches_hook ();
14020 ;
14021 return 0;
14022}
14023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014024if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014025 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14026else
Matthias Kloseb9621712010-04-24 17:59:49 +000014027 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014029rm -f core conftest.err conftest.$ac_objext \
14030 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014031LIBS=$ac_check_lib_save_LIBS
14032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14034$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014035if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014036
Matthias Kloseb9621712010-04-24 17:59:49 +000014037$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014038
14039fi
14040
14041
Martin v. Löwis0daad592001-09-30 21:09:59 +000014042# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14044$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014045if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014046 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014047else
Martin v. Löwis11437992002-04-12 09:54:03 +000014048 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014049LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014053/* Override any GCC internal prototype to avoid an error.
14054 Use char because int might match the return type of a GCC
14055 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014056#ifdef __cplusplus
14057extern "C"
14058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014059char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014060int
14061main ()
14062{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014063return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 ;
14065 return 0;
14066}
14067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014068if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014069 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014070else
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014073rm -f core conftest.err conftest.$ac_objext \
14074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014075LIBS=$ac_check_lib_save_LIBS
14076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14078$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014079if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014080
Matthias Kloseb9621712010-04-24 17:59:49 +000014081$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014082
Guido van Rossum353ae582001-07-10 16:45:32 +000014083fi
14084
Jack Jansendd19cf82001-12-06 22:36:17 +000014085
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014086# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014088/* end confdefs.h. */
14089#include <readline/readline.h>
14090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014091if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014092 have_readline=yes
14093else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014094 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014095
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014096fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014097rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014098if test $have_readline = yes
14099then
Matthias Kloseb9621712010-04-24 17:59:49 +000014100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014101/* end confdefs.h. */
14102#include <readline/readline.h>
14103
14104_ACEOF
14105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014106 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014107
Matthias Kloseb9621712010-04-24 17:59:49 +000014108$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014109
14110fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014111rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014112
14113fi
14114
Martin v. Löwis82bca632006-02-10 20:49:30 +000014115# End of readline checks: restore LIBS
14116LIBS=$LIBS_no_readline
14117
Matthias Kloseb9621712010-04-24 17:59:49 +000014118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14119$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014120if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014122else
Martin v. Löwis11437992002-04-12 09:54:03 +000014123
Matthias Kloseb9621712010-04-24 17:59:49 +000014124if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014125 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014126else
Matthias Kloseb9621712010-04-24 17:59:49 +000014127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014128/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014129
14130int main()
14131{
14132 int val1 = nice(1);
14133 if (val1 != -1 && val1 == nice(2))
14134 exit(0);
14135 exit(1);
14136}
14137
Martin v. Löwis11437992002-04-12 09:54:03 +000014138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014139if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014140 ac_cv_broken_nice=yes
14141else
Matthias Kloseb9621712010-04-24 17:59:49 +000014142 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14145 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014146fi
14147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148fi
14149
Matthias Kloseb9621712010-04-24 17:59:49 +000014150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14151$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014152if test "$ac_cv_broken_nice" = yes
14153then
Martin v. Löwis11437992002-04-12 09:54:03 +000014154
Matthias Kloseb9621712010-04-24 17:59:49 +000014155$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014156
14157fi
14158
Matthias Kloseb9621712010-04-24 17:59:49 +000014159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14160$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014161if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014162 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014163else
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014165 ac_cv_broken_poll=no
14166else
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014168/* end confdefs.h. */
14169
14170#include <poll.h>
14171
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014172int main()
14173{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014174 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014175 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014176
14177 close (42);
14178
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014179 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014180 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014181 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014182 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014183 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014184 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014185 return 1;
14186}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014187
14188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014189if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014190 ac_cv_broken_poll=yes
14191else
Matthias Kloseb9621712010-04-24 17:59:49 +000014192 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014194rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14195 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014197
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014198fi
14199
Matthias Kloseb9621712010-04-24 17:59:49 +000014200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14201$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014202if test "$ac_cv_broken_poll" = yes
14203then
14204
Matthias Kloseb9621712010-04-24 17:59:49 +000014205$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014206
14207fi
14208
Brett Cannon43802422005-02-10 20:48:03 +000014209# 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 +000014210# (which is not required by ISO C or UNIX spec) and/or if we support
14211# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014212ac_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 +000014213#include <$ac_cv_struct_tm>
14214
Matthias Kloseb9621712010-04-24 17:59:49 +000014215"
Victor Stinnere0be4232011-10-25 13:06:09 +020014216if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014217
14218cat >>confdefs.h <<_ACEOF
14219#define HAVE_STRUCT_TM_TM_ZONE 1
14220_ACEOF
14221
14222
14223fi
14224
14225if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14226
Matthias Kloseb9621712010-04-24 17:59:49 +000014227$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014228
14229else
Matthias Kloseb9621712010-04-24 17:59:49 +000014230 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14231"
Victor Stinnere0be4232011-10-25 13:06:09 +020014232if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234else
Matthias Kloseb9621712010-04-24 17:59:49 +000014235 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236fi
14237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014239#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014240_ACEOF
14241
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14243$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014244if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014246else
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014248/* end confdefs.h. */
14249#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250#if !HAVE_DECL_TZNAME
14251extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014252#endif
14253
14254int
14255main ()
14256{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014257return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014258 ;
14259 return 0;
14260}
14261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014262if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014263 ac_cv_var_tzname=yes
14264else
Matthias Kloseb9621712010-04-24 17:59:49 +000014265 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014267rm -f core conftest.err conftest.$ac_objext \
14268 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14271$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014272 if test $ac_cv_var_tzname = yes; then
14273
Matthias Kloseb9621712010-04-24 17:59:49 +000014274$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014275
14276 fi
14277fi
14278
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014279
Martin v. Löwis1d459062005-03-14 21:23:33 +000014280# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14282$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014283if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014284 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014285else
14286
Matthias Kloseb9621712010-04-24 17:59:49 +000014287if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014288 ac_cv_working_tzset=no
14289else
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014291/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014292
14293#include <stdlib.h>
14294#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014295#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014296
14297#if HAVE_TZNAME
14298extern char *tzname[];
14299#endif
14300
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014301int main()
14302{
Brett Cannon18367812003-09-19 00:59:16 +000014303 /* Note that we need to ensure that not only does tzset(3)
14304 do 'something' with localtime, but it works as documented
14305 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014306 This includes making sure that tzname is set properly if
14307 tm->tm_zone does not exist since it is the alternative way
14308 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014309
14310 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014311 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014312 */
14313
Martin v. Löwis1d459062005-03-14 21:23:33 +000014314 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014315 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14316
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014317 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014318 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014319 if (localtime(&groundhogday)->tm_hour != 0)
14320 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014321#if HAVE_TZNAME
14322 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14323 if (strcmp(tzname[0], "UTC") ||
14324 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14325 exit(1);
14326#endif
Brett Cannon18367812003-09-19 00:59:16 +000014327
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014328 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014329 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014330 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014331 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014332#if HAVE_TZNAME
14333 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14334 exit(1);
14335#endif
Brett Cannon18367812003-09-19 00:59:16 +000014336
14337 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14338 tzset();
14339 if (localtime(&groundhogday)->tm_hour != 11)
14340 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014341#if HAVE_TZNAME
14342 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14343 exit(1);
14344#endif
14345
14346#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014347 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14348 exit(1);
14349 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14350 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014351#endif
Brett Cannon18367812003-09-19 00:59:16 +000014352
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014353 exit(0);
14354}
14355
14356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014357if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014358 ac_cv_working_tzset=yes
14359else
Matthias Kloseb9621712010-04-24 17:59:49 +000014360 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014362rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14363 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014364fi
14365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014366fi
14367
Matthias Kloseb9621712010-04-24 17:59:49 +000014368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14369$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014370if test "$ac_cv_working_tzset" = yes
14371then
14372
Matthias Kloseb9621712010-04-24 17:59:49 +000014373$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014374
14375fi
14376
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014377# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14379$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014380if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014382else
Matthias Kloseb9621712010-04-24 17:59:49 +000014383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014384/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014385#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014386int
14387main ()
14388{
14389
14390struct stat st;
14391st.st_mtim.tv_nsec = 1;
14392
14393 ;
14394 return 0;
14395}
14396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014397if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014398 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014399else
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14403fi
14404
Matthias Kloseb9621712010-04-24 17:59:49 +000014405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14406$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014407if test "$ac_cv_stat_tv_nsec" = yes
14408then
14409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014411
14412fi
14413
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014414# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14416$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014417if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014419else
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014421/* end confdefs.h. */
14422#include <sys/stat.h>
14423int
14424main ()
14425{
14426
14427struct stat st;
14428st.st_mtimespec.tv_nsec = 1;
14429
14430 ;
14431 return 0;
14432}
14433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014435 ac_cv_stat_tv_nsec2=yes
14436else
Matthias Kloseb9621712010-04-24 17:59:49 +000014437 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14440fi
14441
Matthias Kloseb9621712010-04-24 17:59:49 +000014442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14443$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014444if test "$ac_cv_stat_tv_nsec2" = yes
14445then
14446
Matthias Kloseb9621712010-04-24 17:59:49 +000014447$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014448
14449fi
14450
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014451ac_save_cppflags="$CPPFLAGS"
14452CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014453# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14455$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014456if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014458else
Matthias Kloseb9621712010-04-24 17:59:49 +000014459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014460/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014461#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014462int
14463main ()
14464{
Jack Jansen666b1e72001-10-31 12:11:48 +000014465
14466 int rtn;
14467 rtn = mvwdelch(0,0,0);
14468
Martin v. Löwis11437992002-04-12 09:54:03 +000014469 ;
14470 return 0;
14471}
14472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014473if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014474 ac_cv_mvwdelch_is_expression=yes
14475else
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14479fi
14480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14482$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014483
14484if test "$ac_cv_mvwdelch_is_expression" = yes
14485then
Martin v. Löwis11437992002-04-12 09:54:03 +000014486
Matthias Kloseb9621712010-04-24 17:59:49 +000014487$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014488
14489fi
14490
Matthias Kloseb9621712010-04-24 17:59:49 +000014491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14492$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014493if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014495else
Matthias Kloseb9621712010-04-24 17:59:49 +000014496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014497/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014498#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014499int
14500main ()
14501{
Jack Jansen666b1e72001-10-31 12:11:48 +000014502
14503 WINDOW *w;
14504 w->_flags = 0;
14505
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 ;
14507 return 0;
14508}
14509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014510if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014511 ac_cv_window_has_flags=yes
14512else
Matthias Kloseb9621712010-04-24 17:59:49 +000014513 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14516fi
14517
Matthias Kloseb9621712010-04-24 17:59:49 +000014518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14519$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014520
Jack Jansen666b1e72001-10-31 12:11:48 +000014521
14522if test "$ac_cv_window_has_flags" = yes
14523then
Martin v. Löwis11437992002-04-12 09:54:03 +000014524
Matthias Kloseb9621712010-04-24 17:59:49 +000014525$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014526
14527fi
14528
Matthias Kloseb9621712010-04-24 17:59:49 +000014529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14530$as_echo_n "checking for is_term_resized... " >&6; }
14531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014532/* end confdefs.h. */
14533#include <curses.h>
14534int
14535main ()
14536{
14537void *x=is_term_resized
14538 ;
14539 return 0;
14540}
14541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014542if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014543
Matthias Kloseb9621712010-04-24 17:59:49 +000014544$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014545
Matthias Kloseb159a552010-04-25 21:00:44 +000014546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014547$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014548else
Matthias Kloseb9621712010-04-24 17:59:49 +000014549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14550$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014551
14552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14554
Matthias Kloseb9621712010-04-24 17:59:49 +000014555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14556$as_echo_n "checking for resize_term... " >&6; }
14557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014558/* end confdefs.h. */
14559#include <curses.h>
14560int
14561main ()
14562{
14563void *x=resize_term
14564 ;
14565 return 0;
14566}
14567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014568if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014569
Matthias Kloseb9621712010-04-24 17:59:49 +000014570$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014571
Matthias Kloseb159a552010-04-25 21:00:44 +000014572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014573$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014574else
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14576$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014577
14578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14580
Matthias Kloseb9621712010-04-24 17:59:49 +000014581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14582$as_echo_n "checking for resizeterm... " >&6; }
14583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014584/* end confdefs.h. */
14585#include <curses.h>
14586int
14587main ()
14588{
14589void *x=resizeterm
14590 ;
14591 return 0;
14592}
14593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014594if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014595
Matthias Kloseb9621712010-04-24 17:59:49 +000014596$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014597
Matthias Kloseb159a552010-04-25 21:00:44 +000014598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014599$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014600else
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14602$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014603
14604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014606# last curses configure check
14607CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14610$as_echo "$as_me: checking for device files" >&6;}
14611
14612if test "x$cross_compiling" = xyes; then
14613 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14615$as_echo_n "checking for /dev/ptmx... " >&6; }
14616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14617$as_echo "not set" >&6; }
14618 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14619 fi
14620 if test "${ac_cv_file__dev_ptc+set}" != set; then
14621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14622$as_echo_n "checking for /dev/ptc... " >&6; }
14623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14624$as_echo "not set" >&6; }
14625 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14626 fi
14627fi
14628
Matthias Kloseb9621712010-04-24 17:59:49 +000014629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14630$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014631if ${ac_cv_file__dev_ptmx+:} false; then :
14632 $as_echo_n "(cached) " >&6
14633else
14634 test "$cross_compiling" = yes &&
14635 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14636if test -r "/dev/ptmx"; then
14637 ac_cv_file__dev_ptmx=yes
14638else
14639 ac_cv_file__dev_ptmx=no
14640fi
14641fi
14642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14643$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14644if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014645
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014646fi
14647
14648if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014649
Matthias Kloseb9621712010-04-24 17:59:49 +000014650$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014651
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14654$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014655if ${ac_cv_file__dev_ptc+:} false; then :
14656 $as_echo_n "(cached) " >&6
14657else
14658 test "$cross_compiling" = yes &&
14659 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14660if test -r "/dev/ptc"; then
14661 ac_cv_file__dev_ptc=yes
14662else
14663 ac_cv_file__dev_ptc=no
14664fi
14665fi
14666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14667$as_echo "$ac_cv_file__dev_ptc" >&6; }
14668if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014669
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014670fi
14671
14672if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014673
Matthias Kloseb9621712010-04-24 17:59:49 +000014674$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014675
Neal Norwitz865400f2003-03-21 01:42:58 +000014676fi
14677
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014678if test "$have_long_long" = yes
14679then
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14681$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014682 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014684else
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014686 ac_cv_have_long_long_format="cross -- assuming no"
14687 if test x$GCC = xyes; then
14688 save_CFLAGS=$CFLAGS
14689 CFLAGS="$CFLAGS -Werror -Wformat"
14690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14691/* end confdefs.h. */
14692
14693 #include <stdio.h>
14694 #include <stddef.h>
14695
14696int
14697main ()
14698{
14699
14700 char *buffer;
14701 sprintf(buffer, "%lld", (long long)123);
14702 sprintf(buffer, "%lld", (long long)-123);
14703 sprintf(buffer, "%llu", (unsigned long long)123);
14704
14705 ;
14706 return 0;
14707}
14708_ACEOF
14709if ac_fn_c_try_compile "$LINENO"; then :
14710 ac_cv_have_long_long_format=yes
14711
14712fi
14713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14714 CFLAGS=$save_CFLAGS
14715 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014716else
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014718/* end confdefs.h. */
14719
14720 #include <stdio.h>
14721 #include <stddef.h>
14722 #include <string.h>
14723
14724 #ifdef HAVE_SYS_TYPES_H
14725 #include <sys/types.h>
14726 #endif
14727
14728 int main()
14729 {
14730 char buffer[256];
14731
14732 if (sprintf(buffer, "%lld", (long long)123) < 0)
14733 return 1;
14734 if (strcmp(buffer, "123"))
14735 return 1;
14736
14737 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14738 return 1;
14739 if (strcmp(buffer, "-123"))
14740 return 1;
14741
14742 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14743 return 1;
14744 if (strcmp(buffer, "123"))
14745 return 1;
14746
14747 return 0;
14748 }
14749
14750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014751if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014752 ac_cv_have_long_long_format=yes
14753else
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14757 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014758fi
14759
14760
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014761fi
14762
Matthias Kloseb9621712010-04-24 17:59:49 +000014763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14764$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014765fi
14766
Mark Dickinson89d7d412009-12-31 20:50:59 +000014767if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014768then
14769
Matthias Kloseb9621712010-04-24 17:59:49 +000014770$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014771
14772fi
14773
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014774if test $ac_sys_system = Darwin
14775then
14776 LIBS="$LIBS -framework CoreFoundation"
14777fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014778
Matthias Kloseb9621712010-04-24 17:59:49 +000014779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14780$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014781if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014782 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014783else
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014785 ac_cv_have_size_t_format="cross -- assuming yes"
14786
Thomas Wouters477c8d52006-05-27 19:21:47 +000014787else
Matthias Kloseb9621712010-04-24 17:59:49 +000014788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014789/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014790
Thomas Wouters477c8d52006-05-27 19:21:47 +000014791#include <stdio.h>
14792#include <stddef.h>
14793#include <string.h>
14794
Christian Heimes2c181612007-12-17 20:04:13 +000014795#ifdef HAVE_SYS_TYPES_H
14796#include <sys/types.h>
14797#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014798
14799#ifdef HAVE_SSIZE_T
14800typedef ssize_t Py_ssize_t;
14801#elif SIZEOF_VOID_P == SIZEOF_LONG
14802typedef long Py_ssize_t;
14803#else
14804typedef int Py_ssize_t;
14805#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014806
Christian Heimes2c181612007-12-17 20:04:13 +000014807int main()
14808{
14809 char buffer[256];
14810
Thomas Wouters477c8d52006-05-27 19:21:47 +000014811 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14812 return 1;
14813
Thomas Wouters89f507f2006-12-13 04:49:30 +000014814 if (strcmp(buffer, "123"))
14815 return 1;
14816
14817 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14818 return 1;
14819
14820 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014821 return 1;
14822
14823 return 0;
14824}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014825
Thomas Wouters477c8d52006-05-27 19:21:47 +000014826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014827if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014828 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014829else
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14833 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014834fi
14835
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14838$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014839if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014840
Matthias Kloseb9621712010-04-24 17:59:49 +000014841$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014842
14843fi
14844
Matthias Kloseb9621712010-04-24 17:59:49 +000014845ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014846#ifdef HAVE_SYS_TYPES_H
14847#include <sys/types.h>
14848#endif
14849#ifdef HAVE_SYS_SOCKET_H
14850#include <sys/socket.h>
14851#endif
14852
Matthias Kloseb9621712010-04-24 17:59:49 +000014853"
Victor Stinnere0be4232011-10-25 13:06:09 +020014854if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014855
Martin v. Löwis11437992002-04-12 09:54:03 +000014856else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014859
14860fi
14861
Michael W. Hudson54241132001-12-07 15:38:26 +000014862
Matthias Kloseb9621712010-04-24 17:59:49 +000014863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14864$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014865if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014867else
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014869 ac_cv_broken_mbstowcs=no
14870else
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014872/* end confdefs.h. */
14873
Stefan Krah19c21392012-11-22 23:47:32 +010014874#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014875#include<stdlib.h>
14876int main() {
14877 size_t len = -1;
14878 const char *str = "text";
14879 len = mbstowcs(NULL, str, 0);
14880 return (len != 4);
14881}
14882
14883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014884if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014885 ac_cv_broken_mbstowcs=no
14886else
Matthias Kloseb9621712010-04-24 17:59:49 +000014887 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14890 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014891fi
14892
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014893fi
14894
Matthias Kloseb9621712010-04-24 17:59:49 +000014895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14896$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014897if test "$ac_cv_broken_mbstowcs" = yes
14898then
14899
Matthias Kloseb9621712010-04-24 17:59:49 +000014900$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014901
14902fi
14903
Antoine Pitroub52ec782009-01-25 16:34:23 +000014904# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14906$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014907
14908# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014909if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014910 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014911if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014912then
14913
Matthias Kloseb9621712010-04-24 17:59:49 +000014914$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014915
Matthias Kloseb9621712010-04-24 17:59:49 +000014916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14917$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014918fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014919if test "$withval" = no
14920then
14921
14922$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14923
Matthias Kloseb9621712010-04-24 17:59:49 +000014924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14925$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014926fi
14927
Antoine Pitrou042b1282010-08-13 21:15:58 +000014928else
14929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14930$as_echo "no value specified" >&6; }
14931fi
14932
Antoine Pitroub52ec782009-01-25 16:34:23 +000014933
Matthias Kloseb17289e2012-03-15 19:51:34 +010014934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14935$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14936if ${ac_cv_computed_gotos+:} false; then :
14937 $as_echo_n "(cached) " >&6
14938else
14939 if test "$cross_compiling" = yes; then :
14940 if test "${with_computed_gotos+set}" = set; then
14941 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14942 else
14943 ac_cv_computed_gotos=no
14944 fi
14945else
14946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14947/* end confdefs.h. */
14948
14949int main(int argc, char **argv)
14950{
14951 static void *targets[1] = { &&LABEL1 };
14952 goto LABEL2;
14953LABEL1:
14954 return 0;
14955LABEL2:
14956 goto *targets[0];
14957 return 1;
14958}
14959
14960_ACEOF
14961if ac_fn_c_try_run "$LINENO"; then :
14962 ac_cv_computed_gotos=yes
14963else
14964 ac_cv_computed_gotos=no
14965fi
14966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14967 conftest.$ac_objext conftest.beam conftest.$ac_ext
14968fi
14969
14970fi
14971
14972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14973$as_echo "$ac_cv_computed_gotos" >&6; }
14974case "$ac_cv_computed_gotos" in yes*)
14975
14976$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14977
14978esac
14979
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014980case $ac_sys_system in
14981AIX*)
14982
14983$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14984 ;;
14985esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014986
Michael W. Hudson54241132001-12-07 15:38:26 +000014987
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014988
14989
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014990for h in `(cd $srcdir;echo Python/thread_*.h)`
14991do
14992 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14993done
14994
Michael W. Hudson54241132001-12-07 15:38:26 +000014995
Neal Norwitzd24499d2005-12-18 21:36:39 +000014996SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14998$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014999for dir in $SRCDIRS; do
15000 if test ! -d $dir; then
15001 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015002 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015003done
Matthias Kloseb9621712010-04-24 17:59:49 +000015004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15005$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015006
Stefan Krah1919b7e2012-03-21 18:25:23 +010015007# Availability of -O2:
15008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15009$as_echo_n "checking for -O2... " >&6; }
15010saved_cflags="$CFLAGS"
15011CFLAGS="-O2"
15012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15013/* end confdefs.h. */
15014
15015int
15016main ()
15017{
15018
15019
15020 ;
15021 return 0;
15022}
15023_ACEOF
15024if ac_fn_c_try_compile "$LINENO"; then :
15025 have_O2=yes
15026else
15027 have_O2=no
15028fi
15029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15031$as_echo "$have_O2" >&6; }
15032CFLAGS="$saved_cflags"
15033
15034# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15035# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15037$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15038saved_cflags="$CFLAGS"
15039CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15040if test "$have_O2" = no; then
15041 CFLAGS=""
15042fi
15043if test "$cross_compiling" = yes; then :
15044 have_glibc_memmove_bug=undefined
15045else
15046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15047/* end confdefs.h. */
15048
15049#include <stdio.h>
15050#include <stdlib.h>
15051#include <string.h>
15052void foo(void *p, void *q) { memmove(p, q, 19); }
15053int main() {
15054 char a[32] = "123456789000000000";
15055 foo(&a[9], a);
15056 if (strcmp(a, "123456789123456789000000000") != 0)
15057 return 1;
15058 foo(a, &a[9]);
15059 if (strcmp(a, "123456789000000000") != 0)
15060 return 1;
15061 return 0;
15062}
15063
15064_ACEOF
15065if ac_fn_c_try_run "$LINENO"; then :
15066 have_glibc_memmove_bug=no
15067else
15068 have_glibc_memmove_bug=yes
15069fi
15070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15071 conftest.$ac_objext conftest.beam conftest.$ac_ext
15072fi
15073
15074CFLAGS="$saved_cflags"
15075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15076$as_echo "$have_glibc_memmove_bug" >&6; }
15077if test "$have_glibc_memmove_bug" = yes; then
15078
15079$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15080
15081fi
15082
15083if test "$have_gcc_asm_for_x87" = yes; then
15084 # Some versions of gcc miscompile inline asm:
15085 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15086 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15087 case $CC in
15088 *gcc*)
15089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15090$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15091 saved_cflags="$CFLAGS"
15092 CFLAGS="-O2"
15093 if test "$cross_compiling" = yes; then :
15094 have_ipa_pure_const_bug=undefined
15095else
15096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15097/* end confdefs.h. */
15098
15099 __attribute__((noinline)) int
15100 foo(int *p) {
15101 int r;
15102 asm ( "movl \$6, (%1)\n\t"
15103 "xorl %0, %0\n\t"
15104 : "=r" (r) : "r" (p) : "memory"
15105 );
15106 return r;
15107 }
15108 int main() {
15109 int p = 8;
15110 if ((foo(&p) ? : p) != 6)
15111 return 1;
15112 return 0;
15113 }
15114
15115_ACEOF
15116if ac_fn_c_try_run "$LINENO"; then :
15117 have_ipa_pure_const_bug=no
15118else
15119 have_ipa_pure_const_bug=yes
15120fi
15121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15122 conftest.$ac_objext conftest.beam conftest.$ac_ext
15123fi
15124
15125 CFLAGS="$saved_cflags"
15126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15127$as_echo "$have_ipa_pure_const_bug" >&6; }
15128 if test "$have_ipa_pure_const_bug" = yes; then
15129
15130$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15131
15132 fi
15133 ;;
15134 esac
15135fi
15136
Guido van Rossum627b2d71993-12-24 10:39:16 +000015137# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015138ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015139
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015140ac_config_files="$ac_config_files Modules/ld_so_aix"
15141
Martin v. Löwis11437992002-04-12 09:54:03 +000015142cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015143# This file is a shell script that caches the results of configure
15144# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015145# scripts and configure runs, see configure's option --config-cache.
15146# It is not useful on other systems. If it contains results you don't
15147# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015148#
Martin v. Löwis11437992002-04-12 09:54:03 +000015149# config.status only pays attention to the cache file if you give it
15150# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015151#
Skip Montanaro6dead952003-09-25 14:50:04 +000015152# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015153# loading this file, other *unset* `ac_cv_foo' will be assigned the
15154# following values.
15155
15156_ACEOF
15157
Guido van Rossumf78abae1997-01-21 22:02:36 +000015158# The following way of writing the cache mishandles newlines in values,
15159# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015160# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015161# Ultrix sh set writes to stderr and can't be redirected directly,
15162# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163(
15164 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15165 eval ac_val=\$$ac_var
15166 case $ac_val in #(
15167 *${as_nl}*)
15168 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15170$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015171 esac
15172 case $ac_var in #(
15173 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015174 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15175 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176 esac ;;
15177 esac
15178 done
15179
Martin v. Löwis11437992002-04-12 09:54:03 +000015180 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15182 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 # `set' does not quote correctly, so add quotes: double-quote
15184 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015185 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015186 "s/'/'\\\\''/g;
15187 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015189 *)
15190 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193 esac |
15194 sort
15195) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015197 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015198 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015199 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15201 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15203 :end' >>confcache
15204if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15205 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015206 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015207 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15208$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015209 if test ! -f "$cache_file" || test -h "$cache_file"; then
15210 cat confcache >"$cache_file"
15211 else
15212 case $cache_file in #(
15213 */* | ?:*)
15214 mv -f confcache "$cache_file"$$ &&
15215 mv -f "$cache_file"$$ "$cache_file" ;; #(
15216 *)
15217 mv -f confcache "$cache_file" ;;
15218 esac
15219 fi
15220 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015221 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015222 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15223$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015224 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015225fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015226rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015227
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015228test "x$prefix" = xNONE && prefix=$ac_default_prefix
15229# Let make expand exec_prefix.
15230test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015231
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015232DEFS=-DHAVE_CONFIG_H
15233
Skip Montanaro6dead952003-09-25 14:50:04 +000015234ac_libobjs=
15235ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015236U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015237for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15238 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015239 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015240 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015241 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15242 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015243 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15244 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015245done
15246LIBOBJS=$ac_libobjs
15247
15248LTLIBOBJS=$ac_ltlibobjs
15249
15250
Martin v. Löwis11437992002-04-12 09:54:03 +000015251
Matthias Kloseb9621712010-04-24 17:59:49 +000015252
Victor Stinnere0be4232011-10-25 13:06:09 +020015253: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015254ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015255ac_clean_files_save=$ac_clean_files
15256ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015257{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15258$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15259as_write_fail=0
15260cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015261#! $SHELL
15262# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015263# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015264# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015265# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015266
Martin v. Löwis11437992002-04-12 09:54:03 +000015267debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015268ac_cs_recheck=false
15269ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015270
Matthias Kloseb9621712010-04-24 17:59:49 +000015271SHELL=\${CONFIG_SHELL-$SHELL}
15272export SHELL
15273_ASEOF
15274cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15275## -------------------- ##
15276## M4sh Initialization. ##
15277## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015279# Be more Bourne compatible
15280DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015281if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015282 emulate sh
15283 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015284 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015285 # is contrary to our usage. Disable this feature.
15286 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015287 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015288else
Matthias Kloseb9621712010-04-24 17:59:49 +000015289 case `(set -o) 2>/dev/null` in #(
15290 *posix*) :
15291 set -o posix ;; #(
15292 *) :
15293 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015294esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015295fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015296
15297
Matthias Kloseb9621712010-04-24 17:59:49 +000015298as_nl='
15299'
15300export as_nl
15301# Printing a long string crashes Solaris 7 /usr/bin/printf.
15302as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15303as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15304as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15305# Prefer a ksh shell builtin over an external printf program on Solaris,
15306# but without wasting forks for bash or zsh.
15307if test -z "$BASH_VERSION$ZSH_VERSION" \
15308 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15309 as_echo='print -r --'
15310 as_echo_n='print -rn --'
15311elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15312 as_echo='printf %s\n'
15313 as_echo_n='printf %s'
15314else
15315 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15316 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15317 as_echo_n='/usr/ucb/echo -n'
15318 else
15319 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15320 as_echo_n_body='eval
15321 arg=$1;
15322 case $arg in #(
15323 *"$as_nl"*)
15324 expr "X$arg" : "X\\(.*\\)$as_nl";
15325 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15326 esac;
15327 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15328 '
15329 export as_echo_n_body
15330 as_echo_n='sh -c $as_echo_n_body as_echo'
15331 fi
15332 export as_echo_body
15333 as_echo='sh -c $as_echo_body as_echo'
15334fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015335
15336# The user is always right.
15337if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015338 PATH_SEPARATOR=:
15339 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15340 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15341 PATH_SEPARATOR=';'
15342 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015345
15346# IFS
15347# We need space, tab and new line, in precisely that order. Quoting is
15348# there to prevent editors from complaining about space-tab.
15349# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15350# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351IFS=" "" $as_nl"
15352
15353# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015354as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015355case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356 *[\\/]* ) as_myself=$0 ;;
15357 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015358for as_dir in $PATH
15359do
15360 IFS=$as_save_IFS
15361 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15363 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015364IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015366 ;;
15367esac
15368# We did not find ourselves, most probably we were run as `sh COMMAND'
15369# in which case we are not to be found in the path.
15370if test "x$as_myself" = x; then
15371 as_myself=$0
15372fi
15373if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015374 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15375 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015376fi
15377
Matthias Kloseb9621712010-04-24 17:59:49 +000015378# Unset variables that we do not need and which cause bugs (e.g. in
15379# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15380# suppresses any "Segmentation fault" message there. '((' could
15381# trigger a bug in pdksh 5.2.14.
15382for as_var in BASH_ENV ENV MAIL MAILPATH
15383do eval test x\${$as_var+set} = xset \
15384 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015385done
15386PS1='$ '
15387PS2='> '
15388PS4='+ '
15389
15390# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015391LC_ALL=C
15392export LC_ALL
15393LANGUAGE=C
15394export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015395
Matthias Kloseb9621712010-04-24 17:59:49 +000015396# CDPATH.
15397(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15398
15399
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015400# as_fn_error STATUS ERROR [LINENO LOG_FD]
15401# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015402# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15403# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015404# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015405as_fn_error ()
15406{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015407 as_status=$1; test $as_status -eq 0 && as_status=1
15408 if test "$4"; then
15409 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15410 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015411 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015412 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015413 as_fn_exit $as_status
15414} # as_fn_error
15415
15416
15417# as_fn_set_status STATUS
15418# -----------------------
15419# Set $? to STATUS, without forking.
15420as_fn_set_status ()
15421{
15422 return $1
15423} # as_fn_set_status
15424
15425# as_fn_exit STATUS
15426# -----------------
15427# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15428as_fn_exit ()
15429{
15430 set +e
15431 as_fn_set_status $1
15432 exit $1
15433} # as_fn_exit
15434
15435# as_fn_unset VAR
15436# ---------------
15437# Portably unset VAR.
15438as_fn_unset ()
15439{
15440 { eval $1=; unset $1;}
15441}
15442as_unset=as_fn_unset
15443# as_fn_append VAR VALUE
15444# ----------------------
15445# Append the text in VALUE to the end of the definition contained in VAR. Take
15446# advantage of any shell optimizations that allow amortized linear growth over
15447# repeated appends, instead of the typical quadratic growth present in naive
15448# implementations.
15449if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15450 eval 'as_fn_append ()
15451 {
15452 eval $1+=\$2
15453 }'
15454else
15455 as_fn_append ()
15456 {
15457 eval $1=\$$1\$2
15458 }
15459fi # as_fn_append
15460
15461# as_fn_arith ARG...
15462# ------------------
15463# Perform arithmetic evaluation on the ARGs, and store the result in the
15464# global $as_val. Take advantage of shells that can avoid forks. The arguments
15465# must be portable across $(()) and expr.
15466if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15467 eval 'as_fn_arith ()
15468 {
15469 as_val=$(( $* ))
15470 }'
15471else
15472 as_fn_arith ()
15473 {
15474 as_val=`expr "$@" || test $? -eq 1`
15475 }
15476fi # as_fn_arith
15477
15478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015479if expr a : '\(a\)' >/dev/null 2>&1 &&
15480 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15481 as_expr=expr
15482else
15483 as_expr=false
15484fi
15485
15486if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15487 as_basename=basename
15488else
15489 as_basename=false
15490fi
15491
Matthias Kloseb9621712010-04-24 17:59:49 +000015492if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15493 as_dirname=dirname
15494else
15495 as_dirname=false
15496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015498as_me=`$as_basename -- "$0" ||
15499$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15500 X"$0" : 'X\(//\)$' \| \
15501 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015502$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015503 sed '/^.*\/\([^/][^/]*\)\/*$/{
15504 s//\1/
15505 q
15506 }
15507 /^X\/\(\/\/\)$/{
15508 s//\1/
15509 q
15510 }
15511 /^X\/\(\/\).*/{
15512 s//\1/
15513 q
15514 }
15515 s/.*/./; q'`
15516
Matthias Kloseb9621712010-04-24 17:59:49 +000015517# Avoid depending upon Character Ranges.
15518as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15519as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15520as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15521as_cr_digits='0123456789'
15522as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015523
15524ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015525case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015527 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015528 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015529 xy) ECHO_C='\c';;
15530 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15531 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015532 esac;;
15533*)
15534 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015535esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015536
Martin v. Löwis11437992002-04-12 09:54:03 +000015537rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015538if test -d conf$$.dir; then
15539 rm -f conf$$.dir/conf$$.file
15540else
15541 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015544if (echo >conf$$.file) 2>/dev/null; then
15545 if ln -s conf$$.file conf$$ 2>/dev/null; then
15546 as_ln_s='ln -s'
15547 # ... but there are two gotchas:
15548 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15549 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015550 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015551 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015552 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015553 elif ln conf$$.file conf$$ 2>/dev/null; then
15554 as_ln_s=ln
15555 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015556 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015558else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015559 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015561rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15562rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015563
Matthias Kloseb9621712010-04-24 17:59:49 +000015564
15565# as_fn_mkdir_p
15566# -------------
15567# Create "$as_dir" as a directory, including parents if necessary.
15568as_fn_mkdir_p ()
15569{
15570
15571 case $as_dir in #(
15572 -*) as_dir=./$as_dir;;
15573 esac
15574 test -d "$as_dir" || eval $as_mkdir_p || {
15575 as_dirs=
15576 while :; do
15577 case $as_dir in #(
15578 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15579 *) as_qdir=$as_dir;;
15580 esac
15581 as_dirs="'$as_qdir' $as_dirs"
15582 as_dir=`$as_dirname -- "$as_dir" ||
15583$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15584 X"$as_dir" : 'X\(//\)[^/]' \| \
15585 X"$as_dir" : 'X\(//\)$' \| \
15586 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15587$as_echo X"$as_dir" |
15588 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15589 s//\1/
15590 q
15591 }
15592 /^X\(\/\/\)[^/].*/{
15593 s//\1/
15594 q
15595 }
15596 /^X\(\/\/\)$/{
15597 s//\1/
15598 q
15599 }
15600 /^X\(\/\).*/{
15601 s//\1/
15602 q
15603 }
15604 s/.*/./; q'`
15605 test -d "$as_dir" && break
15606 done
15607 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015608 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015609
15610
15611} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015612if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015614else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015615 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015616 as_mkdir_p=false
15617fi
15618
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015619
15620# as_fn_executable_p FILE
15621# -----------------------
15622# Test if FILE is an executable regular file.
15623as_fn_executable_p ()
15624{
15625 test -f "$1" && test -x "$1"
15626} # as_fn_executable_p
15627as_test_x='test -x'
15628as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
15630# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015631as_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 +000015632
15633# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015634as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015635
15636
Martin v. Löwis11437992002-04-12 09:54:03 +000015637exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015638## ----------------------------------- ##
15639## Main body of $CONFIG_STATUS script. ##
15640## ----------------------------------- ##
15641_ASEOF
15642test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015643
Matthias Kloseb9621712010-04-24 17:59:49 +000015644cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15645# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015646# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647# values after options handling.
15648ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015649This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015650generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015651
15652 CONFIG_FILES = $CONFIG_FILES
15653 CONFIG_HEADERS = $CONFIG_HEADERS
15654 CONFIG_LINKS = $CONFIG_LINKS
15655 CONFIG_COMMANDS = $CONFIG_COMMANDS
15656 $ $0 $@
15657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658on `(hostname || uname -n) 2>/dev/null | sed 1q`
15659"
15660
Martin v. Löwis11437992002-04-12 09:54:03 +000015661_ACEOF
15662
Matthias Kloseb9621712010-04-24 17:59:49 +000015663case $ac_config_files in *"
15664"*) set x $ac_config_files; shift; ac_config_files=$*;;
15665esac
15666
15667case $ac_config_headers in *"
15668"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15669esac
15670
15671
15672cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015673# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015674config_files="$ac_config_files"
15675config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015677_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015678
Matthias Kloseb9621712010-04-24 17:59:49 +000015679cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015680ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015681\`$as_me' instantiates files and other configuration actions
15682from templates according to the current configuration. Unless the files
15683and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015684
Matthias Kloseb9621712010-04-24 17:59:49 +000015685Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015686
15687 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015688 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 --config print configuration, then exit
15690 -q, --quiet, --silent
15691 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015692 -d, --debug don't remove temporary files
15693 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015694 --file=FILE[:TEMPLATE]
15695 instantiate the configuration file FILE
15696 --header=FILE[:TEMPLATE]
15697 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015698
15699Configuration files:
15700$config_files
15701
15702Configuration headers:
15703$config_headers
15704
Matthias Kloseb9621712010-04-24 17:59:49 +000015705Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015708cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15709ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015710ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015711python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015712configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015713 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015714
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015715Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015716This config.status script is free software; the Free Software Foundation
15717gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015718
15719ac_pwd='$ac_pwd'
15720srcdir='$srcdir'
15721INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015722MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015723test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015724_ACEOF
15725
Matthias Kloseb9621712010-04-24 17:59:49 +000015726cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15727# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015728ac_need_defaults=:
15729while test $# != 0
15730do
15731 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015732 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015733 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15734 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015735 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015736 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015737 --*=)
15738 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15739 ac_optarg=
15740 ac_shift=:
15741 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015742 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015743 ac_option=$1
15744 ac_optarg=$2
15745 ac_shift=shift
15746 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 esac
15748
Skip Montanaro6dead952003-09-25 14:50:04 +000015749 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015751 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15752 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015753 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 $as_echo "$ac_cs_version"; exit ;;
15755 --config | --confi | --conf | --con | --co | --c )
15756 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015757 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 debug=: ;;
15759 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015760 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 case $ac_optarg in
15762 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015763 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015764 esac
15765 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 ac_need_defaults=false;;
15767 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015768 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 case $ac_optarg in
15770 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15771 esac
15772 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015773 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774 --he | --h)
15775 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015776 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015777Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015778 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015779 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015780 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15781 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15782 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015783
15784 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015785 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015786Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015787
Matthias Kloseb9621712010-04-24 17:59:49 +000015788 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015789 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015790
15791 esac
15792 shift
15793done
15794
Skip Montanaro6dead952003-09-25 14:50:04 +000015795ac_configure_extra_args=
15796
15797if $ac_cs_silent; then
15798 exec 6>/dev/null
15799 ac_configure_extra_args="$ac_configure_extra_args --silent"
15800fi
15801
15802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015803cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015804if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015805 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015806 shift
15807 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15808 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015810 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015811fi
15812
Martin v. Löwis11437992002-04-12 09:54:03 +000015813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015814cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015815exec 5>>config.log
15816{
15817 echo
15818 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15819## Running $as_me. ##
15820_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015821 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015822} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015825cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015826_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015827
Matthias Kloseb9621712010-04-24 17:59:49 +000015828cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829
15830# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015831for ac_config_target in $ac_config_targets
15832do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833 case $ac_config_target in
15834 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15835 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15836 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015837 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15838 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15840 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015841 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010015842 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015843 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844
Victor Stinnere0be4232011-10-25 13:06:09 +020015845 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 esac
15847done
15848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015849
Martin v. Löwis11437992002-04-12 09:54:03 +000015850# If the user did not use the arguments to specify the items to instantiate,
15851# then the envvar interface is used. Set only those that are not.
15852# We use the long form for the default assignment because of an extremely
15853# bizarre bug on SunOS 4.1.3.
15854if $ac_need_defaults; then
15855 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15856 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15857fi
15858
Skip Montanaro6dead952003-09-25 14:50:04 +000015859# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015861# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862# Hook for its removal unless debugging.
15863# Note that there is a small window in which the directory will not be cleaned:
15864# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015865$debug ||
15866{
Victor Stinnere0be4232011-10-25 13:06:09 +020015867 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015869 : "${ac_tmp:=$tmp}"
15870 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015872 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015873}
Martin v. Löwis11437992002-04-12 09:54:03 +000015874# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015875
Martin v. Löwis11437992002-04-12 09:54:03 +000015876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015878 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015879} ||
15880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015881 tmp=./conf$$-$RANDOM
15882 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015883} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015884ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015885
Matthias Kloseb9621712010-04-24 17:59:49 +000015886# Set up the scripts for CONFIG_FILES section.
15887# No need to generate them if there are no CONFIG_FILES.
15888# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015889if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015890
Matthias Kloseb9621712010-04-24 17:59:49 +000015891
15892ac_cr=`echo X | tr X '\015'`
15893# On cygwin, bash can eat \r inside `` if the user requested igncr.
15894# But we know of no other shell where ac_cr would be empty at this
15895# point, so we can use a bashism as a fallback.
15896if test "x$ac_cr" = x; then
15897 eval ac_cr=\$\'\\r\'
15898fi
15899ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15900if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015901 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015902else
15903 ac_cs_awk_cr=$ac_cr
15904fi
15905
Victor Stinnere0be4232011-10-25 13:06:09 +020015906echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015907_ACEOF
15908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015909
Matthias Kloseb9621712010-04-24 17:59:49 +000015910{
15911 echo "cat >conf$$subs.awk <<_ACEOF" &&
15912 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15913 echo "_ACEOF"
15914} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015915 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15916ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015917ac_delim='%!_!# '
15918for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015919 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015920 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015921
Matthias Kloseb9621712010-04-24 17:59:49 +000015922 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15923 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015924 break
15925 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015926 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927 else
15928 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015929 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015930done
Matthias Kloseb9621712010-04-24 17:59:49 +000015931rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932
Matthias Kloseb9621712010-04-24 17:59:49 +000015933cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015934cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015936sed -n '
15937h
15938s/^/S["/; s/!.*/"]=/
15939p
15940g
15941s/^[^!]*!//
15942:repl
15943t repl
15944s/'"$ac_delim"'$//
15945t delim
15946:nl
15947h
15948s/\(.\{148\}\)..*/\1/
15949t more1
15950s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15951p
15952n
15953b repl
15954:more1
15955s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15956p
15957g
15958s/.\{148\}//
15959t nl
15960:delim
15961h
15962s/\(.\{148\}\)..*/\1/
15963t more2
15964s/["\\]/\\&/g; s/^/"/; s/$/"/
15965p
15966b
15967:more2
15968s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15969p
15970g
15971s/.\{148\}//
15972t delim
15973' <conf$$subs.awk | sed '
15974/^[^""]/{
15975 N
15976 s/\n//
15977}
15978' >>$CONFIG_STATUS || ac_write_fail=1
15979rm -f conf$$subs.awk
15980cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15981_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015982cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015983 for (key in S) S_is_set[key] = 1
15984 FS = ""
15985
15986}
15987{
15988 line = $ 0
15989 nfields = split(line, field, "@")
15990 substed = 0
15991 len = length(field[1])
15992 for (i = 2; i < nfields; i++) {
15993 key = field[i]
15994 keylen = length(key)
15995 if (S_is_set[key]) {
15996 value = S[key]
15997 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15998 len += length(value) + length(field[++i])
15999 substed = 1
16000 } else
16001 len += 1 + keylen
16002 }
16003
16004 print line
16005}
16006
16007_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016009cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16010if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16011 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16012else
16013 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016014fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016015 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016016_ACEOF
16017
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016018# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16019# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020# trailing colons and then remove the whole line if VPATH becomes empty
16021# (actually we leave an empty line to preserve line numbers).
16022if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016023 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16024h
16025s///
16026s/^/:/
16027s/[ ]*$/:/
16028s/:\$(srcdir):/:/g
16029s/:\${srcdir}:/:/g
16030s/:@srcdir@:/:/g
16031s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016032s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016033x
16034s/\(=[ ]*\).*/\1/
16035G
16036s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016037s/^[^=]*=[ ]*$//
16038}'
16039fi
16040
Matthias Kloseb9621712010-04-24 17:59:49 +000016041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016042fi # test -n "$CONFIG_FILES"
16043
Matthias Kloseb9621712010-04-24 17:59:49 +000016044# Set up the scripts for CONFIG_HEADERS section.
16045# No need to generate them if there are no CONFIG_HEADERS.
16046# This happens for instance with `./config.status Makefile'.
16047if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016048cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016049BEGIN {
16050_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016051
Matthias Kloseb9621712010-04-24 17:59:49 +000016052# Transform confdefs.h into an awk script `defines.awk', embedded as
16053# here-document in config.status, that substitutes the proper values into
16054# config.h.in to produce config.h.
16055
16056# Create a delimiter string that does not exist in confdefs.h, to ease
16057# handling of long lines.
16058ac_delim='%!_!# '
16059for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016060 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16061 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016062 break
16063 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016064 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016065 else
16066 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16067 fi
16068done
16069
16070# For the awk script, D is an array of macro values keyed by name,
16071# likewise P contains macro parameters if any. Preserve backslash
16072# newline sequences.
16073
16074ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16075sed -n '
16076s/.\{148\}/&'"$ac_delim"'/g
16077t rset
16078:rset
16079s/^[ ]*#[ ]*define[ ][ ]*/ /
16080t def
16081d
16082:def
16083s/\\$//
16084t bsnl
16085s/["\\]/\\&/g
16086s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16087D["\1"]=" \3"/p
16088s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16089d
16090:bsnl
16091s/["\\]/\\&/g
16092s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16093D["\1"]=" \3\\\\\\n"\\/p
16094t cont
16095s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16096t cont
16097d
16098:cont
16099n
16100s/.\{148\}/&'"$ac_delim"'/g
16101t clear
16102:clear
16103s/\\$//
16104t bsnlc
16105s/["\\]/\\&/g; s/^/"/; s/$/"/p
16106d
16107:bsnlc
16108s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16109b cont
16110' <confdefs.h | sed '
16111s/'"$ac_delim"'/"\\\
16112"/g' >>$CONFIG_STATUS || ac_write_fail=1
16113
16114cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16115 for (key in D) D_is_set[key] = 1
16116 FS = ""
16117}
16118/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16119 line = \$ 0
16120 split(line, arg, " ")
16121 if (arg[1] == "#") {
16122 defundef = arg[2]
16123 mac1 = arg[3]
16124 } else {
16125 defundef = substr(arg[1], 2)
16126 mac1 = arg[2]
16127 }
16128 split(mac1, mac2, "(") #)
16129 macro = mac2[1]
16130 prefix = substr(line, 1, index(line, defundef) - 1)
16131 if (D_is_set[macro]) {
16132 # Preserve the white space surrounding the "#".
16133 print prefix "define", macro P[macro] D[macro]
16134 next
16135 } else {
16136 # Replace #undef with comments. This is necessary, for example,
16137 # in the case of _POSIX_SOURCE, which is predefined and required
16138 # on some systems where configure will not decide to define it.
16139 if (defundef == "undef") {
16140 print "/*", prefix defundef, macro, "*/"
16141 next
16142 }
16143 }
16144}
16145{ print }
16146_ACAWK
16147_ACEOF
16148cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016149 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016150fi # test -n "$CONFIG_HEADERS"
16151
16152
16153eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16154shift
16155for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016156do
16157 case $ac_tag in
16158 :[FHLC]) ac_mode=$ac_tag; continue;;
16159 esac
16160 case $ac_mode$ac_tag in
16161 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016162 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016163 :[FH]-) ac_tag=-:-;;
16164 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16165 esac
16166 ac_save_IFS=$IFS
16167 IFS=:
16168 set x $ac_tag
16169 IFS=$ac_save_IFS
16170 shift
16171 ac_file=$1
16172 shift
16173
16174 case $ac_mode in
16175 :L) ac_source=$1;;
16176 :[FH])
16177 ac_file_inputs=
16178 for ac_f
16179 do
16180 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016181 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016182 *) # Look for the file first in the build tree, then in the source tree
16183 # (if the path is not absolute). The absolute path cannot be DOS-style,
16184 # because $ac_f cannot contain `:'.
16185 test -f "$ac_f" ||
16186 case $ac_f in
16187 [\\/$]*) false;;
16188 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16189 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016190 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016191 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016192 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16193 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016194 done
16195
16196 # Let's still pretend it is `configure' which instantiates (i.e., don't
16197 # use $as_me), people would be surprised to read:
16198 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016199 configure_input='Generated from '`
16200 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16201 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202 if test x"$ac_file" != x-; then
16203 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016204 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16205$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016206 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016207 # Neutralize special characters interpreted by sed in replacement strings.
16208 case $configure_input in #(
16209 *\&* | *\|* | *\\* )
16210 ac_sed_conf_input=`$as_echo "$configure_input" |
16211 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16212 *) ac_sed_conf_input=$configure_input;;
16213 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016214
16215 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016216 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16217 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218 esac
16219 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016220 esac
16221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016222 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016223$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016224 X"$ac_file" : 'X\(//\)[^/]' \| \
16225 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016226 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016227$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16229 s//\1/
16230 q
16231 }
16232 /^X\(\/\/\)[^/].*/{
16233 s//\1/
16234 q
16235 }
16236 /^X\(\/\/\)$/{
16237 s//\1/
16238 q
16239 }
16240 /^X\(\/\).*/{
16241 s//\1/
16242 q
16243 }
16244 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016245 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016246 ac_builddir=.
16247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248case "$ac_dir" in
16249.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16250*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016251 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016253 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254 case $ac_top_builddir_sub in
16255 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16256 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16257 esac ;;
16258esac
16259ac_abs_top_builddir=$ac_pwd
16260ac_abs_builddir=$ac_pwd$ac_dir_suffix
16261# for backward compatibility:
16262ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016263
16264case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016265 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016266 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016267 ac_top_srcdir=$ac_top_builddir_sub
16268 ac_abs_top_srcdir=$ac_pwd ;;
16269 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016270 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271 ac_top_srcdir=$srcdir
16272 ac_abs_top_srcdir=$srcdir ;;
16273 *) # Relative name.
16274 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16275 ac_top_srcdir=$ac_top_build_prefix$srcdir
16276 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016277esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016279
Martin v. Löwis11437992002-04-12 09:54:03 +000016280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016281 case $ac_mode in
16282 :F)
16283 #
16284 # CONFIG_FILE
16285 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016286
16287 case $INSTALL in
16288 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016289 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016290 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016291 ac_MKDIR_P=$MKDIR_P
16292 case $MKDIR_P in
16293 [\\/$]* | ?:[\\/]* ) ;;
16294 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16295 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016296_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016297
Matthias Kloseb9621712010-04-24 17:59:49 +000016298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016299# If the template does not know about datarootdir, expand it.
16300# FIXME: This hack should be removed a few years after 2.60.
16301ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016302ac_sed_dataroot='
16303/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304 p
16305 q
16306}
16307/@datadir@/p
16308/@docdir@/p
16309/@infodir@/p
16310/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016311/@mandir@/p'
16312case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313*datarootdir*) ac_datarootdir_seen=yes;;
16314*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016315 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16316$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016318cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016319 ac_datarootdir_hack='
16320 s&@datadir@&$datadir&g
16321 s&@docdir@&$docdir&g
16322 s&@infodir@&$infodir&g
16323 s&@localedir@&$localedir&g
16324 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016325 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016326esac
16327_ACEOF
16328
16329# Neutralize VPATH when `$srcdir' = `.'.
16330# Shell code in configure.ac might set extrasub.
16331# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016332cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16333ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016334$extrasub
16335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016336cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016337:t
16338/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016339s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016341s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342s&@srcdir@&$ac_srcdir&;t t
16343s&@abs_srcdir@&$ac_abs_srcdir&;t t
16344s&@top_srcdir@&$ac_top_srcdir&;t t
16345s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16346s&@builddir@&$ac_builddir&;t t
16347s&@abs_builddir@&$ac_abs_builddir&;t t
16348s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16349s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016350s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016351$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016352"
Victor Stinnere0be4232011-10-25 13:06:09 +020016353eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16354 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016356test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016357 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16358 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16359 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016360 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016361which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016362$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016363which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016364
Victor Stinnere0be4232011-10-25 13:06:09 +020016365 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016367 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16368 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016369 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016370 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016371 ;;
16372 :H)
16373 #
16374 # CONFIG_HEADER
16375 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016376 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016377 {
16378 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016379 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16380 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016381 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016382 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016383 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16384$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016386 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016387 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016388 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 fi
16390 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016391 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016392 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016393 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016394 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397
16398 esac
16399
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016400
16401 case $ac_file$ac_mode in
16402 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16403
16404 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016405done # for ac_tag
16406
Guido van Rossum627b2d71993-12-24 10:39:16 +000016407
Matthias Kloseb9621712010-04-24 17:59:49 +000016408as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016409_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016410ac_clean_files=$ac_clean_files_save
16411
Matthias Kloseb9621712010-04-24 17:59:49 +000016412test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016413 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016414
Martin v. Löwis11437992002-04-12 09:54:03 +000016415
16416# configure is writing to config.log, and then calls config.status.
16417# config.status does its own redirection, appending to config.log.
16418# Unfortunately, on DOS this fails, as config.log is still kept open
16419# by configure, so config.status won't be able to write to it; its
16420# output is simply discarded. So we exec the FD to /dev/null,
16421# effectively closing config.log, so it can be properly (re)opened and
16422# appended to by config.status. When coming back to configure, we
16423# need to make the FD available again.
16424if test "$no_create" != yes; then
16425 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016426 ac_config_status_args=
16427 test "$silent" = yes &&
16428 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016429 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016430 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 exec 5>>config.log
16432 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16433 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016434 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016435fi
16436if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16437 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16438$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016439fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016440
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016441
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016442echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016443if test ! -f Modules/Setup
16444then
16445 cp $srcdir/Modules/Setup.dist Modules/Setup
16446fi
16447
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016448echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016449if test ! -f Modules/Setup.local
16450then
16451 echo "# Edit this file for local setup changes" >Modules/Setup.local
16452fi
16453
16454echo "creating Makefile"
16455$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16456 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016457 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016458mv config.c Modules