blob: 21bab5ba5772bf93ecc4028cb4d2afc2339e76f1 [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
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Benjamin Peterson0f3cde12014-12-15 00:00:23 -0500653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000655PKG_CONFIG
656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000670ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100672MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000673INSTALL_DATA
674INSTALL_SCRIPT
675INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200676PYTHON
677ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200678ac_ct_READELF
679READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000680ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200681ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000682AR
683RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000684USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000685GNULD
686LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000688RUNSHARED
689INSTSONAME
690LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000691PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000692BLDLIBRARY
693DLLLIBRARY
694LDLIBRARY
695LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100696MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000697BUILDEXEEXT
698EGREP
699GREP
700CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200701NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200702ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000703MAINCC
704CXX
705OBJEXT
706EXEEXT
707ac_ct_CC
708CPPFLAGS
709LDFLAGS
710CFLAGS
711CC
712EXPORT_MACOSX_DEPLOYMENT_TARGET
713CONFIGURE_MACOSX_DEPLOYMENT_TARGET
714SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200715_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000716MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000717FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000718FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800719FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000720FRAMEWORKALTINSTALLLAST
721FRAMEWORKALTINSTALLFIRST
722FRAMEWORKINSTALLLAST
723FRAMEWORKINSTALLFIRST
724PYTHONFRAMEWORKINSTALLDIR
725PYTHONFRAMEWORKPREFIX
726PYTHONFRAMEWORKDIR
727PYTHONFRAMEWORKIDENTIFIER
728PYTHONFRAMEWORK
729LIPO_32BIT_FLAGS
730ARCH_RUN_32BIT
731UNIVERSALSDK
732CONFIG_ARGS
733SOVERSION
734VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200735PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100736host_os
737host_vendor
738host_cpu
739host
740build_os
741build_vendor
742build_cpu
743build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500744HAS_HG
745HGBRANCH
746HGTAG
747HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400748BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000749target_alias
750host_alias
751build_alias
752LIBS
753ECHO_T
754ECHO_N
755ECHO_C
756DEFS
757mandir
758localedir
759libdir
760psdir
761pdfdir
762dvidir
763htmldir
764infodir
765docdir
766oldincludedir
767includedir
768localstatedir
769sharedstatedir
770sysconfdir
771datadir
772datarootdir
773libexecdir
774sbindir
775bindir
776program_transform_name
777prefix
778exec_prefix
779PACKAGE_URL
780PACKAGE_BUGREPORT
781PACKAGE_STRING
782PACKAGE_VERSION
783PACKAGE_TARNAME
784PACKAGE_NAME
785PATH_SEPARATOR
786SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000787ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000788ac_user_opts='
789enable_option_checking
790enable_universalsdk
791with_universal_archs
792with_framework_name
793enable_framework
794with_gcc
795with_cxx_main
796with_suffix
797enable_shared
798enable_profiling
799with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100800with_hash_algorithm
Matthias Kloseb9621712010-04-24 17:59:49 +0000801with_libs
802with_system_expat
803with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100804with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000805enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700806with_tcltk_includes
807with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_dbmliborder
809with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_threads
811with_thread
812enable_ipv6
813with_doc_strings
814with_tsc
815with_pymalloc
816with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000817with_fpectl
818with_libm
819with_libc
820enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800822with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000823'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000824 ac_precious_vars='build_alias
825host_alias
826target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100827MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828CC
829CFLAGS
830LDFLAGS
831LIBS
832CPPFLAGS
Benjamin Peterson0f3cde12014-12-15 00:00:23 -0500833CPP
834PKG_CONFIG
835PKG_CONFIG_PATH
836PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837
Guido van Rossum627b2d71993-12-24 10:39:16 +0000838
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000840ac_init_help=
841ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000842ac_unrecognized_opts=
843ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844# The variables have the same names as the options, with
845# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000846cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849no_recursion=
850prefix=NONE
851program_prefix=NONE
852program_suffix=NONE
853program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858x_includes=NONE
859x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000860
861# Installation directory options.
862# These are left unexpanded so users can "make install exec_prefix=/foo"
863# and all the variables that are supposed to be based on exec_prefix
864# by default will actually change.
865# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867bindir='${exec_prefix}/bin'
868sbindir='${exec_prefix}/sbin'
869libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870datarootdir='${prefix}/share'
871datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000872sysconfdir='${prefix}/etc'
873sharedstatedir='${prefix}/com'
874localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875includedir='${prefix}/include'
876oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
878infodir='${datarootdir}/info'
879htmldir='${docdir}'
880dvidir='${docdir}'
881pdfdir='${docdir}'
882psdir='${docdir}'
883libdir='${exec_prefix}/lib'
884localedir='${datarootdir}/locale'
885mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000890do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891 # If the previous option needs an argument, assign it.
892 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894 ac_prev=
895 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000896 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200899 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
900 *=) ac_optarg= ;;
901 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904 # Accept the important Cygnus configure options, so we can diagnose typos.
905
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 case $ac_dashdash$ac_option in
907 --)
908 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910 -bindir | --bindir | --bindi | --bind | --bin | --bi)
911 ac_prev=bindir ;;
912 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920 -cache-file | --cache-file | --cache-fil | --cache-fi \
921 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
922 ac_prev=cache_file ;;
923 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
924 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 cache_file=$ac_optarg ;;
926
927 --config-cache | -C)
928 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
936 | --dataroo | --dataro | --datar)
937 ac_prev=datarootdir ;;
938 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
939 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
940 datarootdir=$ac_optarg ;;
941
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000943 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000945 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200946 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000947 ac_useropt_orig=$ac_useropt
948 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
949 case $ac_user_opts in
950 *"
951"enable_$ac_useropt"
952"*) ;;
953 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
954 ac_unrecognized_sep=', ';;
955 esac
956 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957
958 -docdir | --docdir | --docdi | --doc | --do)
959 ac_prev=docdir ;;
960 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
961 docdir=$ac_optarg ;;
962
963 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
964 ac_prev=dvidir ;;
965 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
966 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967
968 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000970 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200972 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 ac_useropt_orig=$ac_useropt
974 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
975 case $ac_user_opts in
976 *"
977"enable_$ac_useropt"
978"*) ;;
979 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
980 ac_unrecognized_sep=', ';;
981 esac
982 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
985 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
986 | --exec | --exe | --ex)
987 ac_prev=exec_prefix ;;
988 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
989 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
990 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Obsolete; use --with-gas.
995 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 -help | --help | --hel | --he | -h)
998 ac_init_help=long ;;
999 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1000 ac_init_help=recursive ;;
1001 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1002 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
1004 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1010 ac_prev=htmldir ;;
1011 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1012 | --ht=*)
1013 htmldir=$ac_optarg ;;
1014
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015 -includedir | --includedir | --includedi | --included | --include \
1016 | --includ | --inclu | --incl | --inc)
1017 ac_prev=includedir ;;
1018 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1019 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
1022 -infodir | --infodir | --infodi | --infod | --info | --inf)
1023 ac_prev=infodir ;;
1024 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -libdir | --libdir | --libdi | --libd)
1028 ac_prev=libdir ;;
1029 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031
1032 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1033 | --libexe | --libex | --libe)
1034 ac_prev=libexecdir ;;
1035 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1036 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001039 -localedir | --localedir | --localedi | --localed | --locale)
1040 ac_prev=localedir ;;
1041 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1042 localedir=$ac_optarg ;;
1043
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001045 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046 ac_prev=localstatedir ;;
1047 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001048 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1052 ac_prev=mandir ;;
1053 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001057 # Obsolete; use --without-fp.
1058 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062 no_create=yes ;;
1063
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001064 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1065 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1066 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1069 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1070 | --oldin | --oldi | --old | --ol | --o)
1071 ac_prev=oldincludedir ;;
1072 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1073 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1074 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1078 ac_prev=prefix ;;
1079 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1083 | --program-pre | --program-pr | --program-p)
1084 ac_prev=program_prefix ;;
1085 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1086 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
1089 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1090 | --program-suf | --program-su | --program-s)
1091 ac_prev=program_suffix ;;
1092 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1093 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -program-transform-name | --program-transform-name \
1097 | --program-transform-nam | --program-transform-na \
1098 | --program-transform-n | --program-transform- \
1099 | --program-transform | --program-transfor \
1100 | --program-transfo | --program-transf \
1101 | --program-trans | --program-tran \
1102 | --progr-tra | --program-tr | --program-t)
1103 ac_prev=program_transform_name ;;
1104 -program-transform-name=* | --program-transform-name=* \
1105 | --program-transform-nam=* | --program-transform-na=* \
1106 | --program-transform-n=* | --program-transform-=* \
1107 | --program-transform=* | --program-transfor=* \
1108 | --program-transfo=* | --program-transf=* \
1109 | --program-trans=* | --program-tran=* \
1110 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001113 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1114 ac_prev=pdfdir ;;
1115 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1116 pdfdir=$ac_optarg ;;
1117
1118 -psdir | --psdir | --psdi | --psd | --ps)
1119 ac_prev=psdir ;;
1120 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1121 psdir=$ac_optarg ;;
1122
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1124 | -silent | --silent | --silen | --sile | --sil)
1125 silent=yes ;;
1126
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001127 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1128 ac_prev=sbindir ;;
1129 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1130 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001132
1133 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1134 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1135 | --sharedst | --shareds | --shared | --share | --shar \
1136 | --sha | --sh)
1137 ac_prev=sharedstatedir ;;
1138 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1139 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1140 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1141 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001143
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144 -site | --site | --sit)
1145 ac_prev=site ;;
1146 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1150 ac_prev=srcdir ;;
1151 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1155 | --syscon | --sysco | --sysc | --sys | --sy)
1156 ac_prev=sysconfdir ;;
1157 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1158 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
1166 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1167 verbose=yes ;;
1168
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 -version | --version | --versio | --versi | --vers | -V)
1170 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171
1172 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001176 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 ac_useropt_orig=$ac_useropt
1178 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1179 case $ac_user_opts in
1180 *"
1181"with_$ac_useropt"
1182"*) ;;
1183 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1184 ac_unrecognized_sep=', ';;
1185 esac
1186 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
1188 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001190 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001192 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 ac_useropt_orig=$ac_useropt
1194 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1195 case $ac_user_opts in
1196 *"
1197"with_$ac_useropt"
1198"*) ;;
1199 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1200 ac_unrecognized_sep=', ';;
1201 esac
1202 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204 --x)
1205 # Obsolete; use --with-x.
1206 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207
1208 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1209 | --x-incl | --x-inc | --x-in | --x-i)
1210 ac_prev=x_includes ;;
1211 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1212 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001213 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214
1215 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1216 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1217 ac_prev=x_libraries ;;
1218 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1219 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001222 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1223Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224 ;;
1225
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 *=*)
1227 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1228 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001229 case $ac_envvar in #(
1230 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001231 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001232 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001233 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 export $ac_envvar ;;
1235
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001236 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001238 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001240 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001241 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242 ;;
1243
1244 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001245done
1246
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001249 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250fi
1251
Matthias Kloseb9621712010-04-24 17:59:49 +00001252if test -n "$ac_unrecognized_opts"; then
1253 case $enable_option_checking in
1254 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1257 esac
1258fi
1259
1260# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1262 datadir sysconfdir sharedstatedir localstatedir includedir \
1263 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1264 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001265do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 # Remove trailing slashes.
1268 case $ac_val in
1269 */ )
1270 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1271 eval $ac_var=\$ac_val;;
1272 esac
1273 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275 [\\/$]* | ?:[\\/]* ) continue;;
1276 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001279done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280
Martin v. Löwis11437992002-04-12 09:54:03 +00001281# There might be people who depend on the old broken behavior: `$host'
1282# used to hold the argument of --host etc.
1283# FIXME: To remove some day.
1284build=$build_alias
1285host=$host_alias
1286target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287
Martin v. Löwis11437992002-04-12 09:54:03 +00001288# FIXME: To remove some day.
1289if test "x$host_alias" != x; then
1290 if test "x$build_alias" = x; then
1291 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001292 elif test "x$build_alias" != "x$host_alias"; then
1293 cross_compiling=yes
1294 fi
1295fi
1296
1297ac_tool_prefix=
1298test -n "$host_alias" && ac_tool_prefix=$host_alias-
1299
1300test "$silent" = yes && exec 6>/dev/null
1301
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303ac_pwd=`pwd` && test -n "$ac_pwd" &&
1304ac_ls_di=`ls -di .` &&
1305ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001306 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001308 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309
1310
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311# Find the source files, if location was not specified.
1312if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001313 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001314 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001315 ac_confdir=`$as_dirname -- "$as_myself" ||
1316$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1317 X"$as_myself" : 'X\(//\)[^/]' \| \
1318 X"$as_myself" : 'X\(//\)$' \| \
1319 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1320$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001321 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1322 s//\1/
1323 q
1324 }
1325 /^X\(\/\/\)[^/].*/{
1326 s//\1/
1327 q
1328 }
1329 /^X\(\/\/\)$/{
1330 s//\1/
1331 q
1332 }
1333 /^X\(\/\).*/{
1334 s//\1/
1335 q
1336 }
1337 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001338 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340 srcdir=..
1341 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001342else
1343 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345if test ! -r "$srcdir/$ac_unique_file"; then
1346 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001347 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1350ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001351 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352 pwd)`
1353# When building in place, set srcdir=.
1354if test "$ac_abs_confdir" = "$ac_pwd"; then
1355 srcdir=.
1356fi
1357# Remove unnecessary trailing slashes from srcdir.
1358# Double slashes in file names in object file debugging info
1359# mess up M-x gdb in Emacs.
1360case $srcdir in
1361*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1362esac
1363for ac_var in $ac_precious_vars; do
1364 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1365 eval ac_env_${ac_var}_value=\$${ac_var}
1366 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1367 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1368done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001369
Martin v. Löwis11437992002-04-12 09:54:03 +00001370#
1371# Report the --help message.
1372#
1373if test "$ac_init_help" = "long"; then
1374 # Omit some internal or obsolete options to make the list less imposing.
1375 # This message is too long to be a string in the A/UX 3.1 sh.
1376 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001377\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001378
1379Usage: $0 [OPTION]... [VAR=VALUE]...
1380
1381To assign environment variables (e.g., CC, CFLAGS...), specify them as
1382VAR=VALUE. See below for descriptions of some of the useful variables.
1383
1384Defaults for the options are specified in brackets.
1385
1386Configuration:
1387 -h, --help display this help and exit
1388 --help=short display options specific to this package
1389 --help=recursive display the short help of all the included packages
1390 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001391 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 --cache-file=FILE cache test results in FILE [disabled]
1393 -C, --config-cache alias for \`--cache-file=config.cache'
1394 -n, --no-create do not create output files
1395 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1396
Martin v. Löwis11437992002-04-12 09:54:03 +00001397Installation directories:
1398 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001399 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001401 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001402
1403By default, \`make install' will install all the files in
1404\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1405an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1406for instance \`--prefix=\$HOME'.
1407
1408For better control, use the options below.
1409
1410Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001411 --bindir=DIR user executables [EPREFIX/bin]
1412 --sbindir=DIR system admin executables [EPREFIX/sbin]
1413 --libexecdir=DIR program executables [EPREFIX/libexec]
1414 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1415 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1416 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1417 --libdir=DIR object code libraries [EPREFIX/lib]
1418 --includedir=DIR C header files [PREFIX/include]
1419 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1420 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1421 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1422 --infodir=DIR info documentation [DATAROOTDIR/info]
1423 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1424 --mandir=DIR man documentation [DATAROOTDIR/man]
1425 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1426 --htmldir=DIR html documentation [DOCDIR]
1427 --dvidir=DIR dvi documentation [DOCDIR]
1428 --pdfdir=DIR pdf documentation [DOCDIR]
1429 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001430_ACEOF
1431
1432 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001433
1434System types:
1435 --build=BUILD configure for building on BUILD [guessed]
1436 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001437_ACEOF
1438fi
1439
1440if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001441 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001442 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001443 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 cat <<\_ACEOF
1445
1446Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001447 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001448 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1449 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001450 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001451 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --enable-framework[=INSTALLDIR]
1453 Build (MacOSX|Darwin) framework
1454 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001455 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001456 --enable-loadable-sqlite-extensions
1457 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001458 --enable-ipv6 Enable ipv6 (with ipv4) support
1459 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001460 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001461 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
1463Optional Packages:
1464 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1465 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001466 --with-universal-archs=ARCH
1467 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001468 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001469 --with-framework-name=FRAMEWORK
1470 specify an alternate name of the framework built
1471 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001473 --with-cxx-main=<compiler>
1474 compile main() and link python executable with C++
1475 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --with-suffix=.exe set executable suffix
1477 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001478 --with-hash-algorithm=[fnv|siphash24]
1479 select hash algorithm
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001481 --with-system-expat build pyexpat module using an installed expat
1482 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001483 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001484 --with-system-libmpdec build _decimal module using an installed libmpdec
1485 library
Ned Deilyd819b932013-09-06 01:07:05 -07001486 --with-tcltk-includes='-I...'
1487 override search for Tcl and Tk include files
1488 --with-tcltk-libs='-L...'
1489 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001490 --with-dbmliborder=db1:db2:...
1491 order to check db backends for dbm. Valid value is a
1492 colon separated string with the backend names
1493 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --with(out)-threads[=DIRECTORY]
1496 disable/enable thread support
1497 --with(out)-thread[=DIRECTORY]
1498 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001500 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001502 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --with-fpectl enable SIGFPE catching
1504 --with-libm=STRING math library
1505 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001506 --with(out)-computed-gotos
1507 Use computed gotos in evaluation loop (enabled by
1508 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001509 --with(out)-ensurepip=[=upgrade]
1510 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001511
1512Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001513 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 CC C compiler command
1515 CFLAGS C compiler flags
1516 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1517 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001519 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001521 CPP C preprocessor
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05001522 PKG_CONFIG path to pkg-config utility
1523 PKG_CONFIG_PATH
1524 directories to add to pkg-config's search path
1525 PKG_CONFIG_LIBDIR
1526 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001527
1528Use these variables to override the choices made by `configure' or to help
1529it to find libraries and programs with nonstandard names/locations.
1530
Georg Brandle2e15612009-05-20 18:25:10 +00001531Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001532_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001533ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001534fi
1535
1536if test "$ac_init_help" = "recursive"; then
1537 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001539 test -d "$ac_dir" ||
1540 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1541 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001542 ac_builddir=.
1543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001544case "$ac_dir" in
1545.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1546*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001547 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001549 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 case $ac_top_builddir_sub in
1551 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1552 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1553 esac ;;
1554esac
1555ac_abs_top_builddir=$ac_pwd
1556ac_abs_builddir=$ac_pwd$ac_dir_suffix
1557# for backward compatibility:
1558ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001559
1560case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563 ac_top_srcdir=$ac_top_builddir_sub
1564 ac_abs_top_srcdir=$ac_pwd ;;
1565 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 ac_top_srcdir=$srcdir
1568 ac_abs_top_srcdir=$srcdir ;;
1569 *) # Relative name.
1570 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1571 ac_top_srcdir=$ac_top_build_prefix$srcdir
1572 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001573esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001576 cd "$ac_dir" || { ac_status=$?; continue; }
1577 # Check for guested configure.
1578 if test -f "$ac_srcdir/configure.gnu"; then
1579 echo &&
1580 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1581 elif test -f "$ac_srcdir/configure"; then
1582 echo &&
1583 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001585 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 fi || ac_status=$?
1587 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 done
1589fi
1590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001592if $ac_init_version; then
1593 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001594python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001595generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001596
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001597Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001598This configure script is free software; the Free Software Foundation
1599gives unlimited permission to copy, distribute and modify it.
1600_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001603
1604## ------------------------ ##
1605## Autoconf initialization. ##
1606## ------------------------ ##
1607
1608# ac_fn_c_try_compile LINENO
1609# --------------------------
1610# Try to compile conftest.$ac_ext, and return whether this succeeded.
1611ac_fn_c_try_compile ()
1612{
1613 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1614 rm -f conftest.$ac_objext
1615 if { { ac_try="$ac_compile"
1616case "(($ac_try" in
1617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1618 *) ac_try_echo=$ac_try;;
1619esac
1620eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1621$as_echo "$ac_try_echo"; } >&5
1622 (eval "$ac_compile") 2>conftest.err
1623 ac_status=$?
1624 if test -s conftest.err; then
1625 grep -v '^ *+' conftest.err >conftest.er1
1626 cat conftest.er1 >&5
1627 mv -f conftest.er1 conftest.err
1628 fi
1629 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1630 test $ac_status = 0; } && {
1631 test -z "$ac_c_werror_flag" ||
1632 test ! -s conftest.err
1633 } && test -s conftest.$ac_objext; then :
1634 ac_retval=0
1635else
1636 $as_echo "$as_me: failed program was:" >&5
1637sed 's/^/| /' conftest.$ac_ext >&5
1638
1639 ac_retval=1
1640fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001641 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001642 as_fn_set_status $ac_retval
1643
1644} # ac_fn_c_try_compile
1645
Matthias Kloseb9621712010-04-24 17:59:49 +00001646# ac_fn_c_try_link LINENO
1647# -----------------------
1648# Try to link conftest.$ac_ext, and return whether this succeeded.
1649ac_fn_c_try_link ()
1650{
1651 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1652 rm -f conftest.$ac_objext conftest$ac_exeext
1653 if { { ac_try="$ac_link"
1654case "(($ac_try" in
1655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1656 *) ac_try_echo=$ac_try;;
1657esac
1658eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1659$as_echo "$ac_try_echo"; } >&5
1660 (eval "$ac_link") 2>conftest.err
1661 ac_status=$?
1662 if test -s conftest.err; then
1663 grep -v '^ *+' conftest.err >conftest.er1
1664 cat conftest.er1 >&5
1665 mv -f conftest.er1 conftest.err
1666 fi
1667 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1668 test $ac_status = 0; } && {
1669 test -z "$ac_c_werror_flag" ||
1670 test ! -s conftest.err
1671 } && test -s conftest$ac_exeext && {
1672 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001673 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 }; then :
1675 ac_retval=0
1676else
1677 $as_echo "$as_me: failed program was:" >&5
1678sed 's/^/| /' conftest.$ac_ext >&5
1679
1680 ac_retval=1
1681fi
1682 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1683 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1684 # interfere with the next link command; also delete a directory that is
1685 # left behind by Apple's compiler. We do this before executing the actions.
1686 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001687 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001688 as_fn_set_status $ac_retval
1689
1690} # ac_fn_c_try_link
1691
Matthias Kloseb9621712010-04-24 17:59:49 +00001692# ac_fn_c_try_cpp LINENO
1693# ----------------------
1694# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1695ac_fn_c_try_cpp ()
1696{
1697 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1698 if { { ac_try="$ac_cpp conftest.$ac_ext"
1699case "(($ac_try" in
1700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1701 *) ac_try_echo=$ac_try;;
1702esac
1703eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1704$as_echo "$ac_try_echo"; } >&5
1705 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1706 ac_status=$?
1707 if test -s conftest.err; then
1708 grep -v '^ *+' conftest.err >conftest.er1
1709 cat conftest.er1 >&5
1710 mv -f conftest.er1 conftest.err
1711 fi
1712 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001713 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001714 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1715 test ! -s conftest.err
1716 }; then :
1717 ac_retval=0
1718else
1719 $as_echo "$as_me: failed program was:" >&5
1720sed 's/^/| /' conftest.$ac_ext >&5
1721
1722 ac_retval=1
1723fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001724 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001725 as_fn_set_status $ac_retval
1726
1727} # ac_fn_c_try_cpp
1728
1729# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1730# -------------------------------------------------------
1731# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1732# the include files in INCLUDES and setting the cache variable VAR
1733# accordingly.
1734ac_fn_c_check_header_mongrel ()
1735{
1736 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001737 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1739$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001740if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 $as_echo_n "(cached) " >&6
1742fi
1743eval ac_res=\$$3
1744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1745$as_echo "$ac_res" >&6; }
1746else
1747 # Is the header compilable?
1748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1749$as_echo_n "checking $2 usability... " >&6; }
1750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1751/* end confdefs.h. */
1752$4
1753#include <$2>
1754_ACEOF
1755if ac_fn_c_try_compile "$LINENO"; then :
1756 ac_header_compiler=yes
1757else
1758 ac_header_compiler=no
1759fi
1760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1762$as_echo "$ac_header_compiler" >&6; }
1763
1764# Is the header present?
1765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1766$as_echo_n "checking $2 presence... " >&6; }
1767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1768/* end confdefs.h. */
1769#include <$2>
1770_ACEOF
1771if ac_fn_c_try_cpp "$LINENO"; then :
1772 ac_header_preproc=yes
1773else
1774 ac_header_preproc=no
1775fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001776rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1778$as_echo "$ac_header_preproc" >&6; }
1779
1780# So? What about this header?
1781case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1782 yes:no: )
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1784$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1786$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1787 ;;
1788 no:yes:* )
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1790$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1792$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1794$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1796$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1798$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001799( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001800## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001801## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001802 ) | sed "s/^/$as_me: WARNING: /" >&2
1803 ;;
1804esac
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1806$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001807if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001808 $as_echo_n "(cached) " >&6
1809else
1810 eval "$3=\$ac_header_compiler"
1811fi
1812eval ac_res=\$$3
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814$as_echo "$ac_res" >&6; }
1815fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001816 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001817
1818} # ac_fn_c_check_header_mongrel
1819
1820# ac_fn_c_try_run LINENO
1821# ----------------------
1822# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1823# that executables *can* be run.
1824ac_fn_c_try_run ()
1825{
1826 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1827 if { { ac_try="$ac_link"
1828case "(($ac_try" in
1829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1830 *) ac_try_echo=$ac_try;;
1831esac
1832eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1833$as_echo "$ac_try_echo"; } >&5
1834 (eval "$ac_link") 2>&5
1835 ac_status=$?
1836 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1837 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1838 { { case "(($ac_try" in
1839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1840 *) ac_try_echo=$ac_try;;
1841esac
1842eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1843$as_echo "$ac_try_echo"; } >&5
1844 (eval "$ac_try") 2>&5
1845 ac_status=$?
1846 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1847 test $ac_status = 0; }; }; then :
1848 ac_retval=0
1849else
1850 $as_echo "$as_me: program exited with status $ac_status" >&5
1851 $as_echo "$as_me: failed program was:" >&5
1852sed 's/^/| /' conftest.$ac_ext >&5
1853
1854 ac_retval=$ac_status
1855fi
1856 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001858 as_fn_set_status $ac_retval
1859
1860} # ac_fn_c_try_run
1861
1862# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1863# -------------------------------------------------------
1864# Tests whether HEADER exists and can be compiled using the include files in
1865# INCLUDES, setting the cache variable VAR accordingly.
1866ac_fn_c_check_header_compile ()
1867{
1868 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1870$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001871if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001872 $as_echo_n "(cached) " >&6
1873else
1874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1875/* end confdefs.h. */
1876$4
1877#include <$2>
1878_ACEOF
1879if ac_fn_c_try_compile "$LINENO"; then :
1880 eval "$3=yes"
1881else
1882 eval "$3=no"
1883fi
1884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1885fi
1886eval ac_res=\$$3
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1888$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001889 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001890
1891} # ac_fn_c_check_header_compile
1892
Matthias Kloseb9621712010-04-24 17:59:49 +00001893# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1894# -------------------------------------------
1895# Tests whether TYPE exists after having included INCLUDES, setting cache
1896# variable VAR accordingly.
1897ac_fn_c_check_type ()
1898{
1899 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1901$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001902if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001903 $as_echo_n "(cached) " >&6
1904else
1905 eval "$3=no"
1906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907/* end confdefs.h. */
1908$4
1909int
1910main ()
1911{
1912if (sizeof ($2))
1913 return 0;
1914 ;
1915 return 0;
1916}
1917_ACEOF
1918if ac_fn_c_try_compile "$LINENO"; then :
1919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1920/* end confdefs.h. */
1921$4
1922int
1923main ()
1924{
1925if (sizeof (($2)))
1926 return 0;
1927 ;
1928 return 0;
1929}
1930_ACEOF
1931if ac_fn_c_try_compile "$LINENO"; then :
1932
1933else
1934 eval "$3=yes"
1935fi
1936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1937fi
1938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1939fi
1940eval ac_res=\$$3
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001943 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001944
1945} # ac_fn_c_check_type
1946
1947# ac_fn_c_find_uintX_t LINENO BITS VAR
1948# ------------------------------------
1949# Finds an unsigned integer type with width BITS, setting cache variable VAR
1950# accordingly.
1951ac_fn_c_find_uintX_t ()
1952{
1953 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1955$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001956if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001957 $as_echo_n "(cached) " >&6
1958else
1959 eval "$3=no"
1960 # Order is important - never check a type that is potentially smaller
1961 # than half of the expected target width.
1962 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1963 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965/* end confdefs.h. */
1966$ac_includes_default
1967int
1968main ()
1969{
1970static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001971test_array [0] = 0;
1972return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001973
1974 ;
1975 return 0;
1976}
1977_ACEOF
1978if ac_fn_c_try_compile "$LINENO"; then :
1979 case $ac_type in #(
1980 uint$2_t) :
1981 eval "$3=yes" ;; #(
1982 *) :
1983 eval "$3=\$ac_type" ;;
1984esac
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001987 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989else
1990 break
1991fi
1992 done
1993fi
1994eval ac_res=\$$3
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001998
1999} # ac_fn_c_find_uintX_t
2000
2001# ac_fn_c_find_intX_t LINENO BITS VAR
2002# -----------------------------------
2003# Finds a signed integer type with width BITS, setting cache variable VAR
2004# accordingly.
2005ac_fn_c_find_intX_t ()
2006{
2007 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2009$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002010if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002011 $as_echo_n "(cached) " >&6
2012else
2013 eval "$3=no"
2014 # Order is important - never check a type that is potentially smaller
2015 # than half of the expected target width.
2016 for ac_type in int$2_t 'int' 'long int' \
2017 'long long int' 'short int' 'signed char'; do
2018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019/* end confdefs.h. */
2020$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002021 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002022int
2023main ()
2024{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002025static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002026test_array [0] = 0;
2027return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002028
2029 ;
2030 return 0;
2031}
2032_ACEOF
2033if ac_fn_c_try_compile "$LINENO"; then :
2034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035/* end confdefs.h. */
2036$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002037 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002038int
2039main ()
2040{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002041static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002042 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002043test_array [0] = 0;
2044return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051
2052else
2053 case $ac_type in #(
2054 int$2_t) :
2055 eval "$3=yes" ;; #(
2056 *) :
2057 eval "$3=\$ac_type" ;;
2058esac
2059fi
2060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2061fi
2062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002063 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065else
2066 break
2067fi
2068 done
2069fi
2070eval ac_res=\$$3
2071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2072$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002073 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002074
2075} # ac_fn_c_find_intX_t
2076
2077# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2078# --------------------------------------------
2079# Tries to find the compile-time value of EXPR in a program that includes
2080# INCLUDES, setting VAR accordingly. Returns whether the value could be
2081# computed
2082ac_fn_c_compute_int ()
2083{
2084 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2085 if test "$cross_compiling" = yes; then
2086 # Depending upon the size, compute the lo and hi bounds.
2087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088/* end confdefs.h. */
2089$4
2090int
2091main ()
2092{
2093static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002094test_array [0] = 0;
2095return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002096
2097 ;
2098 return 0;
2099}
2100_ACEOF
2101if ac_fn_c_try_compile "$LINENO"; then :
2102 ac_lo=0 ac_mid=0
2103 while :; do
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
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=$ac_mid; break
2120else
2121 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2122 if test $ac_lo -le $ac_mid; then
2123 ac_lo= ac_hi=
2124 break
2125 fi
2126 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2127fi
2128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2129 done
2130else
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134int
2135main ()
2136{
2137static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002138test_array [0] = 0;
2139return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_compile "$LINENO"; then :
2146 ac_hi=-1 ac_mid=-1
2147 while :; do
2148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2149/* end confdefs.h. */
2150$4
2151int
2152main ()
2153{
2154static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002155test_array [0] = 0;
2156return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002157
2158 ;
2159 return 0;
2160}
2161_ACEOF
2162if ac_fn_c_try_compile "$LINENO"; then :
2163 ac_lo=$ac_mid; break
2164else
2165 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2166 if test $ac_mid -le $ac_hi; then
2167 ac_lo= ac_hi=
2168 break
2169 fi
2170 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2171fi
2172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173 done
2174else
2175 ac_lo= ac_hi=
2176fi
2177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178fi
2179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2180# Binary search between lo and hi bounds.
2181while test "x$ac_lo" != "x$ac_hi"; do
2182 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185$4
2186int
2187main ()
2188{
2189static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002190test_array [0] = 0;
2191return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002192
2193 ;
2194 return 0;
2195}
2196_ACEOF
2197if ac_fn_c_try_compile "$LINENO"; then :
2198 ac_hi=$ac_mid
2199else
2200 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2201fi
2202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2203done
2204case $ac_lo in #((
2205?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2206'') ac_retval=1 ;;
2207esac
2208 else
2209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210/* end confdefs.h. */
2211$4
2212static long int longval () { return $2; }
2213static unsigned long int ulongval () { return $2; }
2214#include <stdio.h>
2215#include <stdlib.h>
2216int
2217main ()
2218{
2219
2220 FILE *f = fopen ("conftest.val", "w");
2221 if (! f)
2222 return 1;
2223 if (($2) < 0)
2224 {
2225 long int i = longval ();
2226 if (i != ($2))
2227 return 1;
2228 fprintf (f, "%ld", i);
2229 }
2230 else
2231 {
2232 unsigned long int i = ulongval ();
2233 if (i != ($2))
2234 return 1;
2235 fprintf (f, "%lu", i);
2236 }
2237 /* Do not output a trailing newline, as this causes \r\n confusion
2238 on some platforms. */
2239 return ferror (f) || fclose (f) != 0;
2240
2241 ;
2242 return 0;
2243}
2244_ACEOF
2245if ac_fn_c_try_run "$LINENO"; then :
2246 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2247else
2248 ac_retval=1
2249fi
2250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2251 conftest.$ac_objext conftest.beam conftest.$ac_ext
2252rm -f conftest.val
2253
2254 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002255 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002256 as_fn_set_status $ac_retval
2257
2258} # ac_fn_c_compute_int
2259
2260# ac_fn_c_check_func LINENO FUNC VAR
2261# ----------------------------------
2262# Tests whether FUNC exists, setting the cache variable VAR accordingly
2263ac_fn_c_check_func ()
2264{
2265 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2267$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002268if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002269 $as_echo_n "(cached) " >&6
2270else
2271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2272/* end confdefs.h. */
2273/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2274 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2275#define $2 innocuous_$2
2276
2277/* System header to define __stub macros and hopefully few prototypes,
2278 which can conflict with char $2 (); below.
2279 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2280 <limits.h> exists even on freestanding compilers. */
2281
2282#ifdef __STDC__
2283# include <limits.h>
2284#else
2285# include <assert.h>
2286#endif
2287
2288#undef $2
2289
2290/* Override any GCC internal prototype to avoid an error.
2291 Use char because int might match the return type of a GCC
2292 builtin and then its argument prototype would still apply. */
2293#ifdef __cplusplus
2294extern "C"
2295#endif
2296char $2 ();
2297/* The GNU C library defines this for functions which it implements
2298 to always fail with ENOSYS. Some functions are actually named
2299 something starting with __ and the normal name is an alias. */
2300#if defined __stub_$2 || defined __stub___$2
2301choke me
2302#endif
2303
2304int
2305main ()
2306{
2307return $2 ();
2308 ;
2309 return 0;
2310}
2311_ACEOF
2312if ac_fn_c_try_link "$LINENO"; then :
2313 eval "$3=yes"
2314else
2315 eval "$3=no"
2316fi
2317rm -f core conftest.err conftest.$ac_objext \
2318 conftest$ac_exeext conftest.$ac_ext
2319fi
2320eval ac_res=\$$3
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2322$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002323 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002324
2325} # ac_fn_c_check_func
2326
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002327# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2328# ---------------------------------------------
2329# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2330# accordingly.
2331ac_fn_c_check_decl ()
2332{
2333 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2334 as_decl_name=`echo $2|sed 's/ *(.*//'`
2335 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2337$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2338if eval \${$3+:} false; then :
2339 $as_echo_n "(cached) " >&6
2340else
2341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2342/* end confdefs.h. */
2343$4
2344int
2345main ()
2346{
2347#ifndef $as_decl_name
2348#ifdef __cplusplus
2349 (void) $as_decl_use;
2350#else
2351 (void) $as_decl_name;
2352#endif
2353#endif
2354
2355 ;
2356 return 0;
2357}
2358_ACEOF
2359if ac_fn_c_try_compile "$LINENO"; then :
2360 eval "$3=yes"
2361else
2362 eval "$3=no"
2363fi
2364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2365fi
2366eval ac_res=\$$3
2367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2368$as_echo "$ac_res" >&6; }
2369 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2370
2371} # ac_fn_c_check_decl
2372
Matthias Kloseb9621712010-04-24 17:59:49 +00002373# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2374# ----------------------------------------------------
2375# Tries to find if the field MEMBER exists in type AGGR, after including
2376# INCLUDES, setting cache variable VAR accordingly.
2377ac_fn_c_check_member ()
2378{
2379 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2381$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002382if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002383 $as_echo_n "(cached) " >&6
2384else
2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386/* end confdefs.h. */
2387$5
2388int
2389main ()
2390{
2391static $2 ac_aggr;
2392if (ac_aggr.$3)
2393return 0;
2394 ;
2395 return 0;
2396}
2397_ACEOF
2398if ac_fn_c_try_compile "$LINENO"; then :
2399 eval "$4=yes"
2400else
2401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2402/* end confdefs.h. */
2403$5
2404int
2405main ()
2406{
2407static $2 ac_aggr;
2408if (sizeof ac_aggr.$3)
2409return 0;
2410 ;
2411 return 0;
2412}
2413_ACEOF
2414if ac_fn_c_try_compile "$LINENO"; then :
2415 eval "$4=yes"
2416else
2417 eval "$4=no"
2418fi
2419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2420fi
2421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2422fi
2423eval ac_res=\$$4
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2425$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002426 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002427
2428} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002429cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002430This file contains any messages produced by compilers while
2431running configure, to aid debugging if configure makes a mistake.
2432
Georg Brandl08a90122012-09-29 09:34:13 +02002433It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002434generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002435
2436 $ $0 $@
2437
2438_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002440{
2441cat <<_ASUNAME
2442## --------- ##
2443## Platform. ##
2444## --------- ##
2445
2446hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2447uname -m = `(uname -m) 2>/dev/null || echo unknown`
2448uname -r = `(uname -r) 2>/dev/null || echo unknown`
2449uname -s = `(uname -s) 2>/dev/null || echo unknown`
2450uname -v = `(uname -v) 2>/dev/null || echo unknown`
2451
2452/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2453/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2454
2455/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2456/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2457/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002459/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2460/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2461/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2462
2463_ASUNAME
2464
2465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2466for as_dir in $PATH
2467do
2468 IFS=$as_save_IFS
2469 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 $as_echo "PATH: $as_dir"
2471 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002473
2474} >&5
2475
2476cat >&5 <<_ACEOF
2477
2478
2479## ----------- ##
2480## Core tests. ##
2481## ----------- ##
2482
2483_ACEOF
2484
2485
2486# Keep a trace of the command line.
2487# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002488# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002489# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002490# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002491ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002492ac_configure_args0=
2493ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002494ac_must_keep_next=false
2495for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002496do
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 for ac_arg
2498 do
2499 case $ac_arg in
2500 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2501 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2502 | -silent | --silent | --silen | --sile | --sil)
2503 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 esac
2507 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002512 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002514 case $ac_arg in
2515 *=* | --config-cache | -C | -disable-* | --disable-* \
2516 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2517 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2518 | -with-* | --with-* | -without-* | --without-* | --x)
2519 case "$ac_configure_args0 " in
2520 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2521 esac
2522 ;;
2523 -* ) ac_must_keep_next=true ;;
2524 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 ;;
2528 esac
2529 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002530done
Matthias Kloseb9621712010-04-24 17:59:49 +00002531{ ac_configure_args0=; unset ac_configure_args0;}
2532{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
2534# When interrupted or exit'd, cleanup temporary files, and complete
2535# config.log. We remove comments because anyway the quotes in there
2536# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537# WARNING: Use '\'' to represent an apostrophe within the trap.
2538# 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 +00002539trap 'exit_status=$?
2540 # Save into config.log some information that might help in debugging.
2541 {
2542 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002543
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002544 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002545## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002546## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 echo
2548 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549(
2550 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2551 eval ac_val=\$$ac_var
2552 case $ac_val in #(
2553 *${as_nl}*)
2554 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002555 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2556$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557 esac
2558 case $ac_var in #(
2559 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002560 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2561 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 esac ;;
2563 esac
2564 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2567 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 "s/'\''/'\''\\\\'\'''\''/g;
2570 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2571 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002572 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002574 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 esac |
2576 sort
2577)
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002579
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002580 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002581## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002582## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002583 echo
2584 for ac_var in $ac_subst_vars
2585 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586 eval ac_val=\$$ac_var
2587 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002591 done | sort
2592 echo
2593
2594 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002595 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002597## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002598 echo
2599 for ac_var in $ac_subst_files
2600 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 eval ac_val=\$$ac_var
2602 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002606 done | sort
2607 echo
2608 fi
2609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002611 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002612## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002613## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 echo
2617 fi
2618 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 $as_echo "$as_me: caught signal $ac_signal"
2620 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 rm -f core *.core core.conftest.* &&
2623 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002626for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002628done
2629ac_signal=0
2630
2631# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002633
Matthias Kloseb9621712010-04-24 17:59:49 +00002634$as_echo "/* confdefs.h */" > confdefs.h
2635
Martin v. Löwis11437992002-04-12 09:54:03 +00002636# Predefined preprocessor variables.
2637
2638cat >>confdefs.h <<_ACEOF
2639#define PACKAGE_NAME "$PACKAGE_NAME"
2640_ACEOF
2641
Martin v. Löwis11437992002-04-12 09:54:03 +00002642cat >>confdefs.h <<_ACEOF
2643#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2644_ACEOF
2645
Martin v. Löwis11437992002-04-12 09:54:03 +00002646cat >>confdefs.h <<_ACEOF
2647#define PACKAGE_VERSION "$PACKAGE_VERSION"
2648_ACEOF
2649
Martin v. Löwis11437992002-04-12 09:54:03 +00002650cat >>confdefs.h <<_ACEOF
2651#define PACKAGE_STRING "$PACKAGE_STRING"
2652_ACEOF
2653
Martin v. Löwis11437992002-04-12 09:54:03 +00002654cat >>confdefs.h <<_ACEOF
2655#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2656_ACEOF
2657
Matthias Kloseb9621712010-04-24 17:59:49 +00002658cat >>confdefs.h <<_ACEOF
2659#define PACKAGE_URL "$PACKAGE_URL"
2660_ACEOF
2661
Martin v. Löwis11437992002-04-12 09:54:03 +00002662
2663# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002664# Prefer an explicitly selected file to automatically selected ones.
2665ac_site_file1=NONE
2666ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002668 # We do not want a PATH search for config.site.
2669 case $CONFIG_SITE in #((
2670 -*) ac_site_file1=./$CONFIG_SITE;;
2671 */*) ac_site_file1=$CONFIG_SITE;;
2672 *) ac_site_file1=./$CONFIG_SITE;;
2673 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 ac_site_file1=$prefix/share/config.site
2676 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002677else
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 ac_site_file1=$ac_default_prefix/share/config.site
2679 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002681for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682do
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 test "x$ac_site_file" = xNONE && continue
2684 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2686$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002687 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002688 . "$ac_site_file" \
2689 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2691as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002692See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693 fi
2694done
2695
2696if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 # Some versions of bash will fail to source /dev/null (special files
2698 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2699 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2701$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002703 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2704 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 esac
2706 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707else
Matthias Kloseb9621712010-04-24 17:59:49 +00002708 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2709$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 >$cache_file
2711fi
2712
2713# Check that the precious variables saved in the cache have kept the same
2714# value.
2715ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002716for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2718 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002719 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2720 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 case $ac_old_set,$ac_new_set in
2722 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002723 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2724$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 +00002725 ac_cache_corrupted=: ;;
2726 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2728$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 ac_cache_corrupted=: ;;
2730 ,);;
2731 *)
2732 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002733 # differences in whitespace do not lead to failure.
2734 ac_old_val_w=`echo x $ac_old_val`
2735 ac_new_val_w=`echo x $ac_new_val`
2736 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2738$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2739 ac_cache_corrupted=:
2740 else
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2742$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2743 eval $ac_var=\$ac_old_val
2744 fi
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2746$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2748$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 fi;;
2750 esac
2751 # Pass precious variables to config.status.
2752 if test "$ac_new_set" = set; then
2753 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002754 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 *) ac_arg=$ac_var=$ac_new_val ;;
2756 esac
2757 case " $ac_configure_args " in
2758 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002759 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002760 esac
2761 fi
2762done
2763if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002764 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2767$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002768 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002770## -------------------- ##
2771## Main body of script. ##
2772## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002773
Guido van Rossum7f43da71994-08-01 12:15:30 +00002774ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002775ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002776ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2777ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2778ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002779
Guido van Rossum627b2d71993-12-24 10:39:16 +00002780
Michael W. Hudson54241132001-12-07 15:38:26 +00002781
Trent Nelson4d4ec652012-10-16 08:51:24 -04002782
Trent Nelson5595ab52012-10-17 04:47:31 -04002783if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002784 # If we're building out-of-tree, we need to make sure the following
2785 # resources get picked up before their $srcdir counterparts.
2786 # Objects/ -> typeslots.inc
2787 # Include/ -> Python-ast.h, graminit.h
2788 # Python/ -> importlib.h
2789 # (A side effect of this is that these resources will automatically be
2790 # regenerated when building out-of-tree, regardless of whether or not
2791 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2792 # off.)
2793 BASECPPFLAGS="-IObjects -IInclude -IPython"
2794else
2795 BASECPPFLAGS=""
2796fi
2797
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002798
2799
2800
2801
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002802if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002803then
2804# Extract the first word of "hg", so it can be a program name with args.
2805set dummy hg; ac_word=$2
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2807$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002808if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002809 $as_echo_n "(cached) " >&6
2810else
2811 if test -n "$HAS_HG"; then
2812 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2813else
2814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2815for as_dir in $PATH
2816do
2817 IFS=$as_save_IFS
2818 test -z "$as_dir" && as_dir=.
2819 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002821 ac_cv_prog_HAS_HG="found"
2822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2823 break 2
2824 fi
2825done
2826 done
2827IFS=$as_save_IFS
2828
2829 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2830fi
2831fi
2832HAS_HG=$ac_cv_prog_HAS_HG
2833if test -n "$HAS_HG"; then
2834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2835$as_echo "$HAS_HG" >&6; }
2836else
2837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2838$as_echo "no" >&6; }
2839fi
2840
2841
2842else
2843HAS_HG=no-repository
2844fi
2845if test $HAS_HG = found
2846then
2847 HGVERSION="hg id -i \$(srcdir)"
2848 HGTAG="hg id -t \$(srcdir)"
2849 HGBRANCH="hg id -b \$(srcdir)"
2850else
2851 HGVERSION=""
2852 HGTAG=""
2853 HGBRANCH=""
2854fi
2855
2856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002857ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002858
2859
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002860ac_aux_dir=
2861for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2862 if test -f "$ac_dir/install-sh"; then
2863 ac_aux_dir=$ac_dir
2864 ac_install_sh="$ac_aux_dir/install-sh -c"
2865 break
2866 elif test -f "$ac_dir/install.sh"; then
2867 ac_aux_dir=$ac_dir
2868 ac_install_sh="$ac_aux_dir/install.sh -c"
2869 break
2870 elif test -f "$ac_dir/shtool"; then
2871 ac_aux_dir=$ac_dir
2872 ac_install_sh="$ac_aux_dir/shtool install -c"
2873 break
2874 fi
2875done
2876if test -z "$ac_aux_dir"; then
2877 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2878fi
2879
2880# These three variables are undocumented and unsupported,
2881# and are intended to be withdrawn in a future Autoconf release.
2882# They can cause serious problems if a builder's source tree is in a directory
2883# whose full name contains unusual characters.
2884ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2885ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2886ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2887
2888
2889# Make sure we can run config.sub.
2890$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2891 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2892
2893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2894$as_echo_n "checking build system type... " >&6; }
2895if ${ac_cv_build+:} false; then :
2896 $as_echo_n "(cached) " >&6
2897else
2898 ac_build_alias=$build_alias
2899test "x$ac_build_alias" = x &&
2900 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2901test "x$ac_build_alias" = x &&
2902 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2903ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2904 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2905
2906fi
2907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2908$as_echo "$ac_cv_build" >&6; }
2909case $ac_cv_build in
2910*-*-*) ;;
2911*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2912esac
2913build=$ac_cv_build
2914ac_save_IFS=$IFS; IFS='-'
2915set x $ac_cv_build
2916shift
2917build_cpu=$1
2918build_vendor=$2
2919shift; shift
2920# Remember, the first character of IFS is used to create $*,
2921# except with old shells:
2922build_os=$*
2923IFS=$ac_save_IFS
2924case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2925
2926
2927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2928$as_echo_n "checking host system type... " >&6; }
2929if ${ac_cv_host+:} false; then :
2930 $as_echo_n "(cached) " >&6
2931else
2932 if test "x$host_alias" = x; then
2933 ac_cv_host=$ac_cv_build
2934else
2935 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2936 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2937fi
2938
2939fi
2940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2941$as_echo "$ac_cv_host" >&6; }
2942case $ac_cv_host in
2943*-*-*) ;;
2944*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2945esac
2946host=$ac_cv_host
2947ac_save_IFS=$IFS; IFS='-'
2948set x $ac_cv_host
2949shift
2950host_cpu=$1
2951host_vendor=$2
2952shift; shift
2953# Remember, the first character of IFS is used to create $*,
2954# except with old shells:
2955host_os=$*
2956IFS=$ac_save_IFS
2957case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2958
2959
2960
doko@python.orga10e4a92013-01-25 18:45:12 +01002961
2962
Ned Deilyfcbc2462014-08-22 13:32:49 -07002963# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2964rm -f pybuilddir.txt
2965
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002966if test "$cross_compiling" = yes; then
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2968$as_echo_n "checking for python interpreter for cross build... " >&6; }
2969 if test -z "$PYTHON_FOR_BUILD"; then
2970 for interp in python$PACKAGE_VERSION python3 python; do
2971 which $interp >/dev/null 2>&1 || continue
2972 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2973 break
2974 fi
2975 interp=
2976 done
2977 if test x$interp = x; then
2978 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2979 fi
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2981$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002982 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 +02002983 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002984elif test "$cross_compiling" = maybe; then
2985 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002986else
2987 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2988fi
2989
2990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991
Benjamin Petersond23f8222009-04-05 19:13:16 +00002992if test "$prefix" != "/"; then
2993 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2994fi
2995
2996
Martin v. Löwis11437992002-04-12 09:54:03 +00002997
2998
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002999# We don't use PACKAGE_ variables, and they cause conflicts
3000# with other autoconf-based packages that include Python.h
3001grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3002rm confdefs.h
3003mv confdefs.h.new confdefs.h
3004
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003005
Georg Brandl08a90122012-09-29 09:34:13 +02003006VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003007
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003008# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003009
3010SOVERSION=1.0
3011
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003012# The later defininition of _XOPEN_SOURCE disables certain features
3013# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003016
3017
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003018# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3019# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3020# them.
3021
Matthias Kloseb9621712010-04-24 17:59:49 +00003022$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003023
3024
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003025# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3026# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3027# them.
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003030
3031
Martin v. Löwisd6320502004-08-12 13:45:08 +00003032# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3033# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3034
Matthias Kloseb9621712010-04-24 17:59:49 +00003035$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003036
3037
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003038# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3039# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3040# them.
3041
Matthias Kloseb9621712010-04-24 17:59:49 +00003042$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003043
3044
3045
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003046define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003047
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003048# Arguments passed to configure.
3049
3050CONFIG_ARGS="$ac_configure_args"
3051
Matthias Kloseb9621712010-04-24 17:59:49 +00003052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3053$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003054# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003055if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003056 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057 case $enableval in
3058 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003059 # Locate the best usable SDK, see Mac/README.txt for more
3060 # information
3061 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003062 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003064 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3065 if test ! -d "${enableval}"
3066 then
3067 enableval=/
3068 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003070 ;;
3071 esac
3072 case $enableval in
3073 no)
3074 UNIVERSALSDK=
3075 enable_universalsdk=
3076 ;;
3077 *)
3078 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003079 if test ! -d "${UNIVERSALSDK}"
3080 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003081 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003082 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003083 ;;
3084 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003085
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003086
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087else
3088
3089 UNIVERSALSDK=
3090 enable_universalsdk=
3091
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003092fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003093
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003094if test -n "${UNIVERSALSDK}"
3095then
Matthias Kloseb9621712010-04-24 17:59:49 +00003096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3097$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003098else
Matthias Kloseb9621712010-04-24 17:59:49 +00003099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3100$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003101fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003103
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003104
Ned Deily87adb6e2013-10-18 21:09:56 -07003105ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003106
Ned Deilycbfb9a52012-06-23 16:02:19 -07003107# For backward compatibility reasons we prefer to select '32-bit' if available,
3108# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003109UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003110if test "`uname -s`" = "Darwin"
3111then
3112 if test -n "${UNIVERSALSDK}"
3113 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003114 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003115 then
3116 UNIVERSAL_ARCHS="intel"
3117 fi
3118 fi
3119fi
3120
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003121
Matthias Kloseb9621712010-04-24 17:59:49 +00003122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3123$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003124
3125# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003126if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003127 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003128 UNIVERSAL_ARCHS="$withval"
3129
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003130fi
3131
Ned Deily87adb6e2013-10-18 21:09:56 -07003132if test -n "${UNIVERSALSDK}"
3133then
3134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3135$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3136else
3137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3138$as_echo "no" >&6; }
3139fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003140
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003141
3142# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003143if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003144 withval=$with_framework_name;
3145 PYTHONFRAMEWORK=${withval}
3146 PYTHONFRAMEWORKDIR=${withval}.framework
3147 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3148
3149else
3150
3151 PYTHONFRAMEWORK=Python
3152 PYTHONFRAMEWORKDIR=Python.framework
3153 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3154
3155fi
3156
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003157# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003158if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003159 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003160 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003161 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003162 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003163 esac
3164 case $enableval in
3165 no)
3166 PYTHONFRAMEWORK=
3167 PYTHONFRAMEWORKDIR=no-framework
3168 PYTHONFRAMEWORKPREFIX=
3169 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003170 FRAMEWORKINSTALLFIRST=
3171 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003172 FRAMEWORKALTINSTALLFIRST=
3173 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003174 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003175 if test "x${prefix}" = "xNONE"; then
3176 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3177 else
3178 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3179 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003180 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003181 ;;
3182 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003183 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003184 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003186 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003187 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3188 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003189 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003190 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003191
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003192 if test "x${prefix}" = "xNONE" ; then
3193 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003194
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003195 else
3196 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3197 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003198
3199 case "${enableval}" in
3200 /System*)
3201 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3202 if test "${prefix}" = "NONE" ; then
3203 # See below
3204 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3205 fi
3206 ;;
3207
3208 /Library*)
3209 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3210 ;;
3211
3212 */Library/Frameworks)
3213 MDIR="`dirname "${enableval}"`"
3214 MDIR="`dirname "${MDIR}"`"
3215 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3216
3217 if test "${prefix}" = "NONE"; then
3218 # User hasn't specified the
3219 # --prefix option, but wants to install
3220 # the framework in a non-default location,
3221 # ensure that the compatibility links get
3222 # installed relative to that prefix as well
3223 # instead of in /usr/local.
3224 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3225 fi
3226 ;;
3227
3228 *)
3229 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3230 ;;
3231 esac
3232
Jack Jansen127e56e2001-09-11 14:41:54 +00003233 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003234
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003235 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003236 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003237 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003239 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003240
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003241 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3242
3243 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3244
Jack Jansene578a632001-08-15 01:27:14 +00003245 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003246
Guido van Rossum563e7081996-09-10 18:20:48 +00003247else
Martin v. Löwis11437992002-04-12 09:54:03 +00003248
Jack Jansene578a632001-08-15 01:27:14 +00003249 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003250 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003251 PYTHONFRAMEWORKPREFIX=
3252 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003253 FRAMEWORKINSTALLFIRST=
3254 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003255 FRAMEWORKALTINSTALLFIRST=
3256 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003257 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003258 if test "x${prefix}" = "xNONE" ; then
3259 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3260 else
3261 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3262 fi
Jack Jansene578a632001-08-15 01:27:14 +00003263 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003264
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003266fi
3267
Thomas Wouters477c8d52006-05-27 19:21:47 +00003268
3269
Michael W. Hudson54241132001-12-07 15:38:26 +00003270
3271
3272
3273
Jack Jansene578a632001-08-15 01:27:14 +00003274
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003275
3276
3277
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003278
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003279
Ned Deilyb8f944f2013-11-21 22:42:25 -08003280
Jack Jansene578a632001-08-15 01:27:14 +00003281##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003282## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003283## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003284##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285# Set name for machine-dependent library files
3286
Matthias Kloseb9621712010-04-24 17:59:49 +00003287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3288$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289if test -z "$MACHDEP"
3290then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 # avoid using uname for cross builds
3292 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003293 # ac_sys_system and ac_sys_release are used for setting
3294 # a lot of different things including 'define_xopen_source'
3295 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003296 case "$host" in
3297 *-*-linux*)
3298 ac_sys_system=Linux
3299 ;;
3300 *-*-cygwin*)
3301 ac_sys_system=Cygwin
3302 ;;
3303 *)
3304 # for now, limit cross builds to known configurations
3305 MACHDEP="unknown"
3306 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3307 esac
3308 ac_sys_release=
3309 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003310 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003311 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003312 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003313 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003314 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003315 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003316 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003317 fi
3318 ac_md_system=`echo $ac_sys_system |
3319 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3320 ac_md_release=`echo $ac_sys_release |
3321 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3322 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003323
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003324 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003325 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003326 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003327 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003328 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003329 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003330 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003331fi
Guido van Rossum91922671997-10-09 20:24:13 +00003332
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003333
3334if test "$cross_compiling" = yes; then
3335 case "$host" in
3336 *-*-linux*)
3337 case "$host_cpu" in
3338 arm*)
3339 _host_cpu=arm
3340 ;;
3341 *)
3342 _host_cpu=$host_cpu
3343 esac
3344 ;;
3345 *-*-cygwin*)
3346 _host_cpu=
3347 ;;
3348 *)
3349 # for now, limit cross builds to known configurations
3350 MACHDEP="unknown"
3351 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3352 esac
3353 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3354fi
3355
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003356# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3357# disable features if it is defined, without any means to access these
3358# features as extensions. For these systems, we skip the definition of
3359# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3360# some feature, make sure there is no alternative way to access this
3361# feature. Also, when using wildcards, make sure you have verified the
3362# need for not defining _XOPEN_SOURCE on all systems matching the
3363# wildcard, and that the wildcard does not include future systems
3364# (which may remove their limitations).
3365case $ac_sys_system/$ac_sys_release in
3366 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3367 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003368 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003369 # In addition, Stefan Krah confirms that issue #1244610 exists through
3370 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003371 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003372 define_xopen_source=no
3373 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3374 # also defined. This can be overridden by defining _BSD_SOURCE
3375 # As this has a different meaning on Linux, only define it on OpenBSD
3376
Matthias Kloseb9621712010-04-24 17:59:49 +00003377$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003378
3379 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003380 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003381 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3382 # also defined. This can be overridden by defining _BSD_SOURCE
3383 # As this has a different meaning on Linux, only define it on OpenBSD
3384
Matthias Kloseb9621712010-04-24 17:59:49 +00003385$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003386
3387 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003388 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3389 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3390 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003391 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 +00003392 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003393 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3394 # request to enable features supported by the standard as a request
3395 # to disable features not supported by the standard. The best way
3396 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3397 # entirely and define __EXTENSIONS__ instead.
3398 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003399 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003400 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3401 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003402 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003403 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003404 define_xopen_source=no;;
3405 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003406 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003407 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003408 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003409 # On FreeBSD 4, the math functions C89 does not cover are never defined
3410 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3411 FreeBSD/4.*)
3412 define_xopen_source=no;;
3413 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3414 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3415 # identifies itself as Darwin/7.*
3416 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3417 # disables platform specific features beyond repair.
3418 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3419 # has no effect, don't bother defining them
3420 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003421 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003422 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003423 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003424 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3425 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3426 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003427 AIX/4)
3428 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003429 AIX/5)
3430 if test `uname -r` -eq 1; then
3431 define_xopen_source=no
3432 fi
3433 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003434 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3435 # defining NI_NUMERICHOST.
3436 QNX/6.3.2)
3437 define_xopen_source=no
3438 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003439
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003440esac
3441
3442if test $define_xopen_source = yes
3443then
Victor Stinner14d098d2011-09-07 22:29:43 +02003444 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003445
Victor Stinner14d098d2011-09-07 22:29:43 +02003446$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003447
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003448
3449 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3450 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3451 # several APIs are not declared. Since this is also needed in some
3452 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003453
Matthias Kloseb9621712010-04-24 17:59:49 +00003454$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003455
3456
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003457
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003458$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003459
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003460fi
3461
Christian Heimes647cd872013-12-07 23:39:33 +01003462# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3463case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003464 hp*|HP*)
3465 define_stdc_a1=yes;;
3466 *)
3467 define_stdc_a1=no;;
3468esac
3469
3470if test $define_stdc_a1 = yes
3471then
Christian Heimes647cd872013-12-07 23:39:33 +01003472
3473$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3474
Christian Heimesb02bcae2013-12-08 15:21:08 +01003475fi
Christian Heimes647cd872013-12-07 23:39:33 +01003476
Guido van Rossum91922671997-10-09 20:24:13 +00003477#
3478# SGI compilers allow the specification of the both the ABI and the
3479# ISA on the command line. Depending on the values of these switches,
3480# different and often incompatable code will be generated.
3481#
3482# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3483# thus supply support for various ABI/ISA combinations. The MACHDEP
3484# variable is also adjusted.
3485#
3486
3487if test ! -z "$SGI_ABI"
3488then
3489 CC="cc $SGI_ABI"
3490 LDFLAGS="$SGI_ABI $LDFLAGS"
3491 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3494$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003495
Jack Jansen6b08a402004-06-03 12:41:45 +00003496# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3497# it may influence the way we can build extensions, so distutils
3498# needs to check it
3499
Thomas Wouters477c8d52006-05-27 19:21:47 +00003500
Jack Jansen6b08a402004-06-03 12:41:45 +00003501CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003502EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003503
Guido van Rossum627b2d71993-12-24 10:39:16 +00003504# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003505
3506# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3507# for debug/optimization stuff. BASECFLAGS is for flags that are required
3508# just to get things to compile and link. Users are free to override OPT
3509# when running configure or make. The build should not break if they do.
3510# BASECFLAGS should generally not be messed with, however.
3511
3512# XXX shouldn't some/most/all of this code be merged with the stuff later
3513# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3515$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003517# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003518if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003519 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003520 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003521 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003522 without_gcc=yes;;
3523 yes) CC=gcc
3524 without_gcc=no;;
3525 *) CC=$withval
3526 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003527 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003528else
Martin v. Löwis11437992002-04-12 09:54:03 +00003529
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003530 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003531 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003532 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003533 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003534 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535fi
3536
Matthias Kloseb9621712010-04-24 17:59:49 +00003537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3538$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003539
Guido van Rossum8b131c51995-03-09 14:10:13 +00003540# If the user switches compilers, we can't believe the cache
3541if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3542then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003543 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003544(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003545fi
3546
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003547# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3548# when the compiler supports them, but we don't always want -O2, and
3549# we set -g later.
3550if test -z "$CFLAGS"; then
3551 CFLAGS=
3552fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003553
3554if test "$ac_sys_system" = "Darwin"
3555then
3556 # Compiler selection on MacOSX is more complicated than
3557 # AC_PROG_CC can handle, see Mac/README.txt for more
3558 # information
3559 if test -z "${CC}"
3560 then
3561 found_gcc=
3562 found_clang=
3563 as_save_IFS=$IFS; IFS=:
3564 for as_dir in $PATH
3565 do
3566 IFS=$as_save_IFS
3567 if test -x $as_dir/gcc; then
3568 if test -z "${found_gcc}"; then
3569 found_gcc=$as_dir/gcc
3570 fi
3571 fi
3572 if test -x $as_dir/clang; then
3573 if test -z "${found_clang}"; then
3574 found_clang=$as_dir/clang
3575 fi
3576 fi
3577 done
3578 IFS=$as_save_IFS
3579
3580 if test -n "$found_gcc" -a -n "$found_clang"
3581 then
3582 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3583 then
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3585$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3586 CC="$found_clang"
3587 CXX="$found_clang++"
3588 fi
3589
3590
3591 elif test -z "$found_gcc" -a -n "$found_clang"
3592 then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3594$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3595 CC="$found_clang"
3596 CXX="$found_clang++"
3597
3598 elif test -z "$found_gcc" -a -z "$found_clang"
3599 then
3600 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3601 if test -n "${found_clang}"
3602 then
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3604$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3605 CC="${found_clang}"
3606 CXX="`/usr/bin/xcrun -find clang++`"
3607
3608 # else: use default behaviour
3609 fi
3610 fi
3611 fi
3612fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003613ac_ext=c
3614ac_cpp='$CPP $CPPFLAGS'
3615ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3616ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3617ac_compiler_gnu=$ac_cv_c_compiler_gnu
3618if test -n "$ac_tool_prefix"; then
3619 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3620set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3622$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003623if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003625else
3626 if test -n "$CC"; then
3627 ac_cv_prog_CC="$CC" # Let the user override the test.
3628else
Martin v. Löwis11437992002-04-12 09:54:03 +00003629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3630for as_dir in $PATH
3631do
3632 IFS=$as_save_IFS
3633 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 $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 +00003638 break 2
3639 fi
3640done
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003642IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003643
Jack Jansendd19cf82001-12-06 22:36:17 +00003644fi
3645fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003646CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003647if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3649$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003650else
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3652$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
3654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655
Martin v. Löwis11437992002-04-12 09:54:03 +00003656fi
3657if test -z "$ac_cv_prog_CC"; then
3658 ac_ct_CC=$CC
3659 # Extract the first word of "gcc", so it can be a program name with args.
3660set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3662$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003663if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003665else
3666 if test -n "$ac_ct_CC"; then
3667 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3668else
3669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3670for as_dir in $PATH
3671do
3672 IFS=$as_save_IFS
3673 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003675 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003676 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 $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 +00003678 break 2
3679 fi
3680done
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003683
3684fi
3685fi
3686ac_ct_CC=$ac_cv_prog_ac_ct_CC
3687if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3689$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690else
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3692$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003693fi
3694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003695 if test "x$ac_ct_CC" = x; then
3696 CC=""
3697 else
3698 case $cross_compiling:$ac_tool_warned in
3699yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003700{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3701$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702ac_tool_warned=yes ;;
3703esac
3704 CC=$ac_ct_CC
3705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003706else
3707 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003708fi
3709
Jack Jansendd19cf82001-12-06 22:36:17 +00003710if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711 if test -n "$ac_tool_prefix"; then
3712 # 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 +00003713set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3715$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003716if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003718else
3719 if test -n "$CC"; then
3720 ac_cv_prog_CC="$CC" # Let the user override the test.
3721else
Martin v. Löwis11437992002-04-12 09:54:03 +00003722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3723for as_dir in $PATH
3724do
3725 IFS=$as_save_IFS
3726 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 $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 +00003731 break 2
3732 fi
3733done
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003736
3737fi
3738fi
3739CC=$ac_cv_prog_CC
3740if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3742$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743else
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003746fi
3747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003750fi
3751if test -z "$CC"; then
3752 # Extract the first word of "cc", so it can be a program name with args.
3753set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3755$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003756if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003758else
3759 if test -n "$CC"; then
3760 ac_cv_prog_CC="$CC" # Let the user override the test.
3761else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3764for as_dir in $PATH
3765do
3766 IFS=$as_save_IFS
3767 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3771 ac_prog_rejected=yes
3772 continue
3773 fi
3774 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 break 2
3777 fi
3778done
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003781
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782if test $ac_prog_rejected = yes; then
3783 # We found a bogon in the path, so make sure we never use it.
3784 set dummy $ac_cv_prog_CC
3785 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787 # We chose a different compiler from the bogus one.
3788 # However, it has the same basename, so the bogon will be chosen
3789 # first if we set CC to just the basename; use the full file name.
3790 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003791 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003792 fi
3793fi
3794fi
3795fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003796CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003797if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3799$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003800else
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3802$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003803fi
3804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805
Martin v. Löwis11437992002-04-12 09:54:03 +00003806fi
3807if test -z "$CC"; then
3808 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 do
3811 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3812set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3814$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003815if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003817else
3818 if test -n "$CC"; then
3819 ac_cv_prog_CC="$CC" # Let the user override the test.
3820else
Martin v. Löwis11437992002-04-12 09:54:03 +00003821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3822for as_dir in $PATH
3823do
3824 IFS=$as_save_IFS
3825 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 $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 +00003830 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003831 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003832done
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003835
3836fi
3837fi
3838CC=$ac_cv_prog_CC
3839if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3841$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003842else
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3844$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003845fi
3846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 test -n "$CC" && break
3849 done
3850fi
3851if test -z "$CC"; then
3852 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003854do
3855 # Extract the first word of "$ac_prog", so it can be a program name with args.
3856set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3858$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003859if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003861else
3862 if test -n "$ac_ct_CC"; then
3863 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3864else
3865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3866for as_dir in $PATH
3867do
3868 IFS=$as_save_IFS
3869 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003870 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003871 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003872 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003873 $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 +00003874 break 2
3875 fi
3876done
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003879
Martin v. Löwis11437992002-04-12 09:54:03 +00003880fi
3881fi
3882ac_ct_CC=$ac_cv_prog_ac_ct_CC
3883if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3885$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003886else
Matthias Kloseb9621712010-04-24 17:59:49 +00003887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3888$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003889fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891
Martin v. Löwis11437992002-04-12 09:54:03 +00003892 test -n "$ac_ct_CC" && break
3893done
Michael W. Hudson54241132001-12-07 15:38:26 +00003894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895 if test "x$ac_ct_CC" = x; then
3896 CC=""
3897 else
3898 case $cross_compiling:$ac_tool_warned in
3899yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003900{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3901$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902ac_tool_warned=yes ;;
3903esac
3904 CC=$ac_ct_CC
3905 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003906fi
3907
3908fi
3909
3910
Matthias Kloseb9621712010-04-24 17:59:49 +00003911test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3912$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003913as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003914See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003915
3916# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003917$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3918set X $ac_compile
3919ac_compiler=$2
3920for ac_option in --version -v -V -qversion; do
3921 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922case "(($ac_try" in
3923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3924 *) ac_try_echo=$ac_try;;
3925esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3927$as_echo "$ac_try_echo"; } >&5
3928 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003930 if test -s conftest.err; then
3931 sed '10a\
3932... rest of stderr output deleted ...
3933 10q' conftest.err >conftest.er1
3934 cat conftest.er1 >&5
3935 fi
3936 rm -f conftest.er1 conftest.err
3937 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3938 test $ac_status = 0; }
3939done
Martin v. Löwis11437992002-04-12 09:54:03 +00003940
Matthias Kloseb9621712010-04-24 17:59:49 +00003941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003942/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003943
Martin v. Löwis11437992002-04-12 09:54:03 +00003944int
3945main ()
3946{
3947
3948 ;
3949 return 0;
3950}
3951_ACEOF
3952ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003953ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003954# Try to create an executable without -o first, disregard a.out.
3955# It will help us diagnose broken compilers, and finding out an intuition
3956# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3958$as_echo_n "checking whether the C compiler works... " >&6; }
3959ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3960
3961# The possible output files:
3962ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964ac_rmfiles=
3965for ac_file in $ac_files
3966do
3967 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3970 esac
3971done
3972rm -f $ac_rmfiles
3973
Matthias Kloseb9621712010-04-24 17:59:49 +00003974if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975case "(($ac_try" in
3976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3977 *) ac_try_echo=$ac_try;;
3978esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003979eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3980$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003982 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003983 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3984 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3986# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3987# in a Makefile. We should not override ac_cv_exeext if it was cached,
3988# so that the user can short-circuit this test for compilers unknown to
3989# Autoconf.
3990for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003991do
3992 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003993 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003994 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003995 ;;
3996 [ab].out )
3997 # We found the default executable, but exeext='' is most
3998 # certainly right.
3999 break;;
4000 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004001 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002 then :; else
4003 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4004 fi
4005 # We set ac_cv_exeext here because the later test for it is not
4006 # safe: cross compilers may not add the suffix if given an `-o'
4007 # argument, so we may need to know it at that point already.
4008 # Even if this section looks crufty: it has the advantage of
4009 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010 break;;
4011 * )
4012 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004013 esac
4014done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004015test "$ac_cv_exeext" = no && ac_cv_exeext=
4016
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004017else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018 ac_file=''
4019fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004020if test -z "$ac_file"; then :
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4022$as_echo "no" >&6; }
4023$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004024sed 's/^/| /' conftest.$ac_ext >&5
4025
Matthias Kloseb9621712010-04-24 17:59:49 +00004026{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004028as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004029See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004030else
4031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4032$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4035$as_echo_n "checking for C compiler default output file name... " >&6; }
4036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4037$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004038ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004039
Matthias Kloseb9621712010-04-24 17:59:49 +00004040rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004041ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4043$as_echo_n "checking for suffix of executables... " >&6; }
4044if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004045case "(($ac_try" in
4046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4047 *) ac_try_echo=$ac_try;;
4048esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004049eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4050$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004051 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004052 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4054 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004055 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4056# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4057# work properly (i.e., refer to `conftest.exe'), while it won't with
4058# `rm'.
4059for ac_file in conftest.exe conftest conftest.*; do
4060 test -f "$ac_file" || continue
4061 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004062 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004063 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4064 break;;
4065 * ) break;;
4066 esac
4067done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004068else
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004071as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004072See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004074rm -f conftest conftest$ac_cv_exeext
4075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4076$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004077
4078rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004079EXEEXT=$ac_cv_exeext
4080ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4082/* end confdefs.h. */
4083#include <stdio.h>
4084int
4085main ()
4086{
4087FILE *f = fopen ("conftest.out", "w");
4088 return ferror (f) || fclose (f) != 0;
4089
4090 ;
4091 return 0;
4092}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004094ac_clean_files="$ac_clean_files conftest.out"
4095# Check that the compiler produces executables we can run. If not, either
4096# the compiler is broken, or we cross compile.
4097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4098$as_echo_n "checking whether we are cross compiling... " >&6; }
4099if test "$cross_compiling" != yes; then
4100 { { ac_try="$ac_link"
4101case "(($ac_try" in
4102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4103 *) ac_try_echo=$ac_try;;
4104esac
4105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4106$as_echo "$ac_try_echo"; } >&5
4107 (eval "$ac_link") 2>&5
4108 ac_status=$?
4109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4110 test $ac_status = 0; }
4111 if { ac_try='./conftest$ac_cv_exeext'
4112 { { case "(($ac_try" in
4113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4114 *) ac_try_echo=$ac_try;;
4115esac
4116eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4117$as_echo "$ac_try_echo"; } >&5
4118 (eval "$ac_try") 2>&5
4119 ac_status=$?
4120 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4121 test $ac_status = 0; }; }; then
4122 cross_compiling=no
4123 else
4124 if test "$cross_compiling" = maybe; then
4125 cross_compiling=yes
4126 else
4127 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4128$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004129as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004130If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004131See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 fi
4133 fi
4134fi
4135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4136$as_echo "$cross_compiling" >&6; }
4137
4138rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4139ac_clean_files=$ac_clean_files_save
4140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4141$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004142if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 $as_echo_n "(cached) " >&6
4144else
4145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004146/* end confdefs.h. */
4147
4148int
4149main ()
4150{
4151
4152 ;
4153 return 0;
4154}
4155_ACEOF
4156rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004157if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158case "(($ac_try" in
4159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4160 *) ac_try_echo=$ac_try;;
4161esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004162eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4163$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004164 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4167 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168 for ac_file in conftest.o conftest.obj conftest.*; do
4169 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004170 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4173 break;;
4174 esac
4175done
4176else
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004178sed 's/^/| /' conftest.$ac_ext >&5
4179
Matthias Kloseb9621712010-04-24 17:59:49 +00004180{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4181$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004182as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004183See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004184fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004185rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4188$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004189OBJEXT=$ac_cv_objext
4190ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4192$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004193if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004195else
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004198
Martin v. Löwis11437992002-04-12 09:54:03 +00004199int
4200main ()
4201{
4202#ifndef __GNUC__
4203 choke me
4204#endif
4205
4206 ;
4207 return 0;
4208}
4209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004210if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004211 ac_compiler_gnu=yes
4212else
Matthias Kloseb9621712010-04-24 17:59:49 +00004213 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004216ac_cv_c_compiler_gnu=$ac_compiler_gnu
4217
4218fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4220$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4221if test $ac_compiler_gnu = yes; then
4222 GCC=yes
4223else
4224 GCC=
4225fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004226ac_test_CFLAGS=${CFLAGS+set}
4227ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4229$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004230if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004232else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233 ac_save_c_werror_flag=$ac_c_werror_flag
4234 ac_c_werror_flag=yes
4235 ac_cv_prog_cc_g=no
4236 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004239
Martin v. Löwis11437992002-04-12 09:54:03 +00004240int
4241main ()
4242{
4243
4244 ;
4245 return 0;
4246}
4247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004248if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004249 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004250else
Matthias Kloseb9621712010-04-24 17:59:49 +00004251 CFLAGS=""
4252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253/* end confdefs.h. */
4254
4255int
4256main ()
4257{
4258
4259 ;
4260 return 0;
4261}
4262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004263if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264
Matthias Kloseb9621712010-04-24 17:59:49 +00004265else
4266 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269/* end confdefs.h. */
4270
4271int
4272main ()
4273{
4274
4275 ;
4276 return 0;
4277}
4278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004279if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4287 ac_c_werror_flag=$ac_save_c_werror_flag
4288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4290$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004291if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004292 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004293elif test $ac_cv_prog_cc_g = yes; then
4294 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004295 CFLAGS="-g -O2"
4296 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004298 fi
4299else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004300 if test "$GCC" = yes; then
4301 CFLAGS="-O2"
4302 else
4303 CFLAGS=
4304 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4307$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004308if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004309 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004310else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004312ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004314/* end confdefs.h. */
4315#include <stdarg.h>
4316#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004317struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004318/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4319struct buf { int x; };
4320FILE * (*rcsopen) (struct buf *, struct stat *, int);
4321static char *e (p, i)
4322 char **p;
4323 int i;
4324{
4325 return p[i];
4326}
4327static char *f (char * (*g) (char **, int), char **p, ...)
4328{
4329 char *s;
4330 va_list v;
4331 va_start (v,p);
4332 s = g (p, va_arg (v,int));
4333 va_end (v);
4334 return s;
4335}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004336
4337/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4338 function prototypes and stuff, but not '\xHH' hex character constants.
4339 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004341 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4342 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004344int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4347 inside strings and character constants. */
4348#define FOO(x) 'x'
4349int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4350
Skip Montanaro6dead952003-09-25 14:50:04 +00004351int test (int i, double x);
4352struct s1 {int (*f) (int a);};
4353struct s2 {int (*f) (double a);};
4354int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4355int argc;
4356char **argv;
4357int
4358main ()
4359{
4360return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4361 ;
4362 return 0;
4363}
4364_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4366 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004367do
4368 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004369 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004372rm -f core conftest.err conftest.$ac_objext
4373 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004374done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004376CC=$ac_save_CC
4377
4378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379# AC_CACHE_VAL
4380case "x$ac_cv_prog_cc_c89" in
4381 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4383$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4386$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004387 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4390$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004391esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004392if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004393
Matthias Kloseb9621712010-04-24 17:59:49 +00004394fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004395
Martin v. Löwis11437992002-04-12 09:54:03 +00004396ac_ext=c
4397ac_cpp='$CPP $CPPFLAGS'
4398ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4399ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4400ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004401
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004402
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004403
4404
Matthias Kloseb9621712010-04-24 17:59:49 +00004405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4406$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004407
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004409if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004410 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004411
4412 case $withval in
4413 no) with_cxx_main=no
4414 MAINCC='$(CC)';;
4415 yes) with_cxx_main=yes
4416 MAINCC='$(CXX)';;
4417 *) with_cxx_main=yes
4418 MAINCC=$withval
4419 if test -z "$CXX"
4420 then
4421 CXX=$withval
4422 fi;;
4423 esac
4424else
4425
4426 with_cxx_main=no
4427 MAINCC='$(CC)'
4428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429fi
4430
Matthias Kloseb9621712010-04-24 17:59:49 +00004431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4432$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004433
4434preset_cxx="$CXX"
4435if test -z "$CXX"
4436then
4437 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004438 gcc) if test -n "$ac_tool_prefix"; then
4439 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4440set dummy ${ac_tool_prefix}g++; ac_word=$2
4441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4442$as_echo_n "checking for $ac_word... " >&6; }
4443if ${ac_cv_path_CXX+:} false; then :
4444 $as_echo_n "(cached) " >&6
4445else
4446 case $CXX in
4447 [\\/]* | ?:[\\/]*)
4448 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4449 ;;
4450 *)
4451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4452for as_dir in notfound
4453do
4454 IFS=$as_save_IFS
4455 test -z "$as_dir" && as_dir=.
4456 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004457 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004458 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4459 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4460 break 2
4461 fi
4462done
4463 done
4464IFS=$as_save_IFS
4465
4466 ;;
4467esac
4468fi
4469CXX=$ac_cv_path_CXX
4470if test -n "$CXX"; then
4471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4472$as_echo "$CXX" >&6; }
4473else
4474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4475$as_echo "no" >&6; }
4476fi
4477
4478
4479fi
4480if test -z "$ac_cv_path_CXX"; then
4481 ac_pt_CXX=$CXX
4482 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004483set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4485$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004486if ${ac_cv_path_ac_pt_CXX+:} false; then :
4487 $as_echo_n "(cached) " >&6
4488else
4489 case $ac_pt_CXX in
4490 [\\/]* | ?:[\\/]*)
4491 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4492 ;;
4493 *)
4494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4495for as_dir in notfound
4496do
4497 IFS=$as_save_IFS
4498 test -z "$as_dir" && as_dir=.
4499 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004500 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004501 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4502 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4503 break 2
4504 fi
4505done
4506 done
4507IFS=$as_save_IFS
4508
4509 ;;
4510esac
4511fi
4512ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4513if test -n "$ac_pt_CXX"; then
4514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4515$as_echo "$ac_pt_CXX" >&6; }
4516else
4517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4518$as_echo "no" >&6; }
4519fi
4520
4521 if test "x$ac_pt_CXX" = x; then
4522 CXX="g++"
4523 else
4524 case $cross_compiling:$ac_tool_warned in
4525yes:)
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4527$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4528ac_tool_warned=yes ;;
4529esac
4530 CXX=$ac_pt_CXX
4531 fi
4532else
4533 CXX="$ac_cv_path_CXX"
4534fi
4535 ;;
4536 cc) if test -n "$ac_tool_prefix"; then
4537 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4538set dummy ${ac_tool_prefix}c++; ac_word=$2
4539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4540$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004541if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004542 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004543else
4544 case $CXX in
4545 [\\/]* | ?:[\\/]*)
4546 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4547 ;;
4548 *)
4549 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4550for as_dir in notfound
4551do
4552 IFS=$as_save_IFS
4553 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004554 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004555 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004556 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004557 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004558 break 2
4559 fi
4560done
Matthias Kloseb9621712010-04-24 17:59:49 +00004561 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004562IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004563
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004564 ;;
4565esac
4566fi
4567CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004568if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4570$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004571else
Matthias Kloseb9621712010-04-24 17:59:49 +00004572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4573$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004575
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004576
4577fi
4578if test -z "$ac_cv_path_CXX"; then
4579 ac_pt_CXX=$CXX
4580 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004581set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4583$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004584if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004585 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004586else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004587 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004588 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004589 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 +00004590 ;;
4591 *)
4592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4593for as_dir in notfound
4594do
4595 IFS=$as_save_IFS
4596 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004597 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004598 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004599 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004600 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004601 break 2
4602 fi
4603done
Matthias Kloseb9621712010-04-24 17:59:49 +00004604 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004605IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004606
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004607 ;;
4608esac
4609fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004610ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4611if test -n "$ac_pt_CXX"; then
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4613$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004614else
Matthias Kloseb9621712010-04-24 17:59:49 +00004615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4616$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004618
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004619 if test "x$ac_pt_CXX" = x; then
4620 CXX="c++"
4621 else
4622 case $cross_compiling:$ac_tool_warned in
4623yes:)
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4625$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4626ac_tool_warned=yes ;;
4627esac
4628 CXX=$ac_pt_CXX
4629 fi
4630else
4631 CXX="$ac_cv_path_CXX"
4632fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004633 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004634 clang|*/clang) if test -n "$ac_tool_prefix"; then
4635 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4636set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4638$as_echo_n "checking for $ac_word... " >&6; }
4639if ${ac_cv_path_CXX+:} false; then :
4640 $as_echo_n "(cached) " >&6
4641else
4642 case $CXX in
4643 [\\/]* | ?:[\\/]*)
4644 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4645 ;;
4646 *)
4647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4648for as_dir in notfound
4649do
4650 IFS=$as_save_IFS
4651 test -z "$as_dir" && as_dir=.
4652 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004654 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4656 break 2
4657 fi
4658done
4659 done
4660IFS=$as_save_IFS
4661
Ned Deilycbfb9a52012-06-23 16:02:19 -07004662 ;;
4663esac
4664fi
4665CXX=$ac_cv_path_CXX
4666if test -n "$CXX"; then
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4668$as_echo "$CXX" >&6; }
4669else
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671$as_echo "no" >&6; }
4672fi
4673
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004674
4675fi
4676if test -z "$ac_cv_path_CXX"; then
4677 ac_pt_CXX=$CXX
4678 # Extract the first word of "clang++", so it can be a program name with args.
4679set dummy clang++; ac_word=$2
4680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4681$as_echo_n "checking for $ac_word... " >&6; }
4682if ${ac_cv_path_ac_pt_CXX+:} false; then :
4683 $as_echo_n "(cached) " >&6
4684else
4685 case $ac_pt_CXX in
4686 [\\/]* | ?:[\\/]*)
4687 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4688 ;;
4689 *)
4690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691for as_dir in notfound
4692do
4693 IFS=$as_save_IFS
4694 test -z "$as_dir" && as_dir=.
4695 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004697 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699 break 2
4700 fi
4701done
4702 done
4703IFS=$as_save_IFS
4704
4705 ;;
4706esac
4707fi
4708ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4709if test -n "$ac_pt_CXX"; then
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4711$as_echo "$ac_pt_CXX" >&6; }
4712else
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714$as_echo "no" >&6; }
4715fi
4716
4717 if test "x$ac_pt_CXX" = x; then
4718 CXX="clang++"
4719 else
4720 case $cross_compiling:$ac_tool_warned in
4721yes:)
4722{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4723$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4724ac_tool_warned=yes ;;
4725esac
4726 CXX=$ac_pt_CXX
4727 fi
4728else
4729 CXX="$ac_cv_path_CXX"
4730fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004731 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004732 esac
4733 if test "$CXX" = "notfound"
4734 then
4735 CXX=""
4736 fi
4737fi
4738if test -z "$CXX"
4739then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004740 if test -n "$ac_tool_prefix"; then
4741 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4742 do
4743 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4744set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4746$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004747if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749else
4750 if test -n "$CXX"; then
4751 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4752else
4753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4754for as_dir in $PATH
4755do
4756 IFS=$as_save_IFS
4757 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004760 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004761 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004762 break 2
4763 fi
4764done
Matthias Kloseb9621712010-04-24 17:59:49 +00004765 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004766IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767
4768fi
4769fi
4770CXX=$ac_cv_prog_CXX
4771if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4773$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004774else
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4776$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004777fi
4778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004779
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004780 test -n "$CXX" && break
4781 done
4782fi
4783if test -z "$CXX"; then
4784 ac_ct_CXX=$CXX
4785 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4786do
4787 # Extract the first word of "$ac_prog", so it can be a program name with args.
4788set dummy $ac_prog; ac_word=$2
4789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4790$as_echo_n "checking for $ac_word... " >&6; }
4791if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4792 $as_echo_n "(cached) " >&6
4793else
4794 if test -n "$ac_ct_CXX"; then
4795 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4796else
4797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4798for as_dir in $PATH
4799do
4800 IFS=$as_save_IFS
4801 test -z "$as_dir" && as_dir=.
4802 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004804 ac_cv_prog_ac_ct_CXX="$ac_prog"
4805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4806 break 2
4807 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004809 done
4810IFS=$as_save_IFS
4811
4812fi
4813fi
4814ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4815if test -n "$ac_ct_CXX"; then
4816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4817$as_echo "$ac_ct_CXX" >&6; }
4818else
4819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4820$as_echo "no" >&6; }
4821fi
4822
4823
4824 test -n "$ac_ct_CXX" && break
4825done
4826
4827 if test "x$ac_ct_CXX" = x; then
4828 CXX="notfound"
4829 else
4830 case $cross_compiling:$ac_tool_warned in
4831yes:)
4832{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4833$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4834ac_tool_warned=yes ;;
4835esac
4836 CXX=$ac_ct_CXX
4837 fi
4838fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004839
4840 if test "$CXX" = "notfound"
4841 then
4842 CXX=""
4843 fi
4844fi
4845if test "$preset_cxx" != "$CXX"
4846then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004847 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004848
4849 By default, distutils will build C++ extension modules with \"$CXX\".
4850 If this is not intended, then set CXX on the configure command line.
4851 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004852$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004853
4854 By default, distutils will build C++ extension modules with \"$CXX\".
4855 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004856 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857fi
4858
4859
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4861$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4862save_LDFLAGS="$LDFLAGS"
4863LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004864
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4866/* end confdefs.h. */
4867
4868int
4869main ()
4870{
4871
4872 ;
4873 return 0;
4874}
4875_ACEOF
4876if ac_fn_c_try_link "$LINENO"; then :
4877 NO_AS_NEEDED="-Wl,--no-as-needed"
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4879$as_echo "yes" >&6; }
4880else
4881 NO_AS_NEEDED=""
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4883$as_echo "no" >&6; }
4884fi
4885rm -f core conftest.err conftest.$ac_objext \
4886 conftest$ac_exeext conftest.$ac_ext
4887LDFLAGS="$save_LDFLAGS"
4888
4889
4890
4891# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004892ac_ext=c
4893ac_cpp='$CPP $CPPFLAGS'
4894ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4895ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4896ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4898$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004899# On Suns, sometimes $CPP names a directory.
4900if test -n "$CPP" && test -d "$CPP"; then
4901 CPP=
4902fi
4903if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004904 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004905 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004906else
Martin v. Löwis11437992002-04-12 09:54:03 +00004907 # Double quotes because CPP needs to be expanded
4908 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4909 do
4910 ac_preproc_ok=false
4911for ac_c_preproc_warn_flag in '' yes
4912do
4913 # Use a header file that comes with gcc, so configuring glibc
4914 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004915 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4916 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004917 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004918 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004920/* end confdefs.h. */
4921#ifdef __STDC__
4922# include <limits.h>
4923#else
4924# include <assert.h>
4925#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004926 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004928if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004929
Matthias Kloseb9621712010-04-24 17:59:49 +00004930else
Martin v. Löwis11437992002-04-12 09:54:03 +00004931 # Broken: fails on valid input.
4932continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004933fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004934rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004936 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004937 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004940#include <ac_nonexistent.h>
4941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004942if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004943 # Broken: success on invalid input.
4944continue
4945else
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 # Passes both tests.
4947ac_preproc_ok=:
4948break
4949fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004950rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004951
4952done
4953# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004954rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004955if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004956 break
4957fi
4958
4959 done
4960 ac_cv_prog_CPP=$CPP
4961
4962fi
4963 CPP=$ac_cv_prog_CPP
4964else
4965 ac_cv_prog_CPP=$CPP
4966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4968$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004969ac_preproc_ok=false
4970for ac_c_preproc_warn_flag in '' yes
4971do
4972 # Use a header file that comes with gcc, so configuring glibc
4973 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004974 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4975 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004976 # On the NeXT, cc -E runs the code through the compiler's parser,
4977 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004979/* end confdefs.h. */
4980#ifdef __STDC__
4981# include <limits.h>
4982#else
4983# include <assert.h>
4984#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004985 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004987if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004988
Matthias Kloseb9621712010-04-24 17:59:49 +00004989else
Martin v. Löwis11437992002-04-12 09:54:03 +00004990 # Broken: fails on valid input.
4991continue
4992fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004993rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004995 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004996 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004999#include <ac_nonexistent.h>
5000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005001if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00005002 # Broken: success on invalid input.
5003continue
5004else
Martin v. Löwis11437992002-04-12 09:54:03 +00005005 # Passes both tests.
5006ac_preproc_ok=:
5007break
5008fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005009rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005010
5011done
5012# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005013rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005014if $ac_preproc_ok; then :
5015
Martin v. Löwis11437992002-04-12 09:54:03 +00005016else
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005019as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005020See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005021fi
5022
5023ac_ext=c
5024ac_cpp='$CPP $CPPFLAGS'
5025ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5026ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5027ac_compiler_gnu=$ac_cv_c_compiler_gnu
5028
5029
Matthias Kloseb9621712010-04-24 17:59:49 +00005030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5031$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005032if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005034else
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005036 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 # Loop through the user's path and test for each of PROGNAME-LIST
5038 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005039for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5040do
5041 IFS=$as_save_IFS
5042 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 for ac_prog in grep ggrep; do
5044 for ac_exec_ext in '' $ac_executable_extensions; do
5045 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005046 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005047# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048 # Check for GNU $ac_path_GREP
5049case `"$ac_path_GREP" --version 2>&1` in
5050*GNU*)
5051 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5052*)
5053 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005055 while :
5056 do
5057 cat "conftest.in" "conftest.in" >"conftest.tmp"
5058 mv "conftest.tmp" "conftest.in"
5059 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005061 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5062 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5065 # Best one so far, save it but keep looking for a better one
5066 ac_cv_path_GREP="$ac_path_GREP"
5067 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005068 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069 # 10*(2^10) chars as input seems more than enough
5070 test $ac_count -gt 10 && break
5071 done
5072 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5073esac
5074
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 $ac_path_GREP_found && break 3
5076 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005079IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005081 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 +00005082 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005083else
5084 ac_cv_path_GREP=$GREP
5085fi
5086
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5089$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005090 GREP="$ac_cv_path_GREP"
5091
5092
Matthias Kloseb9621712010-04-24 17:59:49 +00005093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5094$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005095if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005097else
5098 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5099 then ac_cv_path_EGREP="$GREP -E"
5100 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005101 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005102 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 # Loop through the user's path and test for each of PROGNAME-LIST
5104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005105for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5106do
5107 IFS=$as_save_IFS
5108 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 for ac_prog in egrep; do
5110 for ac_exec_ext in '' $ac_executable_extensions; do
5111 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005112 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005113# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005114 # Check for GNU $ac_path_EGREP
5115case `"$ac_path_EGREP" --version 2>&1` in
5116*GNU*)
5117 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5118*)
5119 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005121 while :
5122 do
5123 cat "conftest.in" "conftest.in" >"conftest.tmp"
5124 mv "conftest.tmp" "conftest.in"
5125 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005127 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5128 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005130 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5131 # Best one so far, save it but keep looking for a better one
5132 ac_cv_path_EGREP="$ac_path_EGREP"
5133 ac_path_EGREP_max=$ac_count
5134 fi
5135 # 10*(2^10) chars as input seems more than enough
5136 test $ac_count -gt 10 && break
5137 done
5138 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5139esac
5140
Matthias Kloseb9621712010-04-24 17:59:49 +00005141 $ac_path_EGREP_found && break 3
5142 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005143 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005144 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005145IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005146 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005147 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 +00005148 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005149else
5150 ac_cv_path_EGREP=$EGREP
5151fi
5152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005153 fi
5154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5156$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005157 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005158
5159
Matthias Kloseb9621712010-04-24 17:59:49 +00005160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5161$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005162if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005163 $as_echo_n "(cached) " >&6
5164else
5165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005166/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005167#include <stdlib.h>
5168#include <stdarg.h>
5169#include <string.h>
5170#include <float.h>
5171
5172int
5173main ()
5174{
5175
5176 ;
5177 return 0;
5178}
5179_ACEOF
5180if ac_fn_c_try_compile "$LINENO"; then :
5181 ac_cv_header_stdc=yes
5182else
5183 ac_cv_header_stdc=no
5184fi
5185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5186
5187if test $ac_cv_header_stdc = yes; then
5188 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5190/* end confdefs.h. */
5191#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005192
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005193_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005194if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005195 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005196
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005197else
Matthias Kloseb9621712010-04-24 17:59:49 +00005198 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005199fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005200rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005201
Matthias Kloseb9621712010-04-24 17:59:49 +00005202fi
5203
5204if test $ac_cv_header_stdc = yes; then
5205 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5207/* end confdefs.h. */
5208#include <stdlib.h>
5209
5210_ACEOF
5211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5212 $EGREP "free" >/dev/null 2>&1; then :
5213
5214else
5215 ac_cv_header_stdc=no
5216fi
5217rm -f conftest*
5218
5219fi
5220
5221if test $ac_cv_header_stdc = yes; then
5222 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5223 if test "$cross_compiling" = yes; then :
5224 :
5225else
5226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5227/* end confdefs.h. */
5228#include <ctype.h>
5229#include <stdlib.h>
5230#if ((' ' & 0x0FF) == 0x020)
5231# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5232# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5233#else
5234# define ISLOWER(c) \
5235 (('a' <= (c) && (c) <= 'i') \
5236 || ('j' <= (c) && (c) <= 'r') \
5237 || ('s' <= (c) && (c) <= 'z'))
5238# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5239#endif
5240
5241#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5242int
5243main ()
5244{
5245 int i;
5246 for (i = 0; i < 256; i++)
5247 if (XOR (islower (i), ISLOWER (i))
5248 || toupper (i) != TOUPPER (i))
5249 return 2;
5250 return 0;
5251}
5252_ACEOF
5253if ac_fn_c_try_run "$LINENO"; then :
5254
5255else
5256 ac_cv_header_stdc=no
5257fi
5258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5259 conftest.$ac_objext conftest.beam conftest.$ac_ext
5260fi
5261
5262fi
5263fi
5264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5265$as_echo "$ac_cv_header_stdc" >&6; }
5266if test $ac_cv_header_stdc = yes; then
5267
5268$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5269
5270fi
5271
5272# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5273for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5274 inttypes.h stdint.h unistd.h
5275do :
5276 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5277ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5278"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005279if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005280 cat >>confdefs.h <<_ACEOF
5281#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5282_ACEOF
5283
5284fi
5285
5286done
5287
5288
5289
5290 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 +02005291if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005292 MINIX=yes
5293else
5294 MINIX=
5295fi
5296
5297
5298 if test "$MINIX" = yes; then
5299
5300$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5301
5302
5303$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5304
5305
5306$as_echo "#define _MINIX 1" >>confdefs.h
5307
5308 fi
5309
5310
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5312$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005313if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005314 $as_echo_n "(cached) " >&6
5315else
5316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5317/* end confdefs.h. */
5318
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005319# define __EXTENSIONS__ 1
5320 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005321int
5322main ()
5323{
5324
5325 ;
5326 return 0;
5327}
5328_ACEOF
5329if ac_fn_c_try_compile "$LINENO"; then :
5330 ac_cv_safe_to_define___extensions__=yes
5331else
5332 ac_cv_safe_to_define___extensions__=no
5333fi
5334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5335fi
5336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5337$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5338 test $ac_cv_safe_to_define___extensions__ = yes &&
5339 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5340
5341 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5342
5343 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5344
5345 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5346
5347 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5348
5349
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005350
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005351# Check for unsupported systems
5352case $ac_sys_system/$ac_sys_release in
5353atheos*|Linux*/1*)
5354 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5355 echo See README for details.
5356 exit 1;;
5357esac
5358
5359
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5361$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362
5363# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005364if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365 withval=$with_suffix;
5366 case $withval in
5367 no) EXEEXT=;;
5368 yes) EXEEXT=.exe;;
5369 *) EXEEXT=$withval;;
5370 esac
5371fi
5372
Matthias Kloseb9621712010-04-24 17:59:49 +00005373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5374$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375
5376# Test whether we're running on a non-case-sensitive system, in which
5377# case we give a warning if no ext is given
5378
Matthias Kloseb9621712010-04-24 17:59:49 +00005379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5380$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005381if test ! -d CaseSensitiveTestDir; then
5382mkdir CaseSensitiveTestDir
5383fi
5384
5385if test -d casesensitivetestdir
5386then
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5388$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389 BUILDEXEEXT=.exe
5390else
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5392$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393 BUILDEXEEXT=$EXEEXT
5394fi
5395rmdir CaseSensitiveTestDir
5396
5397case $MACHDEP in
5398bsdos*)
5399 case $CC in
5400 gcc) CC="$CC -D_HAVE_BSDI";;
5401 esac;;
5402esac
5403
5404case $ac_sys_system in
5405hp*|HP*)
5406 case $CC in
5407 cc|*/cc) CC="$CC -Ae";;
5408 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005409esac
5410
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005411MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5412
5413
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414
5415
Matthias Kloseb9621712010-04-24 17:59:49 +00005416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5417$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418if test -z "$LIBRARY"
5419then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005420 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5423$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424
5425# LDLIBRARY is the name of the library to link against (as opposed to the
5426# name of the library into which to insert object files). BLDLIBRARY is also
5427# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5428# is blank as the main program is not linked directly against LDLIBRARY.
5429# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5430# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5431# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5432# DLLLIBRARY is the shared (i.e., DLL) library.
5433#
5434# RUNSHARED is used to run shared python without installed libraries
5435#
5436# INSTSONAME is the name of the shared library that will be use to install
5437# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005438#
5439# LDVERSION is the shared library version number, normally the Python version
5440# with the ABI build flags appended.
5441
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442
5443
5444
5445
5446
5447
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005448
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449LDLIBRARY="$LIBRARY"
5450BLDLIBRARY='$(LDLIBRARY)'
5451INSTSONAME='$(LDLIBRARY)'
5452DLLLIBRARY=''
5453LDLIBRARYDIR=''
5454RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005455LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456
5457# LINKCC is the command that links the python executable -- default is $(CC).
5458# If CXX is set, and if it is needed to link a main function that was
5459# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5460# python might then depend on the C++ runtime
5461# This is altered for AIX in order to build the export list before
5462# linking.
5463
Matthias Kloseb9621712010-04-24 17:59:49 +00005464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5465$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005466if test -z "$LINKCC"
5467then
5468 LINKCC='$(PURIFY) $(MAINCC)'
5469 case $ac_sys_system in
5470 AIX*)
5471 exp_extra="\"\""
5472 if test $ac_sys_release -ge 5 -o \
5473 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5474 exp_extra="."
5475 fi
5476 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005477 QNX*)
5478 # qcc must be used because the other compilers do not
5479 # support -N.
5480 LINKCC=qcc;;
5481 esac
5482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5484$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485
5486# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5487# make sure we default having it set to "no": this is used by
5488# distutils.unixccompiler to know if it should add --enable-new-dtags
5489# to linker command lines, and failing to detect GNU ld simply results
5490# in the same bahaviour as before.
5491
Matthias Kloseb9621712010-04-24 17:59:49 +00005492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5493$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494ac_prog=ld
5495if test "$GCC" = yes; then
5496 ac_prog=`$CC -print-prog-name=ld`
5497fi
5498case `"$ac_prog" -V 2>&1 < /dev/null` in
5499 *GNU*)
5500 GNULD=yes;;
5501 *)
5502 GNULD=no;;
5503esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5505$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005506
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5508$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005509if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005510 $as_echo_n "(cached) " >&6
5511else
5512 ac_cv_c_inline=no
5513for ac_kw in inline __inline__ __inline; do
5514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5515/* end confdefs.h. */
5516#ifndef __cplusplus
5517typedef int foo_t;
5518static $ac_kw foo_t static_foo () {return 0; }
5519$ac_kw foo_t foo () {return 0; }
5520#endif
5521
5522_ACEOF
5523if ac_fn_c_try_compile "$LINENO"; then :
5524 ac_cv_c_inline=$ac_kw
5525fi
5526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5527 test "$ac_cv_c_inline" != no && break
5528done
5529
5530fi
5531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5532$as_echo "$ac_cv_c_inline" >&6; }
5533
5534case $ac_cv_c_inline in
5535 inline | yes) ;;
5536 *)
5537 case $ac_cv_c_inline in
5538 no) ac_val=;;
5539 *) ac_val=$ac_cv_c_inline;;
5540 esac
5541 cat >>confdefs.h <<_ACEOF
5542#ifndef __cplusplus
5543#define inline $ac_val
5544#endif
5545_ACEOF
5546 ;;
5547esac
5548
5549if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005550
5551$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005552
5553
5554fi
5555
5556
Matthias Kloseb9621712010-04-24 17:59:49 +00005557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5558$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005560if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005561 enableval=$enable_shared;
5562fi
5563
5564
5565if test -z "$enable_shared"
5566then
5567 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005568 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569 enable_shared="yes";;
5570 *)
5571 enable_shared="no";;
5572 esac
5573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5575$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005576
Matthias Kloseb9621712010-04-24 17:59:49 +00005577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5578$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005580if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005581 enableval=$enable_profiling;
5582fi
5583
5584if test "x$enable_profiling" = xyes; then
5585 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005586 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588/* end confdefs.h. */
5589int main() { return 0; }
5590_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005591if ac_fn_c_try_link "$LINENO"; then :
5592
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005593else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005594 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005596rm -f core conftest.err conftest.$ac_objext \
5597 conftest$ac_exeext conftest.$ac_ext
5598 CC="$ac_save_cc"
5599else
5600 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5603$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604
doko@ubuntu.comba015832012-06-30 16:52:05 +02005605if test "x$enable_profiling" = xyes; then
5606 BASECFLAGS="-pg $BASECFLAGS"
5607 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608fi
5609
Matthias Kloseb9621712010-04-24 17:59:49 +00005610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5611$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612
5613# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5614# library that we build, but we do not want to link against it (we
5615# will find it with a -framework option). For this reason there is an
5616# extra variable BLDLIBRARY against which Python and the extension
5617# modules are linked, BLDLIBRARY. This is normally the same as
5618# LDLIBRARY, but empty for MacOSX framework builds.
5619if test "$enable_framework"
5620then
5621 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005622 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623 BLDLIBRARY=''
5624else
5625 BLDLIBRARY='$(LDLIBRARY)'
5626fi
5627
5628# Other platforms follow
5629if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005630 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631
Matthias Kloseb9621712010-04-24 17:59:49 +00005632$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633
5634 case $ac_sys_system in
5635 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005636 LDLIBRARY='libpython$(LDVERSION).dll.a'
5637 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 ;;
5639 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005640 LDLIBRARY='libpython$(LDVERSION).so'
5641 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005642 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005644 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005645 then
5646 PY3LIBRARY=libpython3.so
5647 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005649 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005650 LDLIBRARY='libpython$(LDVERSION).so'
5651 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005652 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653 case $ac_sys_system in
5654 FreeBSD*)
5655 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5656 ;;
5657 esac
5658 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005659 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005660 then
5661 PY3LIBRARY=libpython3.so
5662 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663 ;;
5664 hp*|HP*)
5665 case `uname -m` in
5666 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005667 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668 ;;
5669 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005670 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 ;;
5672 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005673 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005674 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005677 LDLIBRARY='libpython$(LDVERSION).dylib'
5678 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005679 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005681 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005682 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005683 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005684 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685
5686 esac
5687else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005688 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689 case $ac_sys_system in
5690 CYGWIN*)
5691 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005692 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693 ;;
5694 esac
5695fi
5696
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005697if test "$cross_compiling" = yes; then
5698 RUNSHARED=
5699fi
5700
Matthias Kloseb9621712010-04-24 17:59:49 +00005701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5702$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703
5704if test -n "$ac_tool_prefix"; then
5705 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5706set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5708$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005709if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711else
5712 if test -n "$RANLIB"; then
5713 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5714else
5715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5716for as_dir in $PATH
5717do
5718 IFS=$as_save_IFS
5719 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005720 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005721 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005723 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724 break 2
5725 fi
5726done
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728IFS=$as_save_IFS
5729
5730fi
5731fi
5732RANLIB=$ac_cv_prog_RANLIB
5733if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5735$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736else
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739fi
5740
5741
5742fi
5743if test -z "$ac_cv_prog_RANLIB"; then
5744 ac_ct_RANLIB=$RANLIB
5745 # Extract the first word of "ranlib", so it can be a program name with args.
5746set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5748$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005749if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751else
5752 if test -n "$ac_ct_RANLIB"; then
5753 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5754else
5755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5756for as_dir in $PATH
5757do
5758 IFS=$as_save_IFS
5759 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005760 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764 break 2
5765 fi
5766done
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768IFS=$as_save_IFS
5769
5770fi
5771fi
5772ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5773if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5775$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776else
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5778$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779fi
5780
5781 if test "x$ac_ct_RANLIB" = x; then
5782 RANLIB=":"
5783 else
5784 case $cross_compiling:$ac_tool_warned in
5785yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005786{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5787$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788ac_tool_warned=yes ;;
5789esac
5790 RANLIB=$ac_ct_RANLIB
5791 fi
5792else
5793 RANLIB="$ac_cv_prog_RANLIB"
5794fi
5795
5796
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005797if test -n "$ac_tool_prefix"; then
5798 for ac_prog in ar aal
5799 do
5800 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5801set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5803$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005804if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005805 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806else
5807 if test -n "$AR"; then
5808 ac_cv_prog_AR="$AR" # Let the user override the test.
5809else
5810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5811for as_dir in $PATH
5812do
5813 IFS=$as_save_IFS
5814 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005815 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005816 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005817 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819 break 2
5820 fi
5821done
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823IFS=$as_save_IFS
5824
5825fi
5826fi
5827AR=$ac_cv_prog_AR
5828if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5830$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831else
Matthias Kloseb9621712010-04-24 17:59:49 +00005832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5833$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834fi
5835
5836
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005837 test -n "$AR" && break
5838 done
5839fi
5840if test -z "$AR"; then
5841 ac_ct_AR=$AR
5842 for ac_prog in ar aal
5843do
5844 # Extract the first word of "$ac_prog", so it can be a program name with args.
5845set dummy $ac_prog; ac_word=$2
5846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5847$as_echo_n "checking for $ac_word... " >&6; }
5848if ${ac_cv_prog_ac_ct_AR+:} false; then :
5849 $as_echo_n "(cached) " >&6
5850else
5851 if test -n "$ac_ct_AR"; then
5852 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5853else
5854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5855for as_dir in $PATH
5856do
5857 IFS=$as_save_IFS
5858 test -z "$as_dir" && as_dir=.
5859 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005860 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005861 ac_cv_prog_ac_ct_AR="$ac_prog"
5862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5863 break 2
5864 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005866 done
5867IFS=$as_save_IFS
5868
5869fi
5870fi
5871ac_ct_AR=$ac_cv_prog_ac_ct_AR
5872if test -n "$ac_ct_AR"; then
5873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5874$as_echo "$ac_ct_AR" >&6; }
5875else
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5877$as_echo "no" >&6; }
5878fi
5879
5880
5881 test -n "$ac_ct_AR" && break
5882done
5883
5884 if test "x$ac_ct_AR" = x; then
5885 AR="ar"
5886 else
5887 case $cross_compiling:$ac_tool_warned in
5888yes:)
5889{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5890$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5891ac_tool_warned=yes ;;
5892esac
5893 AR=$ac_ct_AR
5894 fi
5895fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896
5897
5898# tweak ARFLAGS only if the user didn't set it on the command line
5899
5900if test -z "$ARFLAGS"
5901then
5902 ARFLAGS="rc"
5903fi
5904
doko@ubuntu.com58844492012-06-30 18:25:32 +02005905if test -n "$ac_tool_prefix"; then
5906 for ac_prog in readelf
5907 do
5908 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5909set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5911$as_echo_n "checking for $ac_word... " >&6; }
5912if ${ac_cv_prog_READELF+:} false; then :
5913 $as_echo_n "(cached) " >&6
5914else
5915 if test -n "$READELF"; then
5916 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5917else
5918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5919for as_dir in $PATH
5920do
5921 IFS=$as_save_IFS
5922 test -z "$as_dir" && as_dir=.
5923 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005924 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005925 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5927 break 2
5928 fi
5929done
5930 done
5931IFS=$as_save_IFS
5932
5933fi
5934fi
5935READELF=$ac_cv_prog_READELF
5936if test -n "$READELF"; then
5937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5938$as_echo "$READELF" >&6; }
5939else
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5941$as_echo "no" >&6; }
5942fi
5943
5944
5945 test -n "$READELF" && break
5946 done
5947fi
5948if test -z "$READELF"; then
5949 ac_ct_READELF=$READELF
5950 for ac_prog in readelf
5951do
5952 # Extract the first word of "$ac_prog", so it can be a program name with args.
5953set dummy $ac_prog; ac_word=$2
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5955$as_echo_n "checking for $ac_word... " >&6; }
5956if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5957 $as_echo_n "(cached) " >&6
5958else
5959 if test -n "$ac_ct_READELF"; then
5960 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5961else
5962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963for as_dir in $PATH
5964do
5965 IFS=$as_save_IFS
5966 test -z "$as_dir" && as_dir=.
5967 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005968 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005969 ac_cv_prog_ac_ct_READELF="$ac_prog"
5970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5971 break 2
5972 fi
5973done
5974 done
5975IFS=$as_save_IFS
5976
5977fi
5978fi
5979ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5980if test -n "$ac_ct_READELF"; then
5981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5982$as_echo "$ac_ct_READELF" >&6; }
5983else
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5985$as_echo "no" >&6; }
5986fi
5987
5988
5989 test -n "$ac_ct_READELF" && break
5990done
5991
5992 if test "x$ac_ct_READELF" = x; then
5993 READELF=":"
5994 else
5995 case $cross_compiling:$ac_tool_warned in
5996yes:)
5997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5999ac_tool_warned=yes ;;
6000esac
6001 READELF=$ac_ct_READELF
6002 fi
6003fi
6004
6005if test "$cross_compiling" = yes; then
6006 case "$READELF" in
6007 readelf|:)
6008 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6009 ;;
6010 esac
6011fi
6012
6013
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014
Matthias Klosec4c48422012-10-21 23:05:35 +02006015for ac_prog in python$PACKAGE_VERSION python3 python
6016do
6017 # Extract the first word of "$ac_prog", so it can be a program name with args.
6018set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6020$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006021if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006022 $as_echo_n "(cached) " >&6
6023else
Matthias Klosec4c48422012-10-21 23:05:35 +02006024 if test -n "$PYTHON"; then
6025 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006026else
6027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6028for as_dir in $PATH
6029do
6030 IFS=$as_save_IFS
6031 test -z "$as_dir" && as_dir=.
6032 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006034 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6036 break 2
6037 fi
6038done
6039 done
6040IFS=$as_save_IFS
6041
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006042fi
6043fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006044PYTHON=$ac_cv_prog_PYTHON
6045if test -n "$PYTHON"; then
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6047$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006048else
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6050$as_echo "no" >&6; }
6051fi
6052
6053
Matthias Klosec4c48422012-10-21 23:05:35 +02006054 test -n "$PYTHON" && break
6055done
6056test -n "$PYTHON" || PYTHON="not-found"
6057
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006058if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006059 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6060else
6061 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006062fi
6063
6064
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065case $MACHDEP in
6066bsdos*|hp*|HP*)
6067 # install -d does not work on BSDI or HP-UX
6068 if test -z "$INSTALL"
6069 then
6070 INSTALL="${srcdir}/install-sh -c"
6071 fi
6072esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073# Find a good install program. We prefer a C program (faster),
6074# so one script is as good as another. But avoid the broken or
6075# incompatible versions:
6076# SysV /etc/install, /usr/sbin/install
6077# SunOS /usr/etc/install
6078# IRIX /sbin/install
6079# AIX /bin/install
6080# AmigaOS /C/install, which installs bootblocks on floppy discs
6081# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6082# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6083# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6084# OS/2's system install, which has a completely different semantic
6085# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006086# Reject install programs that cannot install multiple files.
6087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6088$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006090if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092else
6093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6094for as_dir in $PATH
6095do
6096 IFS=$as_save_IFS
6097 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 # Account for people who put trailing slashes in PATH elements.
6099case $as_dir/ in #((
6100 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006101 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006102 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103 /usr/ucb/* ) ;;
6104 *)
6105 # OSF1 and SCO ODT 3.0 have their own names for install.
6106 # Don't use installbsd from OSF since it installs stuff as root
6107 # by default.
6108 for ac_prog in ginstall scoinst install; do
6109 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006110 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006111 if test $ac_prog = install &&
6112 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6113 # AIX install. It has an incompatible calling convention.
6114 :
6115 elif test $ac_prog = install &&
6116 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6117 # program-specific install script used by HP pwplus--don't use.
6118 :
6119 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006120 rm -rf conftest.one conftest.two conftest.dir
6121 echo one > conftest.one
6122 echo two > conftest.two
6123 mkdir conftest.dir
6124 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6125 test -s conftest.one && test -s conftest.two &&
6126 test -s conftest.dir/conftest.one &&
6127 test -s conftest.dir/conftest.two
6128 then
6129 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6130 break 3
6131 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006132 fi
6133 fi
6134 done
6135 done
6136 ;;
6137esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006138
6139 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006140IFS=$as_save_IFS
6141
Matthias Kloseb9621712010-04-24 17:59:49 +00006142rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143
6144fi
6145 if test "${ac_cv_path_install+set}" = set; then
6146 INSTALL=$ac_cv_path_install
6147 else
6148 # As a last resort, use the slow shell script. Don't cache a
6149 # value for INSTALL within a source directory, because that will
6150 # break other packages using the cache if that directory is
6151 # removed, or if the value is a relative name.
6152 INSTALL=$ac_install_sh
6153 fi
6154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6156$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157
6158# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6159# It thinks the first close brace ends the variable substitution.
6160test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6161
6162test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6163
6164test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6165
Matthias Klose93a0ef12012-03-15 18:08:34 +01006166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6167$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6168if test -z "$MKDIR_P"; then
6169 if ${ac_cv_path_mkdir+:} false; then :
6170 $as_echo_n "(cached) " >&6
6171else
6172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6174do
6175 IFS=$as_save_IFS
6176 test -z "$as_dir" && as_dir=.
6177 for ac_prog in mkdir gmkdir; do
6178 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006179 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006180 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6181 'mkdir (GNU coreutils) '* | \
6182 'mkdir (coreutils) '* | \
6183 'mkdir (fileutils) '4.1*)
6184 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6185 break 3;;
6186 esac
6187 done
6188 done
6189 done
6190IFS=$as_save_IFS
6191
6192fi
6193
6194 test -d ./--version && rmdir ./--version
6195 if test "${ac_cv_path_mkdir+set}" = set; then
6196 MKDIR_P="$ac_cv_path_mkdir -p"
6197 else
6198 # As a last resort, use the slow shell script. Don't cache a
6199 # value for MKDIR_P within a source directory, because that will
6200 # break other packages using the cache if that directory is
6201 # removed, or if the value is a relative name.
6202 MKDIR_P="$ac_install_sh -d"
6203 fi
6204fi
6205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6206$as_echo "$MKDIR_P" >&6; }
6207
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208
6209# Not every filesystem supports hard links
6210
6211if test -z "$LN" ; then
6212 case $ac_sys_system in
6213 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214 *) LN=ln;;
6215 esac
6216fi
6217
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006218# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006219
6220ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006221
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006222# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6224$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225
6226# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006227if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228 withval=$with_pydebug;
6229if test "$withval" != no
6230then
6231
Matthias Kloseb9621712010-04-24 17:59:49 +00006232$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233
Matthias Kloseb9621712010-04-24 17:59:49 +00006234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6235$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006237 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006238else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6239$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240fi
6241else
Matthias Kloseb9621712010-04-24 17:59:49 +00006242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6243$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244fi
6245
6246
6247# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6248# merged with this chunk of code?
6249
6250# Optimizer/debugger flags
6251# ------------------------
6252# (The following bit of code is complicated enough - please keep things
6253# indented properly. Just pretend you're editing Python code. ;-)
6254
6255# There are two parallel sets of case statements below, one that checks to
6256# see if OPT was set and one that does BASECFLAGS setting based upon
6257# compiler and platform. BASECFLAGS tweaks need to be made even if the
6258# user set OPT.
6259
6260# tweak OPT based on compiler and platform, only if the user didn't set
6261# it on the command line
6262
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006263if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264then
6265 case $GCC in
6266 yes)
6267 if test "$CC" != 'g++' ; then
6268 STRICT_PROTO="-Wstrict-prototypes"
6269 fi
6270 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6271 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6272 WRAP="-fwrapv"
6273 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006274
6275 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006276 case $CC in
6277 *clang*) WRAP="-fwrapv"
6278 ;;
6279 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006280
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281 case $ac_cv_prog_cc_g in
6282 yes)
6283 if test "$Py_DEBUG" = 'true' ; then
6284 # Optimization messes up debuggers, so turn it off for
6285 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006286 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287 else
6288 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6289 fi
6290 ;;
6291 *)
6292 OPT="-O3 -Wall $STRICT_PROTO"
6293 ;;
6294 esac
6295 case $ac_sys_system in
6296 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6297 ;;
6298 esac
6299 ;;
6300
6301 *)
6302 OPT="-O"
6303 ;;
6304 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305fi
6306
6307
6308
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006309
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310# The -arch flags for universal builds on OSX
6311UNIVERSAL_ARCH_FLAGS=
6312
6313
6314# tweak BASECFLAGS based on compiler and platform
6315case $GCC in
6316yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006317 # Python doesn't violate C99 aliasing rules, but older versions of
6318 # GCC produce warnings for legal Python code. Enable
6319 # -fno-strict-aliasing on versions of GCC that support but produce
6320 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6322$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006323 ac_save_cc="$CC"
6324 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006325 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006326 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006328else
Matthias Kloseb9621712010-04-24 17:59:49 +00006329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006331
Matthias Kloseb159a552010-04-25 21:00:44 +00006332
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006333int
6334main ()
6335{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006336
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006337 ;
6338 return 0;
6339}
Matthias Kloseb159a552010-04-25 21:00:44 +00006340
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006342if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006343
6344 CC="$ac_save_cc -fstrict-aliasing"
6345 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006347/* end confdefs.h. */
6348
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006349 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006350int
6351main ()
6352{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006353double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006354 ;
6355 return 0;
6356}
Matthias Kloseb159a552010-04-25 21:00:44 +00006357
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006359if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006360
6361 ac_cv_no_strict_aliasing=no
6362
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363else
Matthias Kloseb159a552010-04-25 21:00:44 +00006364
6365 ac_cv_no_strict_aliasing=yes
6366
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006367fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006369
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006370else
Matthias Kloseb159a552010-04-25 21:00:44 +00006371
6372 ac_cv_no_strict_aliasing=no
6373
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006374fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006376fi
6377
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006378 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6381$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006382 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383 then
6384 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6385 fi
6386
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6388$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6389 ac_save_cc="$CC"
6390 CC="$CC -Wunused-result -Werror"
6391 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006392 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006393 $as_echo_n "(cached) " >&6
6394else
6395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6396/* end confdefs.h. */
6397
6398
6399int
6400main ()
6401{
6402
6403 ;
6404 return 0;
6405}
6406
6407_ACEOF
6408if ac_fn_c_try_compile "$LINENO"; then :
6409
6410 ac_cv_disable_unused_result_warning=yes
6411
6412else
6413
6414 ac_cv_disable_unused_result_warning=no
6415
6416fi
6417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6418fi
6419
6420 CFLAGS="$save_CFLAGS"
6421 CC="$ac_save_cc"
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6423$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6424
6425 if test $ac_cv_disable_unused_result_warning = yes
6426 then
6427 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6428 fi
6429
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6431$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6432 ac_save_cc="$CC"
6433 CC="$CC -Werror=declaration-after-statement"
6434 save_CFLAGS="$CFLAGS"
6435 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6436 $as_echo_n "(cached) " >&6
6437else
6438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6439/* end confdefs.h. */
6440
6441
6442int
6443main ()
6444{
6445
6446 ;
6447 return 0;
6448}
6449
6450_ACEOF
6451if ac_fn_c_try_compile "$LINENO"; then :
6452
6453 ac_cv_declaration_after_statement_warning=yes
6454
6455else
6456
6457 ac_cv_declaration_after_statement_warning=no
6458
6459fi
6460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6461fi
6462
6463 CFLAGS="$save_CFLAGS"
6464 CC="$ac_save_cc"
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6466$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6467
6468 if test $ac_cv_declaration_after_statement_warning = yes
6469 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006470 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006471 fi
6472
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006473 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6474 # support. Without this, treatment of subnormals doesn't follow
6475 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006476 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006477 alpha*)
6478 BASECFLAGS="$BASECFLAGS -mieee"
6479 ;;
6480 esac
6481
6482 case $ac_sys_system in
6483 SCO_SV*)
6484 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6485 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006486
6487 # is there any other compiler on Darwin besides gcc?
6488 Darwin*)
6489 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6490 # used to be here, but non-Apple gcc doesn't accept them.
6491 if test "${CC}" = gcc
6492 then
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006494$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006495 case "${UNIVERSALSDK}" in
6496 */MacOSX10.4u.sdk)
6497 # Build using 10.4 SDK, force usage of gcc when the
6498 # compiler is gcc, otherwise the user will get very
6499 # confusing error messages when building on OSX 10.6
6500 CC=gcc-4.0
6501 CPP=cpp-4.0
6502 ;;
6503 esac
6504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006505$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006506 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006507
Ned Deily87adb6e2013-10-18 21:09:56 -07006508 if test "${enable_universalsdk}"
6509 then
6510 case "$UNIVERSAL_ARCHS" in
6511 32-bit)
6512 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6513 LIPO_32BIT_FLAGS=""
6514 ARCH_RUN_32BIT=""
6515 ;;
6516 64-bit)
6517 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6518 LIPO_32BIT_FLAGS=""
6519 ARCH_RUN_32BIT="true"
6520 ;;
6521 all)
6522 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6523 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6524 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6525 ;;
6526 intel)
6527 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6528 LIPO_32BIT_FLAGS="-extract i386"
6529 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6530 ;;
6531 intel-32)
6532 UNIVERSAL_ARCH_FLAGS="-arch i386"
6533 LIPO_32BIT_FLAGS=""
6534 ARCH_RUN_32BIT=""
6535 ;;
6536 3-way)
6537 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6538 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6539 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6540 ;;
6541 *)
6542 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6543 ;;
6544 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545
Ned Deily87adb6e2013-10-18 21:09:56 -07006546 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6547 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6548 if test "${UNIVERSALSDK}" != "/"
6549 then
6550 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6551 fi
6552 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006553
Ned Deily87adb6e2013-10-18 21:09:56 -07006554 # Calculate an appropriate deployment target for this build:
6555 # The deployment target value is used explicitly to enable certain
6556 # features are enabled (such as builtin libedit support for readline)
6557 # through the use of Apple's Availabiliy Macros and is used as a
6558 # component of the string returned by distutils.get_platform().
6559 #
6560 # Use the value from:
6561 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6562 # 2. the operating system version of the build machine if >= 10.6
6563 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6564 # below to pick either 10.3, 10.4, or 10.5 as the target.
6565 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006566
Ned Deily87adb6e2013-10-18 21:09:56 -07006567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6568$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006569 cur_target_major=`sw_vers -productVersion | \
6570 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6571 cur_target_minor=`sw_vers -productVersion | \
6572 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6573 cur_target="${cur_target_major}.${cur_target_minor}"
6574 if test ${cur_target_major} -eq 10 && \
6575 test ${cur_target_minor} -ge 3 && \
6576 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006577 then
Ned Deily36820b62014-06-25 13:44:22 -07006578 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006579 cur_target=10.3
6580 if test ${enable_universalsdk}
6581 then
6582 case "$UNIVERSAL_ARCHS" in
6583 all|3-way|intel|64-bit)
6584 # These configurations were first supported in 10.5
6585 cur_target='10.5'
6586 ;;
6587 esac
6588 else
6589 if test `/usr/bin/arch` = "i386"
6590 then
6591 # 10.4 was the first release to support Intel archs
6592 cur_target="10.4"
6593 fi
6594 fi
6595 fi
6596 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006597
Ned Deily87adb6e2013-10-18 21:09:56 -07006598 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6599 # environment with a value that is the same as what we'll use
6600 # in the Makefile to ensure that we'll get the same compiler
6601 # environment during configure and build time.
6602 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6603 export MACOSX_DEPLOYMENT_TARGET
6604 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6606$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006607
Ned Deily87adb6e2013-10-18 21:09:56 -07006608 # end of Darwin* tests
6609 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006610 esac
6611 ;;
6612
6613*)
6614 case $ac_sys_system in
6615 OpenUNIX*|UnixWare*)
6616 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6617 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006618 SCO_SV*)
6619 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6620 ;;
6621 esac
6622 ;;
6623esac
6624
6625if test "$Py_DEBUG" = 'true'; then
6626 :
6627else
6628 OPT="-DNDEBUG $OPT"
6629fi
6630
6631if test "$ac_arch_flags"
6632then
6633 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6634fi
6635
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006636# On some compilers, pthreads are available without further options
6637# (e.g. MacOS X). On some of these systems, the compiler will not
6638# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6639# So we have to see first whether pthreads are available without
6640# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6642$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006643if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006644 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006645else
Matthias Kloseb9621712010-04-24 17:59:49 +00006646 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006647 ac_cv_pthread_is_default=no
6648else
Matthias Kloseb9621712010-04-24 17:59:49 +00006649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006650/* end confdefs.h. */
6651
Stefan Krah7dba5942012-11-22 22:49:11 +01006652#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006653#include <pthread.h>
6654
6655void* routine(void* p){return NULL;}
6656
6657int main(){
6658 pthread_t p;
6659 if(pthread_create(&p,NULL,routine,NULL)!=0)
6660 return 1;
6661 (void)pthread_detach(p);
6662 return 0;
6663}
6664
6665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006666if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006667
6668 ac_cv_pthread_is_default=yes
6669 ac_cv_kthread=no
6670 ac_cv_pthread=no
6671
6672else
Matthias Kloseb9621712010-04-24 17:59:49 +00006673 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006677fi
6678
6679
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006680fi
6681
Matthias Kloseb9621712010-04-24 17:59:49 +00006682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6683$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684
6685
6686if test $ac_cv_pthread_is_default = yes
6687then
6688 ac_cv_kpthread=no
6689else
6690# -Kpthread, if available, provides the right #defines
6691# and linker options to make pthread_create available
6692# Some compilers won't report that they do not support -Kpthread,
6693# so we need to run a program to see whether it really made the
6694# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6696$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006697if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006698 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699else
6700 ac_save_cc="$CC"
6701CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006702if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006703 ac_cv_kpthread=no
6704else
Matthias Kloseb9621712010-04-24 17:59:49 +00006705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006706/* end confdefs.h. */
6707
Stefan Krah7dba5942012-11-22 22:49:11 +01006708#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709#include <pthread.h>
6710
6711void* routine(void* p){return NULL;}
6712
6713int main(){
6714 pthread_t p;
6715 if(pthread_create(&p,NULL,routine,NULL)!=0)
6716 return 1;
6717 (void)pthread_detach(p);
6718 return 0;
6719}
6720
6721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006722if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006723 ac_cv_kpthread=yes
6724else
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006729fi
6730
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006731CC="$ac_save_cc"
6732fi
6733
Matthias Kloseb9621712010-04-24 17:59:49 +00006734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6735$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736fi
6737
6738if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6739then
6740# -Kthread, if available, provides the right #defines
6741# and linker options to make pthread_create available
6742# Some compilers won't report that they do not support -Kthread,
6743# so we need to run a program to see whether it really made the
6744# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6746$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006747if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006748 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749else
6750 ac_save_cc="$CC"
6751CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006752if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006753 ac_cv_kthread=no
6754else
Matthias Kloseb9621712010-04-24 17:59:49 +00006755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006756/* end confdefs.h. */
6757
Stefan Krah7dba5942012-11-22 22:49:11 +01006758#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006759#include <pthread.h>
6760
6761void* routine(void* p){return NULL;}
6762
6763int main(){
6764 pthread_t p;
6765 if(pthread_create(&p,NULL,routine,NULL)!=0)
6766 return 1;
6767 (void)pthread_detach(p);
6768 return 0;
6769}
6770
6771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006772if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006773 ac_cv_kthread=yes
6774else
Matthias Kloseb9621712010-04-24 17:59:49 +00006775 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779fi
6780
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781CC="$ac_save_cc"
6782fi
6783
Matthias Kloseb9621712010-04-24 17:59:49 +00006784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6785$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786fi
6787
6788if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6789then
6790# -pthread, if available, provides the right #defines
6791# and linker options to make pthread_create available
6792# Some compilers won't report that they do not support -pthread,
6793# so we need to run a program to see whether it really made the
6794# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6796$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006797if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006799else
6800 ac_save_cc="$CC"
6801CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006802if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006803 ac_cv_pthread=no
6804else
Matthias Kloseb9621712010-04-24 17:59:49 +00006805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006806/* end confdefs.h. */
6807
Stefan Krah7dba5942012-11-22 22:49:11 +01006808#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006809#include <pthread.h>
6810
6811void* routine(void* p){return NULL;}
6812
6813int main(){
6814 pthread_t p;
6815 if(pthread_create(&p,NULL,routine,NULL)!=0)
6816 return 1;
6817 (void)pthread_detach(p);
6818 return 0;
6819}
6820
6821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006822if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006823 ac_cv_pthread=yes
6824else
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829fi
6830
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831CC="$ac_save_cc"
6832fi
6833
Matthias Kloseb9621712010-04-24 17:59:49 +00006834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6835$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006836fi
6837
6838# If we have set a CC compiler flag for thread support then
6839# check if it works for CXX, too.
6840ac_cv_cxx_thread=no
6841if test ! -z "$CXX"
6842then
Matthias Kloseb9621712010-04-24 17:59:49 +00006843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6844$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845ac_save_cxx="$CXX"
6846
6847if test "$ac_cv_kpthread" = "yes"
6848then
6849 CXX="$CXX -Kpthread"
6850 ac_cv_cxx_thread=yes
6851elif test "$ac_cv_kthread" = "yes"
6852then
6853 CXX="$CXX -Kthread"
6854 ac_cv_cxx_thread=yes
6855elif test "$ac_cv_pthread" = "yes"
6856then
6857 CXX="$CXX -pthread"
6858 ac_cv_cxx_thread=yes
6859fi
6860
6861if test $ac_cv_cxx_thread = yes
6862then
6863 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6864 $CXX -c conftest.$ac_ext 2>&5
6865 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6866 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6867 then
6868 ac_cv_cxx_thread=yes
6869 else
6870 ac_cv_cxx_thread=no
6871 fi
6872 rm -fr conftest*
6873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6875$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876fi
6877CXX="$ac_save_cxx"
6878
6879
6880# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6882$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006883if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006884 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885else
Matthias Kloseb9621712010-04-24 17:59:49 +00006886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887/* end confdefs.h. */
6888#include <stdlib.h>
6889#include <stdarg.h>
6890#include <string.h>
6891#include <float.h>
6892
6893int
6894main ()
6895{
6896
6897 ;
6898 return 0;
6899}
6900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006901if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006902 ac_cv_header_stdc=yes
6903else
Matthias Kloseb9621712010-04-24 17:59:49 +00006904 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6907
6908if test $ac_cv_header_stdc = yes; then
6909 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006911/* end confdefs.h. */
6912#include <string.h>
6913
6914_ACEOF
6915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006916 $EGREP "memchr" >/dev/null 2>&1; then :
6917
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006918else
6919 ac_cv_header_stdc=no
6920fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006921rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922
6923fi
6924
6925if test $ac_cv_header_stdc = yes; then
6926 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928/* end confdefs.h. */
6929#include <stdlib.h>
6930
6931_ACEOF
6932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006933 $EGREP "free" >/dev/null 2>&1; then :
6934
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006935else
6936 ac_cv_header_stdc=no
6937fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006938rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006939
6940fi
6941
6942if test $ac_cv_header_stdc = yes; then
6943 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006945 :
6946else
Matthias Kloseb9621712010-04-24 17:59:49 +00006947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006948/* end confdefs.h. */
6949#include <ctype.h>
6950#include <stdlib.h>
6951#if ((' ' & 0x0FF) == 0x020)
6952# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6953# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6954#else
6955# define ISLOWER(c) \
6956 (('a' <= (c) && (c) <= 'i') \
6957 || ('j' <= (c) && (c) <= 'r') \
6958 || ('s' <= (c) && (c) <= 'z'))
6959# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6960#endif
6961
6962#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6963int
6964main ()
6965{
6966 int i;
6967 for (i = 0; i < 256; i++)
6968 if (XOR (islower (i), ISLOWER (i))
6969 || toupper (i) != TOUPPER (i))
6970 return 2;
6971 return 0;
6972}
6973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006974if ac_fn_c_try_run "$LINENO"; then :
6975
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976else
Matthias Kloseb9621712010-04-24 17:59:49 +00006977 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6980 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981fi
6982
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006983fi
6984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6986$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006987if test $ac_cv_header_stdc = yes; then
6988
Matthias Kloseb9621712010-04-24 17:59:49 +00006989$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006990
6991fi
6992
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02006993for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006994fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02006995ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006996sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006997unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006998poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006999sys/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 +01007000sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007001sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007002sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007003sys/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 -07007004libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007005bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7006sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007007do :
7008 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7009ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007010if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007011 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007012#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007013_ACEOF
7014
7015fi
7016
Guido van Rossum627b2d71993-12-24 10:39:16 +00007017done
7018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007019ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007020for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007021 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7023$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007024if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007025 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007026else
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007028/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007029#include <sys/types.h>
7030#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007031
Martin v. Löwis11437992002-04-12 09:54:03 +00007032int
7033main ()
7034{
7035if ((DIR *) 0)
7036return 0;
7037 ;
7038 return 0;
7039}
7040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007041if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007042 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007043else
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007048eval ac_res=\$$as_ac_Header
7049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7050$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007051if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007052 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007053#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007054_ACEOF
7055
7056ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007057fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007058
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007059done
7060# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7061if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7063$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007064if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007065 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007066else
Martin v. Löwis11437992002-04-12 09:54:03 +00007067 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007071/* Override any GCC internal prototype to avoid an error.
7072 Use char because int might match the return type of a GCC
7073 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007074#ifdef __cplusplus
7075extern "C"
7076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007077char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007078int
7079main ()
7080{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007081return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007082 ;
7083 return 0;
7084}
7085_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086for ac_lib in '' dir; do
7087 if test -z "$ac_lib"; then
7088 ac_res="none required"
7089 else
7090 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007091 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007092 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007093 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007096rm -f core conftest.err conftest.$ac_objext \
7097 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007098 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007101done
Victor Stinnere0be4232011-10-25 13:06:09 +02007102if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007104else
7105 ac_cv_search_opendir=no
7106fi
7107rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007108LIBS=$ac_func_search_save_LIBS
7109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7111$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007112ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007113if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007114 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007115
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007116fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007117
Michael W. Hudson54241132001-12-07 15:38:26 +00007118else
Matthias Kloseb9621712010-04-24 17:59:49 +00007119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7120$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007121if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007122 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007123else
7124 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007128/* Override any GCC internal prototype to avoid an error.
7129 Use char because int might match the return type of a GCC
7130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007131#ifdef __cplusplus
7132extern "C"
7133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007134char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007135int
7136main ()
7137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007138return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007139 ;
7140 return 0;
7141}
7142_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007143for ac_lib in '' x; do
7144 if test -z "$ac_lib"; then
7145 ac_res="none required"
7146 else
7147 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007148 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007149 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007150 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007151 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007153rm -f core conftest.err conftest.$ac_objext \
7154 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007155 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007156 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007158done
Victor Stinnere0be4232011-10-25 13:06:09 +02007159if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007161else
7162 ac_cv_search_opendir=no
7163fi
7164rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007165LIBS=$ac_func_search_save_LIBS
7166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7168$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007169ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007170if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007171 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007172
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007173fi
7174
7175fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007176
Matthias Kloseb9621712010-04-24 17:59:49 +00007177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7178$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007179if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007180 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007181else
Matthias Kloseb9621712010-04-24 17:59:49 +00007182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007183/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007184#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007185int
7186main ()
7187{
7188return makedev(0, 0);
7189 ;
7190 return 0;
7191}
7192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007193if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007194 ac_cv_header_sys_types_h_makedev=yes
7195else
Matthias Kloseb9621712010-04-24 17:59:49 +00007196 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007198rm -f core conftest.err conftest.$ac_objext \
7199 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007200
7201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7203$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007204
7205if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007206ac_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 +02007207if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007208
Matthias Kloseb9621712010-04-24 17:59:49 +00007209$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007210
7211fi
7212
7213
7214
7215 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 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 +02007217if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007218
Matthias Kloseb9621712010-04-24 17:59:49 +00007219$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007220
7221fi
7222
7223
7224 fi
7225fi
7226
Michael W. Hudson54241132001-12-07 15:38:26 +00007227
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007228# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7229for ac_header in net/if.h
7230do :
7231 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7232#ifdef STDC_HEADERS
7233# include <stdlib.h>
7234# include <stddef.h>
7235#else
7236# ifdef HAVE_STDLIB_H
7237# include <stdlib.h>
7238# endif
7239#endif
7240#ifdef HAVE_SYS_SOCKET_H
7241# include <sys/socket.h>
7242#endif
7243
7244"
Victor Stinnere0be4232011-10-25 13:06:09 +02007245if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007246 cat >>confdefs.h <<_ACEOF
7247#define HAVE_NET_IF_H 1
7248_ACEOF
7249
7250fi
7251
7252done
7253
7254
Martin v. Löwis11017b12006-01-14 18:12:57 +00007255# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007256for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007257do :
7258 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 +00007259#ifdef HAVE_ASM_TYPES_H
7260#include <asm/types.h>
7261#endif
7262#ifdef HAVE_SYS_SOCKET_H
7263#include <sys/socket.h>
7264#endif
7265
Matthias Kloseb9621712010-04-24 17:59:49 +00007266"
Victor Stinnere0be4232011-10-25 13:06:09 +02007267if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007268 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007269#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007270_ACEOF
7271
7272fi
7273
7274done
7275
7276
Charles-François Natali47413c12011-10-06 19:47:44 +02007277# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007278for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007279do :
7280 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7281ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7282#ifdef HAVE_SYS_SOCKET_H
7283#include <sys/socket.h>
7284#endif
7285
7286"
7287if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7288 cat >>confdefs.h <<_ACEOF
7289#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7290_ACEOF
7291
7292fi
7293
7294done
7295
7296
Guido van Rossum627b2d71993-12-24 10:39:16 +00007297# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007298was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7300$as_echo_n "checking for clock_t in time.h... " >&6; }
7301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007302/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007303#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007304
7305_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007306if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007307 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007308 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007309else
Martin v. Löwis11437992002-04-12 09:54:03 +00007310
7311
Matthias Kloseb9621712010-04-24 17:59:49 +00007312$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007313
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007314
Guido van Rossum627b2d71993-12-24 10:39:16 +00007315fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007316rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007317
Matthias Kloseb9621712010-04-24 17:59:49 +00007318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7319$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007320
Matthias Kloseb9621712010-04-24 17:59:49 +00007321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7322$as_echo_n "checking for makedev... " >&6; }
7323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007324/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007325
Jesus Cea740f53a2010-04-28 11:35:30 +00007326#if defined(MAJOR_IN_MKDEV)
7327#include <sys/mkdev.h>
7328#elif defined(MAJOR_IN_SYSMACROS)
7329#include <sys/sysmacros.h>
7330#else
7331#include <sys/types.h>
7332#endif
7333
Neal Norwitz11690112002-07-30 01:08:28 +00007334int
7335main ()
7336{
Jesus Cea740f53a2010-04-28 11:35:30 +00007337
7338 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007339 ;
7340 return 0;
7341}
Matthias Kloseb159a552010-04-25 21:00:44 +00007342
Neal Norwitz11690112002-07-30 01:08:28 +00007343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007344if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007345 ac_cv_has_makedev=yes
7346else
Matthias Kloseb9621712010-04-24 17:59:49 +00007347 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007349rm -f core conftest.err conftest.$ac_objext \
7350 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7352$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007353if test "$ac_cv_has_makedev" = "yes"; then
7354
Matthias Kloseb9621712010-04-24 17:59:49 +00007355$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007356
7357fi
7358
Christian Heimes985ecdc2013-11-20 11:46:18 +01007359# byte swapping
7360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7361$as_echo_n "checking for le64toh... " >&6; }
7362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7363/* end confdefs.h. */
7364
7365#ifdef HAVE_ENDIAN_H
7366#include <endian.h>
7367#elif defined(HAVE_SYS_ENDIAN_H)
7368#include <sys/endian.h>
7369#endif
7370
7371int
7372main ()
7373{
7374
7375 le64toh(1)
7376 ;
7377 return 0;
7378}
7379
7380_ACEOF
7381if ac_fn_c_try_link "$LINENO"; then :
7382 ac_cv_has_le64toh=yes
7383else
7384 ac_cv_has_le64toh=no
7385fi
7386rm -f core conftest.err conftest.$ac_objext \
7387 conftest$ac_exeext conftest.$ac_ext
7388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7389$as_echo "$ac_cv_has_le64toh" >&6; }
7390if test "$ac_cv_has_le64toh" = "yes"; then
7391
7392$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7393
7394fi
7395
Martin v. Löwis399a6892002-10-04 10:22:02 +00007396# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7397# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7398# defined, but the compiler does not support pragma redefine_extname,
7399# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7400# structures (such as rlimit64) without declaring them. As a
7401# work-around, disable LFS on such configurations
7402
7403use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7405$as_echo_n "checking Solaris LFS bug... " >&6; }
7406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007407/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007408
7409#define _LARGEFILE_SOURCE 1
7410#define _FILE_OFFSET_BITS 64
7411#include <sys/resource.h>
7412
Martin v. Löwis399a6892002-10-04 10:22:02 +00007413int
7414main ()
7415{
7416struct rlimit foo;
7417 ;
7418 return 0;
7419}
7420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007422 sol_lfs_bug=no
7423else
Matthias Kloseb9621712010-04-24 17:59:49 +00007424 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7428$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007429if test "$sol_lfs_bug" = "yes"; then
7430 use_lfs=no
7431fi
7432
7433if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007434# Two defines needed to enable largefile support on various platforms
7435# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007436case $ac_sys_system/$ac_sys_release in
7437AIX*)
7438
7439$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7440
7441 ;;
7442esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007443
Matthias Kloseb9621712010-04-24 17:59:49 +00007444$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007445
7446
Matthias Kloseb9621712010-04-24 17:59:49 +00007447$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007448
Martin v. Löwis399a6892002-10-04 10:22:02 +00007449fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007450
Guido van Rossum84e7b241996-08-19 21:59:00 +00007451# Add some code to confdefs.h so that the test for off_t works on SCO
7452cat >> confdefs.h <<\EOF
7453#if defined(SCO_DS)
7454#undef _OFF_T
7455#endif
7456EOF
7457
Guido van Rossumef2255b2000-03-10 22:30:29 +00007458# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007459ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007460if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007462else
Martin v. Löwis11437992002-04-12 09:54:03 +00007463
7464cat >>confdefs.h <<_ACEOF
7465#define mode_t int
7466_ACEOF
7467
7468fi
7469
Matthias Kloseb9621712010-04-24 17:59:49 +00007470ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007471if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007472
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007473else
Martin v. Löwis11437992002-04-12 09:54:03 +00007474
7475cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007476#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007477_ACEOF
7478
7479fi
7480
Matthias Kloseb9621712010-04-24 17:59:49 +00007481ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007482if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007483
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007484else
Martin v. Löwis11437992002-04-12 09:54:03 +00007485
7486cat >>confdefs.h <<_ACEOF
7487#define pid_t int
7488_ACEOF
7489
7490fi
7491
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007492
Martin v. Löwis11437992002-04-12 09:54:03 +00007493cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007494#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007495_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007496
Matthias Kloseb9621712010-04-24 17:59:49 +00007497ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007498if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007499
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007500else
Martin v. Löwis11437992002-04-12 09:54:03 +00007501
7502cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007503#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007504_ACEOF
7505
7506fi
7507
Matthias Kloseb9621712010-04-24 17:59:49 +00007508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7509$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007510if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007511 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007512else
Matthias Kloseb9621712010-04-24 17:59:49 +00007513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007514/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007515#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007516
7517_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007519 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007520 ac_cv_type_uid_t=yes
7521else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007522 ac_cv_type_uid_t=no
7523fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007524rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007525
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7528$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007529if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007530
Matthias Kloseb9621712010-04-24 17:59:49 +00007531$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007532
7533
Matthias Kloseb9621712010-04-24 17:59:49 +00007534$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007535
7536fi
7537
Mark Dickinson983bc162012-12-02 12:11:38 +00007538
7539# There are two separate checks for each of the exact-width integer types we
7540# need. First we check whether the type is available using the usual
7541# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7542# and <stdint.h> where available). We then also use the special type checks of
7543# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7544# directly, #define's uint32_t to be a suitable type.
7545
7546ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7547if test "x$ac_cv_type_uint32_t" = xyes; then :
7548
7549$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7550
7551fi
7552
Matthias Kloseb9621712010-04-24 17:59:49 +00007553ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7554case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007555 no|yes) ;; #(
7556 *)
7557
Matthias Kloseb9621712010-04-24 17:59:49 +00007558$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007559
7560
7561cat >>confdefs.h <<_ACEOF
7562#define uint32_t $ac_cv_c_uint32_t
7563_ACEOF
7564;;
7565 esac
7566
Mark Dickinson983bc162012-12-02 12:11:38 +00007567
7568ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7569if test "x$ac_cv_type_uint64_t" = xyes; then :
7570
7571$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7572
7573fi
7574
Matthias Kloseb9621712010-04-24 17:59:49 +00007575ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7576case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007577 no|yes) ;; #(
7578 *)
7579
Matthias Kloseb9621712010-04-24 17:59:49 +00007580$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007581
7582
7583cat >>confdefs.h <<_ACEOF
7584#define uint64_t $ac_cv_c_uint64_t
7585_ACEOF
7586;;
7587 esac
7588
Mark Dickinson983bc162012-12-02 12:11:38 +00007589
7590ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7591if test "x$ac_cv_type_int32_t" = xyes; then :
7592
7593$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7594
7595fi
7596
Matthias Kloseb9621712010-04-24 17:59:49 +00007597ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7598case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007599 no|yes) ;; #(
7600 *)
7601
7602cat >>confdefs.h <<_ACEOF
7603#define int32_t $ac_cv_c_int32_t
7604_ACEOF
7605;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007606esac
7607
Mark Dickinson983bc162012-12-02 12:11:38 +00007608
7609ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7610if test "x$ac_cv_type_int64_t" = xyes; then :
7611
7612$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7613
7614fi
7615
Matthias Kloseb9621712010-04-24 17:59:49 +00007616ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7617case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007618 no|yes) ;; #(
7619 *)
7620
7621cat >>confdefs.h <<_ACEOF
7622#define int64_t $ac_cv_c_int64_t
7623_ACEOF
7624;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007625esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007626
Mark Dickinson983bc162012-12-02 12:11:38 +00007627
Matthias Kloseb9621712010-04-24 17:59:49 +00007628ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007629if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007630
Matthias Kloseb9621712010-04-24 17:59:49 +00007631$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007632
7633fi
7634
Stefan Krah1919b7e2012-03-21 18:25:23 +01007635ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7636if test "x$ac_cv_type___uint128_t" = xyes; then :
7637
7638$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7639
7640fi
7641
Jack Jansendd19cf82001-12-06 22:36:17 +00007642
Michael W. Hudson54241132001-12-07 15:38:26 +00007643# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007644# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645# The cast to long int works around a bug in the HP C Compiler
7646# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7647# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7648# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7650$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007651if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007652 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007653else
Matthias Kloseb9621712010-04-24 17:59:49 +00007654 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 +00007655
Martin v. Löwis11437992002-04-12 09:54:03 +00007656else
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 if test "$ac_cv_type_int" = yes; then
7658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007660as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007661See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007662 else
7663 ac_cv_sizeof_int=0
7664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007666
Martin v. Löwis11437992002-04-12 09:54:03 +00007667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7669$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670
7671
7672
Martin v. Löwis11437992002-04-12 09:54:03 +00007673cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007674#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007675_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007676
7677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678# The cast to long int works around a bug in the HP C Compiler
7679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7681# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7683$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007684if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007685 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007686else
Matthias Kloseb9621712010-04-24 17:59:49 +00007687 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 +00007688
Martin v. Löwis11437992002-04-12 09:54:03 +00007689else
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 if test "$ac_cv_type_long" = yes; then
7691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007693as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007694See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007695 else
7696 ac_cv_sizeof_long=0
7697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007699
Martin v. Löwis11437992002-04-12 09:54:03 +00007700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7702$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703
7704
7705
Martin v. Löwis11437992002-04-12 09:54:03 +00007706cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007707#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007708_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007709
7710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711# The cast to long int works around a bug in the HP C Compiler
7712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7714# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7716$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007717if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007718 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007719else
Matthias Kloseb9621712010-04-24 17:59:49 +00007720 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 +00007721
Martin v. Löwis11437992002-04-12 09:54:03 +00007722else
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 if test "$ac_cv_type_void_p" = yes; then
7724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007726as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007727See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007728 else
7729 ac_cv_sizeof_void_p=0
7730 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007732
Martin v. Löwis11437992002-04-12 09:54:03 +00007733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7735$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736
7737
7738
Martin v. Löwis11437992002-04-12 09:54:03 +00007739cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007740#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007741_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007742
7743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744# The cast to long int works around a bug in the HP C Compiler
7745# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7746# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7747# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7749$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007750if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007752else
Matthias Kloseb9621712010-04-24 17:59:49 +00007753 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 +00007754
Martin v. Löwis11437992002-04-12 09:54:03 +00007755else
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 if test "$ac_cv_type_short" = yes; then
7757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007759as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007760See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761 else
7762 ac_cv_sizeof_short=0
7763 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007765
Martin v. Löwis11437992002-04-12 09:54:03 +00007766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7768$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769
7770
7771
Martin v. Löwis11437992002-04-12 09:54:03 +00007772cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007773#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007774_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007775
7776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777# The cast to long int works around a bug in the HP C Compiler
7778# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7779# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7780# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7782$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007783if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007784 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007785else
Matthias Kloseb9621712010-04-24 17:59:49 +00007786 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 +00007787
Martin v. Löwis11437992002-04-12 09:54:03 +00007788else
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 if test "$ac_cv_type_float" = yes; then
7790 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7791$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007792as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007793See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794 else
7795 ac_cv_sizeof_float=0
7796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007798
Martin v. Löwis11437992002-04-12 09:54:03 +00007799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7801$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802
7803
7804
Martin v. Löwis11437992002-04-12 09:54:03 +00007805cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007806#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007807_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007808
7809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810# The cast to long int works around a bug in the HP C Compiler
7811# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7812# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7813# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7815$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007816if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007818else
Matthias Kloseb9621712010-04-24 17:59:49 +00007819 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 +00007820
Martin v. Löwis11437992002-04-12 09:54:03 +00007821else
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 if test "$ac_cv_type_double" = yes; then
7823 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007825as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007826See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007827 else
7828 ac_cv_sizeof_double=0
7829 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007831
Martin v. Löwis11437992002-04-12 09:54:03 +00007832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7834$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835
7836
7837
Martin v. Löwis11437992002-04-12 09:54:03 +00007838cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007839#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007840_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007841
7842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843# The cast to long int works around a bug in the HP C Compiler
7844# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7845# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7846# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7848$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007849if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007851else
Matthias Kloseb9621712010-04-24 17:59:49 +00007852 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 +00007853
Martin v. Löwis11437992002-04-12 09:54:03 +00007854else
Matthias Kloseb9621712010-04-24 17:59:49 +00007855 if test "$ac_cv_type_fpos_t" = yes; then
7856 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7857$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007858as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007859See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860 else
7861 ac_cv_sizeof_fpos_t=0
7862 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007864
Martin v. Löwis11437992002-04-12 09:54:03 +00007865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7867$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868
7869
7870
Martin v. Löwis11437992002-04-12 09:54:03 +00007871cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007872#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007873_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007874
Michael W. Hudson54241132001-12-07 15:38:26 +00007875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876# The cast to long int works around a bug in the HP C Compiler
7877# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7878# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7879# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7881$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007882if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007884else
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 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 +00007886
Martin v. Löwis18e16552006-02-15 17:27:45 +00007887else
Matthias Kloseb9621712010-04-24 17:59:49 +00007888 if test "$ac_cv_type_size_t" = yes; then
7889 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7890$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007891as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007892See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893 else
7894 ac_cv_sizeof_size_t=0
7895 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007897
Martin v. Löwis18e16552006-02-15 17:27:45 +00007898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7900$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901
7902
7903
Martin v. Löwis18e16552006-02-15 17:27:45 +00007904cat >>confdefs.h <<_ACEOF
7905#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7906_ACEOF
7907
7908
Christian Heimes400adb02008-02-01 08:12:03 +00007909# The cast to long int works around a bug in the HP C Compiler
7910# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7911# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7912# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7914$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007915if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007916 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007917else
Matthias Kloseb9621712010-04-24 17:59:49 +00007918 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 +00007919
Christian Heimes400adb02008-02-01 08:12:03 +00007920else
Matthias Kloseb9621712010-04-24 17:59:49 +00007921 if test "$ac_cv_type_pid_t" = yes; then
7922 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007924as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007925See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007926 else
7927 ac_cv_sizeof_pid_t=0
7928 fi
7929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007930
Christian Heimes400adb02008-02-01 08:12:03 +00007931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7933$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007934
7935
7936
7937cat >>confdefs.h <<_ACEOF
7938#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7939_ACEOF
7940
7941
Michael W. Hudson54241132001-12-07 15:38:26 +00007942
Matthias Kloseb9621712010-04-24 17:59:49 +00007943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7944$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007945have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007947/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007948
Martin v. Löwis11437992002-04-12 09:54:03 +00007949int
7950main ()
7951{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007952long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007953 ;
7954 return 0;
7955}
7956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007957if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007958
7959
Matthias Kloseb9621712010-04-24 17:59:49 +00007960$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007961
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007962 have_long_long=yes
7963
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7967$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007968if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969# The cast to long int works around a bug in the HP C Compiler
7970# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7971# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7972# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7974$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007975if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007977else
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 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 +00007979
Martin v. Löwis11437992002-04-12 09:54:03 +00007980else
Matthias Kloseb9621712010-04-24 17:59:49 +00007981 if test "$ac_cv_type_long_long" = yes; then
7982 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007984as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007985See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986 else
7987 ac_cv_sizeof_long_long=0
7988 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007990
Martin v. Löwis11437992002-04-12 09:54:03 +00007991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7993$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994
7995
7996
Martin v. Löwis11437992002-04-12 09:54:03 +00007997cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007998#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007999_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008000
Michael W. Hudson54241132001-12-07 15:38:26 +00008001
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008002fi
8003
Matthias Kloseb9621712010-04-24 17:59:49 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8005$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008006have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008008/* end confdefs.h. */
8009
8010int
8011main ()
8012{
8013long double x; x = (long double)0;
8014 ;
8015 return 0;
8016}
8017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008018if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008019
8020
Matthias Kloseb9621712010-04-24 17:59:49 +00008021$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008022
8023 have_long_double=yes
8024
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008025fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8028$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008029if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008030# The cast to long int works around a bug in the HP C Compiler
8031# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8032# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8033# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8035$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008036if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008037 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008038else
Matthias Kloseb9621712010-04-24 17:59:49 +00008039 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 +00008040
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008041else
Matthias Kloseb9621712010-04-24 17:59:49 +00008042 if test "$ac_cv_type_long_double" = yes; then
8043 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8044$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008045as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008046See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008047 else
8048 ac_cv_sizeof_long_double=0
8049 fi
8050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008051
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8054$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008055
8056
8057
8058cat >>confdefs.h <<_ACEOF
8059#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8060_ACEOF
8061
8062
8063fi
8064
8065
Matthias Kloseb9621712010-04-24 17:59:49 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8067$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008068have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008070/* end confdefs.h. */
8071
8072int
8073main ()
8074{
8075_Bool x; x = (_Bool)0;
8076 ;
8077 return 0;
8078}
8079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008080if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008081
8082
Matthias Kloseb9621712010-04-24 17:59:49 +00008083$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008084
8085 have_c99_bool=yes
8086
Thomas Woutersb2137042007-02-01 18:02:27 +00008087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8090$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008091if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008092# The cast to long int works around a bug in the HP C Compiler
8093# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8094# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8095# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8097$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008098if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008100else
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 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 +00008102
Thomas Woutersb2137042007-02-01 18:02:27 +00008103else
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 if test "$ac_cv_type__Bool" = yes; then
8105 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8106$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008107as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008108See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109 else
8110 ac_cv_sizeof__Bool=0
8111 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008113
Thomas Woutersb2137042007-02-01 18:02:27 +00008114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8116$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008117
8118
8119
Thomas Woutersb2137042007-02-01 18:02:27 +00008120cat >>confdefs.h <<_ACEOF
8121#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8122_ACEOF
8123
8124
8125fi
8126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008128 #include <stdint.h>
8129 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008130 #ifdef HAVE_INTTYPES_H
8131 #include <inttypes.h>
8132 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008133"
Victor Stinnere0be4232011-10-25 13:06:09 +02008134if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008135
8136cat >>confdefs.h <<_ACEOF
8137#define HAVE_UINTPTR_T 1
8138_ACEOF
8139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140# The cast to long int works around a bug in the HP C Compiler
8141# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8142# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8143# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8145$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008146if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008147 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008148else
Matthias Kloseb9621712010-04-24 17:59:49 +00008149 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 +00008150
Martin v. Löwis11437992002-04-12 09:54:03 +00008151else
Matthias Kloseb9621712010-04-24 17:59:49 +00008152 if test "$ac_cv_type_uintptr_t" = yes; then
8153 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008155as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008156See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157 else
8158 ac_cv_sizeof_uintptr_t=0
8159 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008160fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008161
Martin v. Löwis11437992002-04-12 09:54:03 +00008162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8164$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165
8166
8167
Martin v. Löwis11437992002-04-12 09:54:03 +00008168cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008169#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008170_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008171
Michael W. Hudson54241132001-12-07 15:38:26 +00008172
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008173fi
8174
Thomas Wouters89f507f2006-12-13 04:49:30 +00008175
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008176# The cast to long int works around a bug in the HP C Compiler
8177# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8178# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8179# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8181$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008182if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008183 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008184else
Matthias Kloseb9621712010-04-24 17:59:49 +00008185 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008186#ifdef HAVE_SYS_TYPES_H
8187#include <sys/types.h>
8188#endif
8189
Matthias Kloseb9621712010-04-24 17:59:49 +00008190"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008191
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008192else
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 if test "$ac_cv_type_off_t" = yes; then
8194 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8195$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008196as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008197See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008198 else
8199 ac_cv_sizeof_off_t=0
8200 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008202
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8205$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008206
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008207
8208
Martin v. Löwis11437992002-04-12 09:54:03 +00008209cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008210#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008211_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008212
Michael W. Hudson54241132001-12-07 15:38:26 +00008213
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008214
Matthias Kloseb9621712010-04-24 17:59:49 +00008215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8216$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008217if test "$have_long_long" = yes
8218then
8219if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008220 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008221
Matthias Kloseb9621712010-04-24 17:59:49 +00008222$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008223
Matthias Kloseb9621712010-04-24 17:59:49 +00008224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8225$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008226else
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8228$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008229fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008230else
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8232$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008233fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008235# The cast to long int works around a bug in the HP C Compiler
8236# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8237# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8238# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8240$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008241if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008242 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008243else
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008245#ifdef HAVE_SYS_TYPES_H
8246#include <sys/types.h>
8247#endif
8248#ifdef HAVE_TIME_H
8249#include <time.h>
8250#endif
8251
Matthias Kloseb9621712010-04-24 17:59:49 +00008252"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008253
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008254else
Matthias Kloseb9621712010-04-24 17:59:49 +00008255 if test "$ac_cv_type_time_t" = yes; then
8256 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008258as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008259See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008260 else
8261 ac_cv_sizeof_time_t=0
8262 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008264
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8267$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008268
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008269
8270
Martin v. Löwis11437992002-04-12 09:54:03 +00008271cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008272#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008273_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008274
Michael W. Hudson54241132001-12-07 15:38:26 +00008275
8276
Trent Mick635f6fb2000-08-23 21:33:05 +00008277# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008278ac_save_cc="$CC"
8279if test "$ac_cv_kpthread" = "yes"
8280then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008281elif test "$ac_cv_kthread" = "yes"
8282then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008283elif test "$ac_cv_pthread" = "yes"
8284then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008285fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008286
Matthias Kloseb9621712010-04-24 17:59:49 +00008287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8288$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008289have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008291/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008292
8293 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008294int
8295main ()
8296{
Guido van Rossum12580492000-09-24 16:47:19 +00008297pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008298 ;
8299 return 0;
8300}
Matthias Kloseb159a552010-04-25 21:00:44 +00008301
Martin v. Löwis11437992002-04-12 09:54:03 +00008302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008303if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008304 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8308$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008309if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008311# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8312# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8313# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8315$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008316if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008318else
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008320#ifdef HAVE_PTHREAD_H
8321#include <pthread.h>
8322#endif
8323
Matthias Kloseb9621712010-04-24 17:59:49 +00008324"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008325
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008326else
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 if test "$ac_cv_type_pthread_t" = yes; then
8328 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8329$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008330as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008331See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008332 else
8333 ac_cv_sizeof_pthread_t=0
8334 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008336
Trent Mick635f6fb2000-08-23 21:33:05 +00008337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8339$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008340
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008341
8342
Martin v. Löwis11437992002-04-12 09:54:03 +00008343cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008344#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008345_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008346
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008347
Trent Mick635f6fb2000-08-23 21:33:05 +00008348fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008349CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008350
Michael W. Hudson54241132001-12-07 15:38:26 +00008351
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008352case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008353 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008354 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8355 ;;
8356 Darwin/*)
8357 OTHER_LIBTOOL_OPT=""
8358 ;;
8359esac
8360
8361
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008362
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008363case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008364 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008365 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8366 if test "${enable_universalsdk}"; then
8367 :
8368 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008369 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008370 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008371 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008372 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008373 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008374 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008375 if test ${gcc_version} '<' 4.0
8376 then
8377 LIBTOOL_CRUFT="-lcc_dynamic"
8378 else
8379 LIBTOOL_CRUFT=""
8380 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008382 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008383else
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008385/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008386
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008387 #include <unistd.h>
8388 int main(int argc, char*argv[])
8389 {
8390 if (sizeof(long) == 4) {
8391 return 0;
8392 } else {
8393 return 1;
8394 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008395 }
8396
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008398if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008399 ac_osx_32bit=yes
8400else
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8404 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008405fi
8406
8407
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008408 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008409 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008410 i386)
8411 MACOSX_DEFAULT_ARCH="i386"
8412 ;;
8413 ppc)
8414 MACOSX_DEFAULT_ARCH="ppc"
8415 ;;
8416 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008417 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008418 ;;
8419 esac
8420 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008421 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008422 i386)
8423 MACOSX_DEFAULT_ARCH="x86_64"
8424 ;;
8425 ppc)
8426 MACOSX_DEFAULT_ARCH="ppc64"
8427 ;;
8428 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008429 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008430 ;;
8431 esac
8432
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008433 fi
8434
8435 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008436 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008437 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008438esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8440$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008441if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008442then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008443 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008445 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008446
Matthias Kloseb9621712010-04-24 17:59:49 +00008447$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008448
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8450$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008451 if test $enable_shared = "yes"
8452 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008453 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 +00008454 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008455else
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8457$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008458fi
8459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8461$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008462case $ac_sys_system/$ac_sys_release in
8463 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008464
Matthias Kloseb9621712010-04-24 17:59:49 +00008465$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008466
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8468$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008469 ;;
8470 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8472$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008473 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008474esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008475
Guido van Rossum0a516c91994-09-12 10:58:40 +00008476# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008477
Michael W. Hudson54241132001-12-07 15:38:26 +00008478
8479
8480
8481
Benjamin Peterson99f03762010-04-11 22:15:28 +00008482
Thomas Wouters477c8d52006-05-27 19:21:47 +00008483
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008484# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8485# -- usually .so, .sl on HP-UX, .dll on Cygwin
8486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8487$as_echo_n "checking the extension of shared libraries... " >&6; }
8488if test -z "$SHLIB_SUFFIX"; then
8489 case $ac_sys_system in
8490 hp*|HP*)
8491 case `uname -m` in
8492 ia64) SHLIB_SUFFIX=.so;;
8493 *) SHLIB_SUFFIX=.sl;;
8494 esac
8495 ;;
8496 CYGWIN*) SHLIB_SUFFIX=.dll;;
8497 *) SHLIB_SUFFIX=.so;;
8498 esac
8499fi
8500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8501$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008502
Guido van Rossum0a516c91994-09-12 10:58:40 +00008503# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008504# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008505# (Shared libraries in this instance are shared modules to be loaded into
8506# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8508$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008509if test -z "$LDSHARED"
8510then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008511 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008512 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008513 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008514 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008515 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008516 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008517 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008518 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008519 if test "$GCC" = "yes" ; then
8520 LDSHARED='$(CC) -shared'
8521 LDCXXSHARED='$(CXX) -shared'
8522 else
8523 LDSHARED='$(CC) -G'
8524 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008525 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008526 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008527 if test "$GCC" = "yes" ; then
8528 LDSHARED='$(CC) -shared'
8529 LDCXXSHARED='$(CXX) -shared'
8530 else
8531 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008532 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008533 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008534 LDSHARED='$(CC) -bundle'
8535 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008536 if test "$enable_framework" ; then
8537 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008538 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8539 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008540 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008541 else
8542 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008543 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008544 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008545 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008546 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008547 LDSHARED='$(CC) -bundle'
8548 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008549 if test "$enable_framework" ; then
8550 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008551 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8552 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008553 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008554 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008555 # No framework, use the Python app as bundle-loader
8556 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008557 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008558 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008559 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008560 Darwin/*)
8561 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8562 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008563
Ned Deily36820b62014-06-25 13:44:22 -07008564 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8565 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8566 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8567 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8568 if test ${dep_target_major} -eq 10 && \
8569 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008570 then
Ned Deily36820b62014-06-25 13:44:22 -07008571 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008572 LDSHARED='$(CC) -bundle'
8573 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008574 if test "$enable_framework" ; then
8575 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008576 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8577 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008578 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008579 else
8580 # No framework, use the Python app as bundle-loader
8581 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8582 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008583 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008584 fi
Ned Deily36820b62014-06-25 13:44:22 -07008585 else
8586 # building for OS X 10.3 and later
8587 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8588 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8589 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008590 fi
8591 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008592 Linux*|GNU*|QNX*)
8593 LDSHARED='$(CC) -shared'
8594 LDCXXSHARED='$(CXX) -shared';;
8595 BSD/OS*/4*)
8596 LDSHARED="gcc -shared"
8597 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008598 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008599 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008600 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008601 LDSHARED='$(CC) -shared'
8602 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008603 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008604 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008605 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008606 OpenBSD*)
8607 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8608 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008609 LDSHARED='$(CC) -shared $(CCSHARED)'
8610 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008611 else
8612 case `uname -r` in
8613 [01].* | 2.[0-7] | 2.[0-7].*)
8614 LDSHARED="ld -Bshareable ${LDFLAGS}"
8615 ;;
8616 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008617 LDSHARED='$(CC) -shared $(CCSHARED)'
8618 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008619 ;;
8620 esac
8621 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008622 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008623 LDSHARED='$(CC) -shared'
8624 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008625 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008626 if test "$GCC" = "yes" ; then
8627 LDSHARED='$(CC) -shared'
8628 LDCXXSHARED='$(CXX) -shared'
8629 else
8630 LDSHARED='$(CC) -G'
8631 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008632 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008633 SCO_SV*)
8634 LDSHARED='$(CC) -Wl,-G,-Bexport'
8635 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8636 CYGWIN*)
8637 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8638 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008639 *) LDSHARED="ld";;
8640 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8643$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008644LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008645BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008646# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008647# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8649$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008650if test -z "$CCSHARED"
8651then
Guido van Rossum07397971997-04-29 21:49:50 +00008652 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008653 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008654 then CCSHARED="-fPIC";
8655 elif test `uname -p` = sparc;
8656 then CCSHARED="-xcode=pic32";
8657 else CCSHARED="-Kpic";
8658 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008659 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008660 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008661 else CCSHARED="+z";
8662 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008663 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008664 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008665 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008666 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008667 if test "$GCC" = "yes"
8668 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008669 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008670 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008671 SCO_SV*)
8672 if test "$GCC" = "yes"
8673 then CCSHARED="-fPIC"
8674 else CCSHARED="-Kpic -belf"
8675 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008676 IRIX*/6*) case $CC in
8677 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008678 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008679 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008680 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8683$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008684# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008685# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8687$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008688if test -z "$LINKFORSHARED"
8689then
Guido van Rossum07397971997-04-29 21:49:50 +00008690 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008691 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008692 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008693 LINKFORSHARED="-Wl,-E -Wl,+s";;
8694# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008695 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008696 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008697 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008699 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008700
8701 # Issue #18075: the default maximum stack size (8MBytes) is too
8702 # small for the default recursion limit. Increase the stack size
8703 # to ensure that tests don't crash
8704 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8705
Jack Jansene578a632001-08-15 01:27:14 +00008706 if test "$enable_framework"
8707 then
Jack Jansenda49e192005-01-07 13:08:22 +00008708 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008709 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008710 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008711 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008712 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008713 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008714 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008715 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8716 then
8717 LINKFORSHARED="-Wl,--export-dynamic"
8718 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008719 SunOS/5*) case $CC in
8720 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008721 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008722 then
8723 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008724 fi;;
8725 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008726 CYGWIN*)
8727 if test $enable_shared = "no"
8728 then
8729 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8730 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008731 QNX*)
8732 # -Wl,-E causes the symbols to be added to the dynamic
8733 # symbol table so that they can be found when a module
8734 # is loaded. -N 2048K causes the stack size to be set
8735 # to 2048 kilobytes so that the stack doesn't overflow
8736 # when running test_compile.py.
8737 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008738 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8741$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008742
Michael W. Hudson54241132001-12-07 15:38:26 +00008743
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008744
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8746$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008747if test ! "$LIBRARY" = "$LDLIBRARY"
8748then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008749 case $ac_sys_system in
8750 CYGWIN*)
8751 # Cygwin needs CCSHARED when building extension DLLs
8752 # but not when building the interpreter DLL.
8753 CFLAGSFORSHARED='';;
8754 *)
8755 CFLAGSFORSHARED='$(CCSHARED)'
8756 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8759$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008760
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008761# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8762# library (with --enable-shared).
8763# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008764# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8765# if it is not required, since it creates a dependency of the shared library
8766# to LIBS. This, in turn, means that applications linking the shared libpython
8767# don't need to link LIBS explicitly. The default should be only changed
8768# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008769
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8771$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008772case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008773 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008774 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008775esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8777$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008778
8779
Guido van Rossum627b2d71993-12-24 10:39:16 +00008780# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8782$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008783if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008784 $as_echo_n "(cached) " >&6
8785else
8786 ac_check_lib_save_LIBS=$LIBS
8787LIBS="-lsendfile $LIBS"
8788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8789/* end confdefs.h. */
8790
8791/* Override any GCC internal prototype to avoid an error.
8792 Use char because int might match the return type of a GCC
8793 builtin and then its argument prototype would still apply. */
8794#ifdef __cplusplus
8795extern "C"
8796#endif
8797char sendfile ();
8798int
8799main ()
8800{
8801return sendfile ();
8802 ;
8803 return 0;
8804}
8805_ACEOF
8806if ac_fn_c_try_link "$LINENO"; then :
8807 ac_cv_lib_sendfile_sendfile=yes
8808else
8809 ac_cv_lib_sendfile_sendfile=no
8810fi
8811rm -f core conftest.err conftest.$ac_objext \
8812 conftest$ac_exeext conftest.$ac_ext
8813LIBS=$ac_check_lib_save_LIBS
8814fi
8815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8816$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008817if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008818 cat >>confdefs.h <<_ACEOF
8819#define HAVE_LIBSENDFILE 1
8820_ACEOF
8821
8822 LIBS="-lsendfile $LIBS"
8823
8824fi
8825
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8827$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008828if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008830else
Martin v. Löwis11437992002-04-12 09:54:03 +00008831 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008832LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836/* Override any GCC internal prototype to avoid an error.
8837 Use char because int might match the return type of a GCC
8838 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008839#ifdef __cplusplus
8840extern "C"
8841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008842char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008843int
8844main ()
8845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008846return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008847 ;
8848 return 0;
8849}
8850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008851if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008853else
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008856rm -f core conftest.err conftest.$ac_objext \
8857 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008858LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8861$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008862if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 cat >>confdefs.h <<_ACEOF
8864#define HAVE_LIBDL 1
8865_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008866
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008867 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008868
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008869fi
8870 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8872$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008873if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008874 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008875else
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008877LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881/* Override any GCC internal prototype to avoid an error.
8882 Use char because int might match the return type of a GCC
8883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008884#ifdef __cplusplus
8885extern "C"
8886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008887char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008888int
8889main ()
8890{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ;
8893 return 0;
8894}
8895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008896if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008897 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008898else
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901rm -f core conftest.err conftest.$ac_objext \
8902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008903LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8906$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008907if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 cat >>confdefs.h <<_ACEOF
8909#define HAVE_LIBDLD 1
8910_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008911
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008912 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008913
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008914fi
8915 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008916
Georg Brandlb1441c72009-01-03 22:33:39 +00008917# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008918if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8920$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008921if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008923else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008924 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008928/* Override any GCC internal prototype to avoid an error.
8929 Use char because int might match the return type of a GCC
8930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008931#ifdef __cplusplus
8932extern "C"
8933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008934char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008935int
8936main ()
8937{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 ;
8940 return 0;
8941}
8942_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943for ac_lib in '' pthread rt posix4; do
8944 if test -z "$ac_lib"; then
8945 ac_res="none required"
8946 else
8947 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008948 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008951 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008953rm -f core conftest.err conftest.$ac_objext \
8954 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008955 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008956 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008958done
Victor Stinnere0be4232011-10-25 13:06:09 +02008959if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961else
8962 ac_cv_search_sem_init=no
8963fi
8964rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008965LIBS=$ac_func_search_save_LIBS
8966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8968$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008969ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008970if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008971 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008972
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008973fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008974 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008975 # posix4 on Solaris 2.6
8976 # pthread (first!) on Linux
8977fi
8978
Martin v. Löwis19d17342003-06-14 21:03:05 +00008979# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8981$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008982if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008984else
8985 ac_check_lib_save_LIBS=$LIBS
8986LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008988/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990/* Override any GCC internal prototype to avoid an error.
8991 Use char because int might match the return type of a GCC
8992 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008993#ifdef __cplusplus
8994extern "C"
8995#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008996char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008997int
8998main ()
8999{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009000return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009001 ;
9002 return 0;
9003}
9004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009005if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009006 ac_cv_lib_intl_textdomain=yes
9007else
Matthias Kloseb9621712010-04-24 17:59:49 +00009008 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009010rm -f core conftest.err conftest.$ac_objext \
9011 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009012LIBS=$ac_check_lib_save_LIBS
9013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9015$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009016if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009017
Matthias Kloseb9621712010-04-24 17:59:49 +00009018$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009019
Brett Cannonc6d936e2009-06-07 20:09:53 +00009020 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009021fi
9022
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009023
9024# checks for system dependent C++ extensions support
9025case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9027$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009029/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009030
Georg Brandl59e87bd2011-02-15 19:48:59 +00009031 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009032int
9033main ()
9034{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009035loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 ;
9037 return 0;
9038}
Matthias Kloseb159a552010-04-25 21:00:44 +00009039
Martin v. Löwis11437992002-04-12 09:54:03 +00009040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009041if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009042
Matthias Kloseb159a552010-04-25 21:00:44 +00009043
Matthias Kloseb9621712010-04-24 17:59:49 +00009044$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009045
Matthias Kloseb159a552010-04-25 21:00:44 +00009046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009047$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009048
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009049else
Matthias Kloseb159a552010-04-25 21:00:44 +00009050
9051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009052$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009053
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009055rm -f core conftest.err conftest.$ac_objext \
9056 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009057 *) ;;
9058esac
9059
Christian Heimes985ecdc2013-11-20 11:46:18 +01009060# check for systems that require aligned memory access
9061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9062$as_echo_n "checking aligned memory access is required... " >&6; }
9063if test "$cross_compiling" = yes; then :
9064 aligned_required=yes
9065else
9066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9067/* end confdefs.h. */
9068
9069int main()
9070{
9071 char s[16];
9072 int i, *p1, *p2;
9073 for (i=0; i < 16; i++)
9074 s[i] = i;
9075 p1 = (int*)(s+1);
9076 p2 = (int*)(s+2);
9077 if (*p1 == *p2)
9078 return 1;
9079 return 0;
9080}
9081
9082_ACEOF
9083if ac_fn_c_try_run "$LINENO"; then :
9084 aligned_required=no
9085else
9086 aligned_required=yes
9087fi
9088rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9089 conftest.$ac_objext conftest.beam conftest.$ac_ext
9090fi
9091
9092
9093if test "$aligned_required" = yes ; then
9094
9095$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9096
9097fi
9098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9099$as_echo "$aligned_required" >&6; }
9100
9101
9102# str, bytes and memoryview hash algorithm
9103
9104
9105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9106$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9107
9108# Check whether --with-hash_algorithm was given.
9109if test "${with_hash_algorithm+set}" = set; then :
9110 withval=$with_hash_algorithm;
9111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9112$as_echo "$withval" >&6; }
9113case "$withval" in
9114 siphash24)
9115 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9116
9117 ;;
9118 fnv)
9119 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9120
9121 ;;
9122 *)
9123 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9124 ;;
9125esac
9126
9127else
9128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9129$as_echo "default" >&6; }
9130fi
9131
9132
Guido van Rossum70c7f481998-03-26 18:44:10 +00009133# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9135$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009136if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009137 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009138else
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009140LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144/* Override any GCC internal prototype to avoid an error.
9145 Use char because int might match the return type of a GCC
9146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009147#ifdef __cplusplus
9148extern "C"
9149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009150char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009151int
9152main ()
9153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009154return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 ;
9156 return 0;
9157}
9158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009161else
Matthias Kloseb9621712010-04-24 17:59:49 +00009162 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009164rm -f core conftest.err conftest.$ac_objext \
9165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009166LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9169$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009170if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009171 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009172fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009173 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9175$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009176if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009177 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009178else
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009180LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009183
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009184/* Override any GCC internal prototype to avoid an error.
9185 Use char because int might match the return type of a GCC
9186 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009187#ifdef __cplusplus
9188extern "C"
9189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009190char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009191int
9192main ()
9193{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009194return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009195 ;
9196 return 0;
9197}
9198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009199if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009200 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009201else
Matthias Kloseb9621712010-04-24 17:59:49 +00009202 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009204rm -f core conftest.err conftest.$ac_objext \
9205 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009206LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9209$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009210if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009211 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009212fi
9213 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009214
Matthias Kloseb9621712010-04-24 17:59:49 +00009215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9216$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009218# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009219if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009220 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9222$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009223LIBS="$withval $LIBS"
9224
9225else
Matthias Kloseb9621712010-04-24 17:59:49 +00009226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9227$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228fi
9229
Guido van Rossum7f43da71994-08-01 12:15:30 +00009230
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05009231
9232
9233
9234
9235
9236
9237
9238if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9239 if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009240 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9241set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9243$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009244if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009245 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009246else
9247 case $PKG_CONFIG in
9248 [\\/]* | ?:[\\/]*)
9249 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9250 ;;
9251 *)
9252 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9253for as_dir in $PATH
9254do
9255 IFS=$as_save_IFS
9256 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009257 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009258 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009259 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009260 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009261 break 2
9262 fi
9263done
Matthias Kloseb9621712010-04-24 17:59:49 +00009264 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009265IFS=$as_save_IFS
9266
9267 ;;
9268esac
9269fi
9270PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9271if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9273$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009274else
Matthias Kloseb9621712010-04-24 17:59:49 +00009275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9276$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009277fi
9278
9279
9280fi
9281if test -z "$ac_cv_path_PKG_CONFIG"; then
9282 ac_pt_PKG_CONFIG=$PKG_CONFIG
9283 # Extract the first word of "pkg-config", so it can be a program name with args.
9284set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9286$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009287if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009288 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009289else
9290 case $ac_pt_PKG_CONFIG in
9291 [\\/]* | ?:[\\/]*)
9292 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9293 ;;
9294 *)
9295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9296for as_dir in $PATH
9297do
9298 IFS=$as_save_IFS
9299 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009301 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009302 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009303 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009304 break 2
9305 fi
9306done
Matthias Kloseb9621712010-04-24 17:59:49 +00009307 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009308IFS=$as_save_IFS
9309
9310 ;;
9311esac
9312fi
9313ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9314if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9316$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009317else
Matthias Kloseb9621712010-04-24 17:59:49 +00009318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9319$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009320fi
9321
9322 if test "x$ac_pt_PKG_CONFIG" = x; then
9323 PKG_CONFIG=""
9324 else
9325 case $cross_compiling:$ac_tool_warned in
9326yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009327{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9328$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009329ac_tool_warned=yes ;;
9330esac
9331 PKG_CONFIG=$ac_pt_PKG_CONFIG
9332 fi
9333else
9334 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9335fi
9336
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05009337fi
9338if test -n "$PKG_CONFIG"; then
9339 _pkg_min_version=0.9.0
9340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9341$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9342 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9344$as_echo "yes" >&6; }
9345 else
9346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9347$as_echo "no" >&6; }
9348 PKG_CONFIG=""
9349 fi
9350fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009351
9352# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9354$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009355
9356# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009357if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009358 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009359else
9360 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009361fi
9362
9363
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9365$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009366
9367# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9369$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009370
9371# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009372if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009373 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009374else
9375 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009376fi
9377
9378
9379if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009380 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9381else
9382 LIBFFI_INCLUDEDIR=""
9383fi
9384
9385
Matthias Kloseb9621712010-04-24 17:59:49 +00009386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9387$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009388
Stefan Krah60187b52012-03-23 19:06:27 +01009389# Check for use of the system libmpdec library
9390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9391$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9392
9393# Check whether --with-system_libmpdec was given.
9394if test "${with_system_libmpdec+set}" = set; then :
9395 withval=$with_system_libmpdec;
9396else
9397 with_system_libmpdec="no"
9398fi
9399
9400
9401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9402$as_echo "$with_system_libmpdec" >&6; }
9403
Benjamin Peterson076ed002010-10-31 17:11:02 +00009404# Check for support for loadable sqlite extensions
9405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9406$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9407# Check whether --enable-loadable-sqlite-extensions was given.
9408if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9409 enableval=$enable_loadable_sqlite_extensions;
9410else
9411 enable_loadable_sqlite_extensions="no"
9412fi
9413
9414
9415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9416$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9417
Ned Deilyd819b932013-09-06 01:07:05 -07009418# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9419
9420
9421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9422$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9423
9424# Check whether --with-tcltk-includes was given.
9425if test "${with_tcltk_includes+set}" = set; then :
9426 withval=$with_tcltk_includes;
9427else
9428 with_tcltk_includes="default"
9429fi
9430
9431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9432$as_echo "$with_tcltk_includes" >&6; }
9433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9434$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9435
9436# Check whether --with-tcltk-libs was given.
9437if test "${with_tcltk_libs+set}" = set; then :
9438 withval=$with_tcltk_libs;
9439else
9440 with_tcltk_libs="default"
9441fi
9442
9443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9444$as_echo "$with_tcltk_libs" >&6; }
9445if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9446then
9447 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9448 then
9449 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9450 fi
9451 TCLTK_INCLUDES=""
9452 TCLTK_LIBS=""
9453else
9454 TCLTK_INCLUDES="$with_tcltk_includes"
9455 TCLTK_LIBS="$with_tcltk_libs"
9456fi
9457
Matthias Klose55708cc2009-04-30 08:06:49 +00009458# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9460$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009461
9462# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009463if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009464 withval=$with_dbmliborder;
9465if test x$with_dbmliborder = xyes
9466then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009467as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009468else
9469 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9470 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9471 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009472 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009473 fi
9474 done
9475fi
9476fi
9477
Matthias Kloseb9621712010-04-24 17:59:49 +00009478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9479$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009480
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009481# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009482
9483
Matthias Kloseb9621712010-04-24 17:59:49 +00009484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9485$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009486
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009487# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009488if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009489 withval=$with_signal_module;
9490fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009491
9492
9493if test -z "$with_signal_module"
9494then with_signal_module="yes"
9495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9497$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009498
9499if test "${with_signal_module}" = "yes"; then
9500 USE_SIGNAL_MODULE=""
9501 SIGNAL_OBJS=""
9502else
9503 USE_SIGNAL_MODULE="#"
9504 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9505fi
9506
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009507# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009508
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009509USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511
Martin v. Löwis11437992002-04-12 09:54:03 +00009512
9513# Templates for things AC_DEFINEd more than once.
9514# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009515
9516
Martin v. Löwis11437992002-04-12 09:54:03 +00009517
Matthias Kloseb9621712010-04-24 17:59:49 +00009518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9519$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009521# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009522if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009523 withval=$with_threads;
9524fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009525
9526
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009527# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009530if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531 withval=$with_thread; with_threads=$with_thread
9532fi
9533
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009534
9535if test -z "$with_threads"
9536then with_threads="yes"
9537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9539$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009540
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009541
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009542if test "$with_threads" = "no"
9543then
9544 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009545elif test "$ac_cv_pthread_is_default" = yes
9546then
Matthias Kloseb9621712010-04-24 17:59:49 +00009547 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009548
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009549 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009550 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009551
9552 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009554elif test "$ac_cv_kpthread" = "yes"
9555then
9556 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009557 if test "$ac_cv_cxx_thread" = "yes"; then
9558 CXX="$CXX -Kpthread"
9559 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009560 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009561
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009562 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009563 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009564elif test "$ac_cv_kthread" = "yes"
9565then
9566 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009567 if test "$ac_cv_cxx_thread" = "yes"; then
9568 CXX="$CXX -Kthread"
9569 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009570 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009571
9572 posix_threads=yes
9573 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009574elif test "$ac_cv_pthread" = "yes"
9575then
9576 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009577 if test "$ac_cv_cxx_thread" = "yes"; then
9578 CXX="$CXX -pthread"
9579 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009580 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009581
9582 posix_threads=yes
9583 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009584else
9585 if test ! -z "$with_threads" -a -d "$with_threads"
9586 then LDFLAGS="$LDFLAGS -L$with_threads"
9587 fi
9588 if test ! -z "$withval" -a -d "$withval"
9589 then LDFLAGS="$LDFLAGS -L$withval"
9590 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009591
9592 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009593 # define _POSIX_THREADS in unistd.h. Some apparently don't
9594 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9596$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009598/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009599
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009600#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009601#ifdef _POSIX_THREADS
9602yes
9603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009604
9605_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009606if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009607 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009608 unistd_defines_pthreads=yes
9609else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009610 unistd_defines_pthreads=no
9611fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009612rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009613
Matthias Kloseb9621712010-04-24 17:59:49 +00009614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9615$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009616
Matthias Kloseb9621712010-04-24 17:59:49 +00009617 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009618
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009619 # Just looking for pthread_create in libpthread is not enough:
9620 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9621 # So we really have to include pthread.h, and then link.
9622 _libs=$LIBS
9623 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9625$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009627/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009628
9629#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009630#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009631
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009632void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009633int
9634main ()
9635{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009636
9637pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 ;
9639 return 0;
9640}
9641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009642if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009643
Matthias Kloseb9621712010-04-24 17:59:49 +00009644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9645$as_echo "yes" >&6; }
9646 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009647
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009648 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009649 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009650else
Martin v. Löwis11437992002-04-12 09:54:03 +00009651
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009652 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009653 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009654if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009655 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009656
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009657 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009658 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009659else
Guido van Rossumad678af1998-10-02 14:42:15 +00009660
Matthias Kloseb9621712010-04-24 17:59:49 +00009661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9662$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009663if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009664 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009665else
Martin v. Löwis11437992002-04-12 09:54:03 +00009666 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009667LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009671/* Override any GCC internal prototype to avoid an error.
9672 Use char because int might match the return type of a GCC
9673 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009674#ifdef __cplusplus
9675extern "C"
9676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009677char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009678int
9679main ()
9680{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 ;
9683 return 0;
9684}
9685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009686if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009688else
Matthias Kloseb9621712010-04-24 17:59:49 +00009689 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009691rm -f core conftest.err conftest.$ac_objext \
9692 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009693LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9696$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009697if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009699
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009700 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009701 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009702 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009703else
Greg Steinadf63d62000-07-05 10:38:09 +00009704
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9706$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009707if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009709else
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009711LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009715/* Override any GCC internal prototype to avoid an error.
9716 Use char because int might match the return type of a GCC
9717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009718#ifdef __cplusplus
9719extern "C"
9720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009721char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009722int
9723main ()
9724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009725return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009726 ;
9727 return 0;
9728}
9729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009730if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009732else
Matthias Kloseb9621712010-04-24 17:59:49 +00009733 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009735rm -f core conftest.err conftest.$ac_objext \
9736 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009737LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9740$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009741if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009742 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009743
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009744 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009745 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009746 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009747else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009748
Matthias Kloseb9621712010-04-24 17:59:49 +00009749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9750$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009751if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009753else
Martin v. Löwis11437992002-04-12 09:54:03 +00009754 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009755LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759/* Override any GCC internal prototype to avoid an error.
9760 Use char because int might match the return type of a GCC
9761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009762#ifdef __cplusplus
9763extern "C"
9764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009765char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009766int
9767main ()
9768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009770 ;
9771 return 0;
9772}
9773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009774if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009776else
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009779rm -f core conftest.err conftest.$ac_objext \
9780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009781LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9784$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009785if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009786 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009787
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009788 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009789 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009790 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009791else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009792
Matthias Kloseb9621712010-04-24 17:59:49 +00009793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9794$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009795if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009796 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009797else
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009799LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009803/* Override any GCC internal prototype to avoid an error.
9804 Use char because int might match the return type of a GCC
9805 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009806#ifdef __cplusplus
9807extern "C"
9808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009809char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009810int
9811main ()
9812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 ;
9815 return 0;
9816}
9817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009818if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009819 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009820else
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009823rm -f core conftest.err conftest.$ac_objext \
9824 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009825LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9828$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009829if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009830 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009831
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009832 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009833 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009834 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009835else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009836
Martin v. Löwis130fb172001-07-19 11:00:41 +00009837 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009838fi
9839
Guido van Rossum627b2d71993-12-24 10:39:16 +00009840
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009841fi
9842
Guido van Rossum0be3e491997-05-22 20:33:33 +00009843fi
9844
Guido van Rossum49545951997-12-02 19:28:29 +00009845fi
9846
Guido van Rossumb93a8621998-05-07 13:27:32 +00009847fi
9848
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009850rm -f core conftest.err conftest.$ac_objext \
9851 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009852
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9854$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009855if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009857else
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009859LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863/* Override any GCC internal prototype to avoid an error.
9864 Use char because int might match the return type of a GCC
9865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009866#ifdef __cplusplus
9867extern "C"
9868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009869char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009870int
9871main ()
9872{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009873return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 ;
9875 return 0;
9876}
9877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009878if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009879 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009880else
Matthias Kloseb9621712010-04-24 17:59:49 +00009881 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009883rm -f core conftest.err conftest.$ac_objext \
9884 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009885LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9888$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009889if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009890 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009891
Martin v. Löwis130fb172001-07-19 11:00:41 +00009892 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009893 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009894 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009895fi
9896
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009897
Neal Norwitza978ab02002-11-02 16:58:05 +00009898 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9900$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009901if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009902 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009903else
Martin v. Löwis11437992002-04-12 09:54:03 +00009904 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009905LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009909/* Override any GCC internal prototype to avoid an error.
9910 Use char because int might match the return type of a GCC
9911 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009912#ifdef __cplusplus
9913extern "C"
9914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009915char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009916int
9917main ()
9918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009919return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 ;
9921 return 0;
9922}
9923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009926else
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009929rm -f core conftest.err conftest.$ac_objext \
9930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009931LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9934$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009935if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009937
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009938 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009939 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009940 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009941fi
9942
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009943 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009944fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009945
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009946if test "$posix_threads" = "yes"; then
9947 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009948
Matthias Kloseb9621712010-04-24 17:59:49 +00009949$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009950
9951 fi
9952
9953 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9954 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009955 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009956$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009957
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009958 ;;
9959 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009960$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009961
9962 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009963 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009964$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009965
9966 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009967 esac
9968
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9970$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009971 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009972 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009973else
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009975 ac_cv_pthread_system_supported=no
9976else
Matthias Kloseb9621712010-04-24 17:59:49 +00009977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009978/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009979
9980 #include <stdio.h>
9981 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009982 void *foo(void *parm) {
9983 return NULL;
9984 }
9985 main() {
9986 pthread_attr_t attr;
9987 pthread_t id;
9988 if (pthread_attr_init(&attr)) exit(-1);
9989 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9990 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9991 exit(0);
9992 }
9993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009994if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009995 ac_cv_pthread_system_supported=yes
9996else
Matthias Kloseb9621712010-04-24 17:59:49 +00009997 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10000 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010001fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010003
Guido van Rossum627b2d71993-12-24 10:39:16 +000010004fi
10005
Matthias Kloseb9621712010-04-24 17:59:49 +000010006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10007$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010008 if test "$ac_cv_pthread_system_supported" = "yes"; then
10009
Matthias Kloseb9621712010-04-24 17:59:49 +000010010$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010011
10012 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010013 for ac_func in pthread_sigmask
10014do :
10015 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010016if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010017 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010018#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010019_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010020 case $ac_sys_system in
10021 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010022
Matthias Kloseb9621712010-04-24 17:59:49 +000010023$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010024
10025 ;;
10026 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010027fi
10028done
10029
Christian Heimesf77b4b22013-08-21 13:26:05 +020010030 for ac_func in pthread_atfork
10031do :
10032 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10033if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10034 cat >>confdefs.h <<_ACEOF
10035#define HAVE_PTHREAD_ATFORK 1
10036_ACEOF
10037
10038fi
10039done
10040
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010041fi
10042
10043
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010044# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010045
Matthias Kloseb9621712010-04-24 17:59:49 +000010046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10047$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010049if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010050 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010051 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010054 ipv6=no
10055 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010056 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10057$as_echo "yes" >&6; }
10058 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010059
10060 ipv6=yes
10061 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010062 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010063else
Martin v. Löwis11437992002-04-12 09:54:03 +000010064
Matthias Kloseb9621712010-04-24 17:59:49 +000010065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010066/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010067 /* AF_INET6 available check */
10068#include <sys/types.h>
10069#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010070int
10071main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010072{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010073int domain = AF_INET6;
10074 ;
10075 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010076}
Martin v. Löwis11437992002-04-12 09:54:03 +000010077_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010078if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010079
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10081$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010082 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010083
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010084else
Matthias Kloseb159a552010-04-25 21:00:44 +000010085
Matthias Kloseb9621712010-04-24 17:59:49 +000010086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10087$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010088 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010089
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010090fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010093if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10095$as_echo_n "checking if RFC2553 API is available... " >&6; }
10096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010097/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010098
10099 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010100#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010101int
10102main ()
10103{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010104struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010105 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010106 ;
10107 return 0;
10108}
Matthias Kloseb159a552010-04-25 21:00:44 +000010109
Martin v. Löwis11437992002-04-12 09:54:03 +000010110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010111if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010112
10113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010114$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010115 ipv6=yes
10116
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010117else
Matthias Kloseb159a552010-04-25 21:00:44 +000010118
10119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010120$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010121 ipv6=no
10122
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010125fi
10126
10127if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010129
10130fi
10131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132fi
10133
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010134
10135ipv6type=unknown
10136ipv6lib=none
10137ipv6trylibc=no
10138
10139if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10141$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010142 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10143 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010144 case $i in
10145 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010147/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010148
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010149#include <netinet/in.h>
10150#ifdef IPV6_INRIA_VERSION
10151yes
10152#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010153_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010155 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010156 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010157fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010158rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010159
10160 ;;
10161 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010163/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010164
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010165#include <netinet/in.h>
10166#ifdef __KAME__
10167yes
10168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010169_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010172 ipv6type=$i;
10173 ipv6lib=inet6
10174 ipv6libdir=/usr/local/v6/lib
10175 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010176fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010177rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010178
10179 ;;
10180 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010182/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010183
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010184#include <features.h>
10185#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10186yes
10187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010188_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010189if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010191 ipv6type=$i;
10192 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010193fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010194rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010195
10196 ;;
10197 linux-inet6)
10198 if test -d /usr/inet6; then
10199 ipv6type=$i
10200 ipv6lib=inet6
10201 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010202 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010203 fi
10204 ;;
10205 solaris)
10206 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010207 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010208 ipv6type=$i
10209 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010210 fi
10211 fi
10212 ;;
10213 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010216
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010217#include <sys/param.h>
10218#ifdef _TOSHIBA_INET6
10219yes
10220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010221_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010224 ipv6type=$i;
10225 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010226 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010227fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010228rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010229
10230 ;;
10231 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010233/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010234
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010235#include </usr/local/v6/include/sys/v6config.h>
10236#ifdef __V6D__
10237yes
10238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010239_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010240if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010242 ipv6type=$i;
10243 ipv6lib=v6;
10244 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010245 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010246fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010247rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010248
10249 ;;
10250 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010252/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010253
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010254#include <sys/param.h>
10255#ifdef _ZETA_MINAMI_INET6
10256yes
10257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010258_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010259if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010260 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010261 ipv6type=$i;
10262 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010263 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010264fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010265rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010266
10267 ;;
10268 esac
10269 if test "$ipv6type" != "unknown"; then
10270 break
10271 fi
10272 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10274$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010275fi
10276
10277if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10278 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10279 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10280 echo "using lib$ipv6lib"
10281 else
10282 if test $ipv6trylibc = "yes"; then
10283 echo "using libc"
10284 else
10285 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10286 echo "You need to fetch lib$ipv6lib.a from appropriate"
10287 echo 'ipv6 kit and compile beforehand.'
10288 exit 1
10289 fi
10290 fi
10291fi
10292
Matthias Kloseb9621712010-04-24 17:59:49 +000010293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10294$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010296/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010297
10298 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010299int
10300main ()
10301{
10302FSIORefNum fRef = 0
10303 ;
10304 return 0;
10305}
Matthias Kloseb159a552010-04-25 21:00:44 +000010306
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010308if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010309
Matthias Kloseb159a552010-04-25 21:00:44 +000010310
Matthias Kloseb9621712010-04-24 17:59:49 +000010311$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010312
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10314$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010315
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010316else
Matthias Kloseb159a552010-04-25 21:00:44 +000010317
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10319$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010320
10321fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10323
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010324# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10326$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010328# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010329if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010330 withval=$with_doc_strings;
10331fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010332
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010333
10334if test -z "$with_doc_strings"
10335then with_doc_strings="yes"
10336fi
10337if test "$with_doc_strings" != "no"
10338then
10339
Matthias Kloseb9621712010-04-24 17:59:49 +000010340$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010341
10342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10344$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010345
Antoine Pitrou042b1282010-08-13 21:15:58 +000010346# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10348$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010351if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010352 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010353if test "$withval" != no
10354then
10355
Matthias Kloseb9621712010-04-24 17:59:49 +000010356$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010357
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10359$as_echo "yes" >&6; }
10360else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10361$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010362fi
10363else
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010366fi
10367
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010368
10369# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10371$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010373# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010374if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010375 withval=$with_pymalloc;
10376fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010377
Neil Schemenauera35c6882001-02-27 04:45:05 +000010378
Neil Schemenauer16c22972002-03-22 15:34:49 +000010379if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010380then
10381 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010382fi
10383if test "$with_pymalloc" != "no"
10384then
Martin v. Löwis11437992002-04-12 09:54:03 +000010385
Matthias Kloseb9621712010-04-24 17:59:49 +000010386$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010387
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010388 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10391$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010392
Benjamin Peterson05159c42009-12-03 03:01:27 +000010393# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10395$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010396
10397# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010398if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010399 withval=$with_valgrind;
10400else
10401 with_valgrind=no
10402fi
10403
Matthias Kloseb9621712010-04-24 17:59:49 +000010404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10405$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010406if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010407 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 +020010408if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010409
Matthias Kloseb9621712010-04-24 17:59:49 +000010410$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010411
10412else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010413 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010414
10415fi
10416
10417
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010418 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010419fi
10420
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010421# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010422
Guido van Rossum98935bf2001-09-05 19:13:16 +000010423DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010424
Guido van Rossume97ee181999-12-20 21:27:22 +000010425# the dlopen() function means we might want to use dynload_shlib.o. some
10426# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010427for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010428do :
10429 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010430if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010431 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010432#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010433_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010434
Guido van Rossume97ee181999-12-20 21:27:22 +000010435fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010436done
Guido van Rossume97ee181999-12-20 21:27:22 +000010437
Michael W. Hudson54241132001-12-07 15:38:26 +000010438
Guido van Rossume97ee181999-12-20 21:27:22 +000010439# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10440# loading of modules.
10441
Matthias Kloseb9621712010-04-24 17:59:49 +000010442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10443$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010444if test -z "$DYNLOADFILE"
10445then
10446 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010447 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10448 if test "$ac_cv_func_dlopen" = yes
10449 then DYNLOADFILE="dynload_shlib.o"
10450 else DYNLOADFILE="dynload_aix.o"
10451 fi
10452 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010453 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010454 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10455 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010456 *)
10457 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10458 # out any dynamic loading
10459 if test "$ac_cv_func_dlopen" = yes
10460 then DYNLOADFILE="dynload_shlib.o"
10461 else DYNLOADFILE="dynload_stub.o"
10462 fi
10463 ;;
10464 esac
10465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10467$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010468if test "$DYNLOADFILE" != "dynload_stub.o"
10469then
Martin v. Löwis11437992002-04-12 09:54:03 +000010470
Matthias Kloseb9621712010-04-24 17:59:49 +000010471$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010472
10473fi
10474
Neil Schemenauer4e425612001-06-19 15:44:15 +000010475# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10476
Michael W. Hudson54241132001-12-07 15:38:26 +000010477
Matthias Kloseb9621712010-04-24 17:59:49 +000010478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10479$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010480if test -z "$MACHDEP_OBJS"
10481then
Jack Jansene578a632001-08-15 01:27:14 +000010482 MACHDEP_OBJS=$extra_machdep_objs
10483else
10484 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010485fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010486if test -z "$MACHDEP_OBJS"; then
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10488$as_echo "none" >&6; }
10489else
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10491$as_echo "$MACHDEP_OBJS" >&6; }
10492fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010493
Guido van Rossum627b2d71993-12-24 10:39:16 +000010494# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010495for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010496 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010497 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010498 futimens futimes gai_strerror \
10499 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010500 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010501 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010502 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10503 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010504 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010505 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010506 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010507 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010508 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010509 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010510 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10511 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010512 sigaction sigaltstack siginterrupt sigpending sigrelse \
10513 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010514 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010515 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010516 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010517do :
10518 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10519ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010520if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010522#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010523_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010524
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010525fi
10526done
10527
Michael W. Hudson54241132001-12-07 15:38:26 +000010528
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010529ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10530 #include <dirent.h>
10531"
10532if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10533
10534$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10535
10536fi
10537
10538
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010539# For some functions, having a definition is not sufficient, since
10540# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10542$as_echo_n "checking for chroot... " >&6; }
10543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010544/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010545#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010546int
10547main ()
10548{
10549void *x=chroot
10550 ;
10551 return 0;
10552}
10553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010554if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010555
Matthias Kloseb9621712010-04-24 17:59:49 +000010556$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010557
Matthias Kloseb159a552010-04-25 21:00:44 +000010558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010559$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010560else
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010563
10564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10567$as_echo_n "checking for link... " >&6; }
10568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010569/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010570#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010571int
10572main ()
10573{
10574void *x=link
10575 ;
10576 return 0;
10577}
10578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010580
Matthias Kloseb9621712010-04-24 17:59:49 +000010581$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010582
Matthias Kloseb159a552010-04-25 21:00:44 +000010583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010584$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010585else
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10587$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010588
10589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10592$as_echo_n "checking for symlink... " >&6; }
10593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010594/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010595#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010596int
10597main ()
10598{
10599void *x=symlink
10600 ;
10601 return 0;
10602}
10603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010605
Matthias Kloseb9621712010-04-24 17:59:49 +000010606$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010607
Matthias Kloseb159a552010-04-25 21:00:44 +000010608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010609$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010610else
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10612$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010613
10614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10617$as_echo_n "checking for fchdir... " >&6; }
10618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010619/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010620#include <unistd.h>
10621int
10622main ()
10623{
10624void *x=fchdir
10625 ;
10626 return 0;
10627}
10628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010629if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010630
Matthias Kloseb9621712010-04-24 17:59:49 +000010631$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010632
Matthias Kloseb159a552010-04-25 21:00:44 +000010633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010634$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010635else
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10637$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010638
10639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10642$as_echo_n "checking for fsync... " >&6; }
10643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010644/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010645#include <unistd.h>
10646int
10647main ()
10648{
10649void *x=fsync
10650 ;
10651 return 0;
10652}
10653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010654if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010655
Matthias Kloseb9621712010-04-24 17:59:49 +000010656$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010657
Matthias Kloseb159a552010-04-25 21:00:44 +000010658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010659$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010660else
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10662$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010663
10664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10667$as_echo_n "checking for fdatasync... " >&6; }
10668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010669/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010670#include <unistd.h>
10671int
10672main ()
10673{
10674void *x=fdatasync
10675 ;
10676 return 0;
10677}
10678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010679if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010680
Matthias Kloseb9621712010-04-24 17:59:49 +000010681$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010682
Matthias Kloseb159a552010-04-25 21:00:44 +000010683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010684$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010685else
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10687$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010688
10689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10692$as_echo_n "checking for epoll... " >&6; }
10693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010694/* end confdefs.h. */
10695#include <sys/epoll.h>
10696int
10697main ()
10698{
10699void *x=epoll_create
10700 ;
10701 return 0;
10702}
10703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010704if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010707
Matthias Kloseb159a552010-04-25 21:00:44 +000010708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010709$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010710else
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10712$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010713
10714fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10717$as_echo_n "checking for epoll_create1... " >&6; }
10718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10719/* end confdefs.h. */
10720#include <sys/epoll.h>
10721int
10722main ()
10723{
10724void *x=epoll_create1
10725 ;
10726 return 0;
10727}
10728_ACEOF
10729if ac_fn_c_try_compile "$LINENO"; then :
10730
10731$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10732
10733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10734$as_echo "yes" >&6; }
10735else
10736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10737$as_echo "no" >&6; }
10738
10739fi
10740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10742$as_echo_n "checking for kqueue... " >&6; }
10743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010744/* end confdefs.h. */
10745
10746#include <sys/types.h>
10747#include <sys/event.h>
10748
10749int
10750main ()
10751{
10752int x=kqueue()
10753 ;
10754 return 0;
10755}
10756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010757if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010758
Matthias Kloseb9621712010-04-24 17:59:49 +000010759$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010760
Matthias Kloseb159a552010-04-25 21:00:44 +000010761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010762$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010763else
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10765$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010766
10767fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10770$as_echo_n "checking for prlimit... " >&6; }
10771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10772/* end confdefs.h. */
10773
10774#include <sys/time.h>
10775#include <sys/resource.h>
10776
10777int
10778main ()
10779{
10780void *x=prlimit
10781 ;
10782 return 0;
10783}
10784_ACEOF
10785if ac_fn_c_try_compile "$LINENO"; then :
10786
10787$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10788
10789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10790$as_echo "yes" >&6; }
10791else
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10793$as_echo "no" >&6; }
10794
10795fi
10796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10797
Martin v. Löwisd5843682002-11-21 20:41:28 +000010798# On some systems (eg. FreeBSD 5), we would find a definition of the
10799# functions ctermid_r, setgroups in the library, but no prototype
10800# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10801# address to avoid compiler warnings and potential miscompilations
10802# because of the missing prototypes.
10803
Matthias Kloseb9621712010-04-24 17:59:49 +000010804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10805$as_echo_n "checking for ctermid_r... " >&6; }
10806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010807/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010808
Martin v. Löwisd5843682002-11-21 20:41:28 +000010809#include <stdio.h>
10810
Martin v. Löwisd5843682002-11-21 20:41:28 +000010811int
10812main ()
10813{
10814void* p = ctermid_r
10815 ;
10816 return 0;
10817}
10818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010819if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010820
Matthias Kloseb9621712010-04-24 17:59:49 +000010821$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010822
Matthias Kloseb159a552010-04-25 21:00:44 +000010823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010824$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010825else
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10827$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010828
10829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10831
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10833$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010834if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010835 $as_echo_n "(cached) " >&6
10836else
10837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010838/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010839#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010840int
10841main ()
10842{
10843void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010844
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010845 ;
10846 return 0;
10847}
10848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010849if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010850 ac_cv_flock_decl=yes
10851else
10852 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010853
10854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010856
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010857fi
10858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10859$as_echo "$ac_cv_flock_decl" >&6; }
10860if test "x${ac_cv_flock_decl}" = xyes; then
10861 for ac_func in flock
10862do :
10863 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010864if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010865 cat >>confdefs.h <<_ACEOF
10866#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010867_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010868
Antoine Pitroua3000072010-09-07 14:52:42 +000010869else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010871$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010872if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010873 $as_echo_n "(cached) " >&6
10874else
10875 ac_check_lib_save_LIBS=$LIBS
10876LIBS="-lbsd $LIBS"
10877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10878/* end confdefs.h. */
10879
10880/* Override any GCC internal prototype to avoid an error.
10881 Use char because int might match the return type of a GCC
10882 builtin and then its argument prototype would still apply. */
10883#ifdef __cplusplus
10884extern "C"
10885#endif
10886char flock ();
10887int
10888main ()
10889{
10890return flock ();
10891 ;
10892 return 0;
10893}
10894_ACEOF
10895if ac_fn_c_try_link "$LINENO"; then :
10896 ac_cv_lib_bsd_flock=yes
10897else
10898 ac_cv_lib_bsd_flock=no
10899fi
10900rm -f core conftest.err conftest.$ac_objext \
10901 conftest$ac_exeext conftest.$ac_ext
10902LIBS=$ac_check_lib_save_LIBS
10903fi
10904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10905$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010906if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010907 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010908
10909
10910$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10911
10912
10913fi
10914
10915
10916fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010917done
10918
Antoine Pitroua3000072010-09-07 14:52:42 +000010919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10922$as_echo_n "checking for getpagesize... " >&6; }
10923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010924/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010925
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010926#include <unistd.h>
10927
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010928int
10929main ()
10930{
10931void* p = getpagesize
10932 ;
10933 return 0;
10934}
10935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010936if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010937
Matthias Kloseb9621712010-04-24 17:59:49 +000010938$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010939
Matthias Kloseb159a552010-04-25 21:00:44 +000010940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010941$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010942else
Matthias Kloseb9621712010-04-24 17:59:49 +000010943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10944$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010945
10946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010948
Victor Stinner984890f2011-11-24 13:53:38 +010010949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10950$as_echo_n "checking for broken unsetenv... " >&6; }
10951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10952/* end confdefs.h. */
10953
10954#include <stdlib.h>
10955
10956int
10957main ()
10958{
10959int res = unsetenv("DUMMY")
10960 ;
10961 return 0;
10962}
10963_ACEOF
10964if ac_fn_c_try_compile "$LINENO"; then :
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10966$as_echo "no" >&6; }
10967else
10968
10969$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10970
10971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10972$as_echo "yes" >&6; }
10973
10974fi
10975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10976
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010977for ac_prog in true
10978do
10979 # Extract the first word of "$ac_prog", so it can be a program name with args.
10980set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10982$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010983if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010985else
10986 if test -n "$TRUE"; then
10987 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10988else
10989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10990for as_dir in $PATH
10991do
10992 IFS=$as_save_IFS
10993 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010994 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010995 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010996 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 $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 +000010998 break 2
10999 fi
11000done
Matthias Kloseb9621712010-04-24 17:59:49 +000011001 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011003
11004fi
11005fi
11006TRUE=$ac_cv_prog_TRUE
11007if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11009$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011010else
Matthias Kloseb9621712010-04-24 17:59:49 +000011011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11012$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011013fi
11014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011015
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011016 test -n "$TRUE" && break
11017done
11018test -n "$TRUE" || TRUE="/bin/true"
11019
11020
Matthias Kloseb9621712010-04-24 17:59:49 +000011021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11022$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011023if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011024 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011025else
11026 ac_check_lib_save_LIBS=$LIBS
11027LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011029/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011031/* Override any GCC internal prototype to avoid an error.
11032 Use char because int might match the return type of a GCC
11033 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011034#ifdef __cplusplus
11035extern "C"
11036#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011037char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011038int
11039main ()
11040{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011041return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +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öwis95c419b2003-05-03 12:10:48 +000011047 ac_cv_lib_c_inet_aton=yes
11048else
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011050fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011051rm -f core conftest.err conftest.$ac_objext \
11052 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011053LIBS=$ac_check_lib_save_LIBS
11054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11056$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011057if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011058 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011059else
Matthias Kloseb9621712010-04-24 17:59:49 +000011060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11061$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011062if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011064else
11065 ac_check_lib_save_LIBS=$LIBS
11066LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011068/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011070/* Override any GCC internal prototype to avoid an error.
11071 Use char because int might match the return type of a GCC
11072 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011073#ifdef __cplusplus
11074extern "C"
11075#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011076char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011077int
11078main ()
11079{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011080return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011081 ;
11082 return 0;
11083}
11084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011085if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011086 ac_cv_lib_resolv_inet_aton=yes
11087else
Matthias Kloseb9621712010-04-24 17:59:49 +000011088 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011090rm -f core conftest.err conftest.$ac_objext \
11091 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011092LIBS=$ac_check_lib_save_LIBS
11093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11095$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011096if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011097 cat >>confdefs.h <<_ACEOF
11098#define HAVE_LIBRESOLV 1
11099_ACEOF
11100
11101 LIBS="-lresolv $LIBS"
11102
11103fi
11104
11105
11106fi
11107
11108
Christian Heimesd0764e22007-12-04 15:00:33 +000011109# On Tru64, chflags seems to be present, but calling it will
11110# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11112$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011113if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011114 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011115else
Matthias Kloseb9621712010-04-24 17:59:49 +000011116 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011117 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011118else
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011120/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011121
Christian Heimesd0764e22007-12-04 15:00:33 +000011122#include <sys/stat.h>
11123#include <unistd.h>
11124int main(int argc, char*argv[])
11125{
11126 if(chflags(argv[0], 0) != 0)
11127 return 1;
11128 return 0;
11129}
Ned Deily3eb67d52011-06-28 00:00:28 -070011130
Christian Heimesd0764e22007-12-04 15:00:33 +000011131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011132if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011133 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011134else
Matthias Kloseb9621712010-04-24 17:59:49 +000011135 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11138 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011139fi
11140
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011141
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11144$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011145if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011146 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011147if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011148 ac_cv_have_chflags="yes"
11149else
11150 ac_cv_have_chflags="no"
11151fi
11152
11153fi
11154if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011155
Matthias Kloseb9621712010-04-24 17:59:49 +000011156$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011157
11158fi
11159
Matthias Kloseb9621712010-04-24 17:59:49 +000011160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11161$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011162if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011163 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011164else
Matthias Kloseb9621712010-04-24 17:59:49 +000011165 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011166 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011167else
Matthias Kloseb9621712010-04-24 17:59:49 +000011168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011169/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011170
Christian Heimesd0764e22007-12-04 15:00:33 +000011171#include <sys/stat.h>
11172#include <unistd.h>
11173int main(int argc, char*argv[])
11174{
11175 if(lchflags(argv[0], 0) != 0)
11176 return 1;
11177 return 0;
11178}
Ned Deily3eb67d52011-06-28 00:00:28 -070011179
Christian Heimesd0764e22007-12-04 15:00:33 +000011180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011181if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011182 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011183else
Matthias Kloseb9621712010-04-24 17:59:49 +000011184 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11187 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011188fi
11189
11190
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11193$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011194if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011195 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011196if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011197 ac_cv_have_lchflags="yes"
11198else
11199 ac_cv_have_lchflags="no"
11200fi
11201
11202fi
11203if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011206
11207fi
11208
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011209case $ac_sys_system/$ac_sys_release in
11210Darwin/*)
11211 _CUR_CFLAGS="${CFLAGS}"
11212 _CUR_LDFLAGS="${LDFLAGS}"
11213 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11214 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11215 ;;
11216esac
11217
Matthias Kloseb9621712010-04-24 17:59:49 +000011218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11219$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011220if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011221 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011222else
11223 ac_check_lib_save_LIBS=$LIBS
11224LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011226/* end confdefs.h. */
11227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011228/* Override any GCC internal prototype to avoid an error.
11229 Use char because int might match the return type of a GCC
11230 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011231#ifdef __cplusplus
11232extern "C"
11233#endif
11234char inflateCopy ();
11235int
11236main ()
11237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011238return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011239 ;
11240 return 0;
11241}
11242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011243if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011244 ac_cv_lib_z_inflateCopy=yes
11245else
Matthias Kloseb9621712010-04-24 17:59:49 +000011246 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011248rm -f core conftest.err conftest.$ac_objext \
11249 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011250LIBS=$ac_check_lib_save_LIBS
11251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11253$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011254if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011255
Matthias Kloseb9621712010-04-24 17:59:49 +000011256$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011257
11258fi
11259
11260
11261case $ac_sys_system/$ac_sys_release in
11262Darwin/*)
11263 CFLAGS="${_CUR_CFLAGS}"
11264 LDFLAGS="${_CUR_LDFLAGS}"
11265 ;;
11266esac
11267
Matthias Kloseb9621712010-04-24 17:59:49 +000011268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11269$as_echo_n "checking for hstrerror... " >&6; }
11270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011271/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011272
Martin v. Löwise9416172003-05-03 10:12:45 +000011273#include <netdb.h>
11274
Martin v. Löwise9416172003-05-03 10:12:45 +000011275int
11276main ()
11277{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011278void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011279 ;
11280 return 0;
11281}
11282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011283if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011284
Matthias Kloseb9621712010-04-24 17:59:49 +000011285$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011286
Matthias Kloseb159a552010-04-25 21:00:44 +000011287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011288$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011289else
Matthias Kloseb9621712010-04-24 17:59:49 +000011290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11291$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011292
11293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011294rm -f core conftest.err conftest.$ac_objext \
11295 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011296
Matthias Kloseb9621712010-04-24 17:59:49 +000011297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11298$as_echo_n "checking for inet_aton... " >&6; }
11299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011300/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011301
Martin v. Löwis86d66262006-02-17 08:40:11 +000011302#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011303#include <sys/socket.h>
11304#include <netinet/in.h>
11305#include <arpa/inet.h>
11306
Martin v. Löwise9416172003-05-03 10:12:45 +000011307int
11308main ()
11309{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011310void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011311 ;
11312 return 0;
11313}
11314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011315if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011316
Matthias Kloseb9621712010-04-24 17:59:49 +000011317$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011318
Matthias Kloseb159a552010-04-25 21:00:44 +000011319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011320$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011321else
Matthias Kloseb9621712010-04-24 17:59:49 +000011322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11323$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011324
11325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011326rm -f core conftest.err conftest.$ac_objext \
11327 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011328
Matthias Kloseb9621712010-04-24 17:59:49 +000011329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11330$as_echo_n "checking for inet_pton... " >&6; }
11331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011332/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011333
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011334#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011335#include <sys/socket.h>
11336#include <netinet/in.h>
11337#include <arpa/inet.h>
11338
Martin v. Löwise9416172003-05-03 10:12:45 +000011339int
11340main ()
11341{
11342void* p = inet_pton
11343 ;
11344 return 0;
11345}
11346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011350
Matthias Kloseb159a552010-04-25 21:00:44 +000011351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011352$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011353else
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11355$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011356
11357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011359
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011360# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11362$as_echo_n "checking for setgroups... " >&6; }
11363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011364/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011365
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011366#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011367#ifdef HAVE_GRP_H
11368#include <grp.h>
11369#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011370
Martin v. Löwisd5843682002-11-21 20:41:28 +000011371int
11372main ()
11373{
11374void* p = setgroups
11375 ;
11376 return 0;
11377}
11378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011379if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011380
Matthias Kloseb9621712010-04-24 17:59:49 +000011381$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011382
Matthias Kloseb159a552010-04-25 21:00:44 +000011383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011384$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011385else
Matthias Kloseb9621712010-04-24 17:59:49 +000011386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11387$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011388
11389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011391
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011392# check for openpty and forkpty
11393
11394for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011395do :
11396 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011397if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011399#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011400_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011401
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011402else
Matthias Kloseb9621712010-04-24 17:59:49 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11404$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011405if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011406 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011407else
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011409LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011413/* Override any GCC internal prototype to avoid an error.
11414 Use char because int might match the return type of a GCC
11415 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011416#ifdef __cplusplus
11417extern "C"
11418#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011419char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011420int
11421main ()
11422{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011423return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 ;
11425 return 0;
11426}
11427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011428if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011429 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011430else
Matthias Kloseb9621712010-04-24 17:59:49 +000011431 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011433rm -f core conftest.err conftest.$ac_objext \
11434 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011435LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11438$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011439if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011440 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011441 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011442else
Matthias Kloseb9621712010-04-24 17:59:49 +000011443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11444$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011445if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011446 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011447else
11448 ac_check_lib_save_LIBS=$LIBS
11449LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011451/* end confdefs.h. */
11452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011453/* Override any GCC internal prototype to avoid an error.
11454 Use char because int might match the return type of a GCC
11455 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011456#ifdef __cplusplus
11457extern "C"
11458#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011459char openpty ();
11460int
11461main ()
11462{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011464 ;
11465 return 0;
11466}
11467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011468if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011469 ac_cv_lib_bsd_openpty=yes
11470else
Matthias Kloseb9621712010-04-24 17:59:49 +000011471 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011473rm -f core conftest.err conftest.$ac_objext \
11474 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011475LIBS=$ac_check_lib_save_LIBS
11476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11478$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011479if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011480 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011481 LIBS="$LIBS -lbsd"
11482fi
11483
11484
11485fi
11486
Fred Drake8cef4cf2000-06-28 16:40:38 +000011487
11488fi
11489done
11490
11491for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011492do :
11493 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011494if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011496#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011497_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011498
Fred Drake8cef4cf2000-06-28 16:40:38 +000011499else
Matthias Kloseb9621712010-04-24 17:59:49 +000011500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11501$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011502if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011503 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011504else
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011506LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510/* Override any GCC internal prototype to avoid an error.
11511 Use char because int might match the return type of a GCC
11512 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011513#ifdef __cplusplus
11514extern "C"
11515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011516char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011517int
11518main ()
11519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011520return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 ;
11522 return 0;
11523}
11524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011525if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011527else
Matthias Kloseb9621712010-04-24 17:59:49 +000011528 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011530rm -f core conftest.err conftest.$ac_objext \
11531 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011532LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11535$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011536if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011537 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011538 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011539else
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11541$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011542if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011543 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011544else
11545 ac_check_lib_save_LIBS=$LIBS
11546LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011548/* end confdefs.h. */
11549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550/* Override any GCC internal prototype to avoid an error.
11551 Use char because int might match the return type of a GCC
11552 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011553#ifdef __cplusplus
11554extern "C"
11555#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011556char forkpty ();
11557int
11558main ()
11559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011561 ;
11562 return 0;
11563}
11564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011565if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011566 ac_cv_lib_bsd_forkpty=yes
11567else
Matthias Kloseb9621712010-04-24 17:59:49 +000011568 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011570rm -f core conftest.err conftest.$ac_objext \
11571 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011572LIBS=$ac_check_lib_save_LIBS
11573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11575$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011576if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011577 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011578 LIBS="$LIBS -lbsd"
11579fi
11580
11581
11582fi
11583
Fred Drake8cef4cf2000-06-28 16:40:38 +000011584
11585fi
11586done
11587
Jack Jansendd19cf82001-12-06 22:36:17 +000011588
Christian Heimesb186d002008-03-18 15:15:01 +000011589# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011590for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011591do :
11592 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011593if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011594 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011595#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011596_ACEOF
11597
11598fi
11599done
11600
11601
Michael W. Hudson54241132001-12-07 15:38:26 +000011602# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011603for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011604do :
11605 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11606ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011607if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011608 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011609#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011610_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011611
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011612fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011613done
11614
Michael W. Hudson54241132001-12-07 15:38:26 +000011615
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011616ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011617if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011618 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011619
Martin v. Löwis1142de32002-03-29 16:28:31 +000011620else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011621 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011622 *" dup2.$ac_objext "* ) ;;
11623 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011624 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011625esac
11626
Martin v. Löwis1142de32002-03-29 16:28:31 +000011627fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011628
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011629ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011630if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011631 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11632
11633else
11634 case " $LIBOBJS " in
11635 *" strdup.$ac_objext "* ) ;;
11636 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11637 ;;
11638esac
11639
11640fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011641
11642
11643for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011644do :
11645 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011646if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011647 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011648#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011651/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011652#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011653int
11654main ()
11655{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011656getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 ;
11658 return 0;
11659}
11660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011661if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011662
Matthias Kloseb9621712010-04-24 17:59:49 +000011663$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011664
Guido van Rossum627b2d71993-12-24 10:39:16 +000011665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011667
Guido van Rossum627b2d71993-12-24 10:39:16 +000011668fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011669done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011670
Jack Jansen150753c2003-03-29 22:07:47 +000011671for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011672do :
11673 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011674if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011675 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011676#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011677_ACEOF
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. */
Jack Jansen150753c2003-03-29 22:07:47 +000011680#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011681int
11682main ()
11683{
11684setpgrp(0,0);
11685 ;
11686 return 0;
11687}
11688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011689if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011690
Matthias Kloseb9621712010-04-24 17:59:49 +000011691$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011692
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011695
11696fi
11697done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011698
Thomas Wouters3a584202000-08-05 23:28:51 +000011699for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011700do :
11701 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011702if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011703 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011704#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011707/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011708#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011709int
11710main ()
11711{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011712gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011713 ;
11714 return 0;
11715}
11716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011717if ac_fn_c_try_compile "$LINENO"; then :
11718
Guido van Rossum627b2d71993-12-24 10:39:16 +000011719else
Skip Montanaro6dead952003-09-25 14:50:04 +000011720
Matthias Kloseb9621712010-04-24 17:59:49 +000011721$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011722
Martin v. Löwis11437992002-04-12 09:54:03 +000011723
Guido van Rossum627b2d71993-12-24 10:39:16 +000011724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011726
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011727fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011728done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011729
Michael W. Hudson54241132001-12-07 15:38:26 +000011730
Victor Stinnere0be4232011-10-25 13:06:09 +020011731for ac_func in clock_gettime
11732do :
11733 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11734if test "x$ac_cv_func_clock_gettime" = xyes; then :
11735 cat >>confdefs.h <<_ACEOF
11736#define HAVE_CLOCK_GETTIME 1
11737_ACEOF
11738
11739else
11740
11741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11742$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11743if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11744 $as_echo_n "(cached) " >&6
11745else
11746 ac_check_lib_save_LIBS=$LIBS
11747LIBS="-lrt $LIBS"
11748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11749/* end confdefs.h. */
11750
11751/* Override any GCC internal prototype to avoid an error.
11752 Use char because int might match the return type of a GCC
11753 builtin and then its argument prototype would still apply. */
11754#ifdef __cplusplus
11755extern "C"
11756#endif
11757char clock_gettime ();
11758int
11759main ()
11760{
11761return clock_gettime ();
11762 ;
11763 return 0;
11764}
11765_ACEOF
11766if ac_fn_c_try_link "$LINENO"; then :
11767 ac_cv_lib_rt_clock_gettime=yes
11768else
11769 ac_cv_lib_rt_clock_gettime=no
11770fi
11771rm -f core conftest.err conftest.$ac_objext \
11772 conftest$ac_exeext conftest.$ac_ext
11773LIBS=$ac_check_lib_save_LIBS
11774fi
11775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11776$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11777if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11778
11779 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11780
11781
11782$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11783
11784
11785fi
11786
11787
11788fi
11789done
11790
11791
11792for ac_func in clock_getres
11793do :
11794 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11795if test "x$ac_cv_func_clock_getres" = xyes; then :
11796 cat >>confdefs.h <<_ACEOF
11797#define HAVE_CLOCK_GETRES 1
11798_ACEOF
11799
11800else
11801
11802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11803$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11804if ${ac_cv_lib_rt_clock_getres+:} false; then :
11805 $as_echo_n "(cached) " >&6
11806else
11807 ac_check_lib_save_LIBS=$LIBS
11808LIBS="-lrt $LIBS"
11809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11810/* end confdefs.h. */
11811
11812/* Override any GCC internal prototype to avoid an error.
11813 Use char because int might match the return type of a GCC
11814 builtin and then its argument prototype would still apply. */
11815#ifdef __cplusplus
11816extern "C"
11817#endif
11818char clock_getres ();
11819int
11820main ()
11821{
11822return clock_getres ();
11823 ;
11824 return 0;
11825}
11826_ACEOF
11827if ac_fn_c_try_link "$LINENO"; then :
11828 ac_cv_lib_rt_clock_getres=yes
11829else
11830 ac_cv_lib_rt_clock_getres=no
11831fi
11832rm -f core conftest.err conftest.$ac_objext \
11833 conftest$ac_exeext conftest.$ac_ext
11834LIBS=$ac_check_lib_save_LIBS
11835fi
11836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11837$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11838if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11839
11840 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11841
11842
11843fi
11844
11845
11846fi
11847done
11848
11849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11851$as_echo_n "checking for major... " >&6; }
11852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011853/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011854
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011855#if defined(MAJOR_IN_MKDEV)
11856#include <sys/mkdev.h>
11857#elif defined(MAJOR_IN_SYSMACROS)
11858#include <sys/sysmacros.h>
11859#else
11860#include <sys/types.h>
11861#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011862
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011863int
11864main ()
11865{
11866
11867 makedev(major(0),minor(0));
11868
11869 ;
11870 return 0;
11871}
11872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011873if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011874
11875
Matthias Kloseb9621712010-04-24 17:59:49 +000011876$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011877
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11879$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011880
11881else
Skip Montanaro6dead952003-09-25 14:50:04 +000011882
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11884$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011885
11886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011887rm -f core conftest.err conftest.$ac_objext \
11888 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011889
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011890# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011891# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11893$as_echo_n "checking for getaddrinfo... " >&6; }
11894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011895/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011896
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011897#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011898#include <sys/socket.h>
11899#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011900#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011901
Martin v. Löwis11437992002-04-12 09:54:03 +000011902int
11903main ()
11904{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011905getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011906 ;
11907 return 0;
11908}
11909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011910if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011911 have_getaddrinfo=yes
11912else
Matthias Kloseb9621712010-04-24 17:59:49 +000011913 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011915rm -f core conftest.err conftest.$ac_objext \
11916 conftest$ac_exeext conftest.$ac_ext
11917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11918$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011919if test $have_getaddrinfo = yes
11920then
Matthias Kloseb9621712010-04-24 17:59:49 +000011921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11922$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011923 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011925else
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011927
11928if test "${enable_ipv6+set}" = set; then
11929 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11930else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011931 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011932fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011933else
Matthias Kloseb9621712010-04-24 17:59:49 +000011934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011935/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011936
Stefan Krah19c21392012-11-22 23:47:32 +010011937#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011938#include <sys/types.h>
11939#include <netdb.h>
11940#include <string.h>
11941#include <sys/socket.h>
11942#include <netinet/in.h>
11943
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011944int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011945{
11946 int passive, gaierr, inet4 = 0, inet6 = 0;
11947 struct addrinfo hints, *ai, *aitop;
11948 char straddr[INET6_ADDRSTRLEN], strport[16];
11949
11950 for (passive = 0; passive <= 1; passive++) {
11951 memset(&hints, 0, sizeof(hints));
11952 hints.ai_family = AF_UNSPEC;
11953 hints.ai_flags = passive ? AI_PASSIVE : 0;
11954 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011955 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011956 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11957 (void)gai_strerror(gaierr);
11958 goto bad;
11959 }
11960 for (ai = aitop; ai; ai = ai->ai_next) {
11961 if (ai->ai_addr == NULL ||
11962 ai->ai_addrlen == 0 ||
11963 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11964 straddr, sizeof(straddr), strport, sizeof(strport),
11965 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11966 goto bad;
11967 }
11968 switch (ai->ai_family) {
11969 case AF_INET:
11970 if (strcmp(strport, "54321") != 0) {
11971 goto bad;
11972 }
11973 if (passive) {
11974 if (strcmp(straddr, "0.0.0.0") != 0) {
11975 goto bad;
11976 }
11977 } else {
11978 if (strcmp(straddr, "127.0.0.1") != 0) {
11979 goto bad;
11980 }
11981 }
11982 inet4++;
11983 break;
11984 case AF_INET6:
11985 if (strcmp(strport, "54321") != 0) {
11986 goto bad;
11987 }
11988 if (passive) {
11989 if (strcmp(straddr, "::") != 0) {
11990 goto bad;
11991 }
11992 } else {
11993 if (strcmp(straddr, "::1") != 0) {
11994 goto bad;
11995 }
11996 }
11997 inet6++;
11998 break;
11999 case AF_UNSPEC:
12000 goto bad;
12001 break;
12002 default:
12003 /* another family support? */
12004 break;
12005 }
12006 }
12007 }
12008
12009 if (!(inet4 == 0 || inet4 == 2))
12010 goto bad;
12011 if (!(inet6 == 0 || inet6 == 2))
12012 goto bad;
12013
12014 if (aitop)
12015 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012016 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012017
12018 bad:
12019 if (aitop)
12020 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012021 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012022}
12023
Martin v. Löwis11437992002-04-12 09:54:03 +000012024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012025if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012026 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012027else
Matthias Kloseb9621712010-04-24 17:59:49 +000012028 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12031 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012033
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012034fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012035
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012037
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12039$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12040
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012041if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012042then
12043 if test $ipv6 = yes
12044 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012045 echo 'Fatal: You must get working getaddrinfo() function.'
12046 echo ' or you can specify "--disable-ipv6"'.
12047 exit 1
12048 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012049else
Martin v. Löwis11437992002-04-12 09:54:03 +000012050
Matthias Kloseb9621712010-04-24 17:59:49 +000012051$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012052
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012053fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012054
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012055for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012056do :
12057 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012058if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012059 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012060#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012061_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012062
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012063fi
12064done
12065
Michael W. Hudson54241132001-12-07 15:38:26 +000012066
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012067# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12069$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012070if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012072else
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012074/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012075#include <sys/types.h>
12076#include <sys/time.h>
12077#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012078
Martin v. Löwis11437992002-04-12 09:54:03 +000012079int
12080main ()
12081{
12082if ((struct tm *) 0)
12083return 0;
12084 ;
12085 return 0;
12086}
12087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012088if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012090else
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12096$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012097if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012098
Matthias Kloseb9621712010-04-24 17:59:49 +000012099$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012100
12101fi
12102
Matthias Kloseb9621712010-04-24 17:59:49 +000012103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12104$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012105if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012107else
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012109/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012110#include <sys/types.h>
12111#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012112
Martin v. Löwis11437992002-04-12 09:54:03 +000012113int
12114main ()
12115{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116struct tm tm;
12117 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012119 ;
12120 return 0;
12121}
12122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012123if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012124 ac_cv_struct_tm=time.h
12125else
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12131$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012132if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012133
Matthias Kloseb9621712010-04-24 17:59:49 +000012134$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012135
12136fi
12137
Matthias Kloseb9621712010-04-24 17:59:49 +000012138ac_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 +000012139#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012140
Matthias Kloseb9621712010-04-24 17:59:49 +000012141"
Victor Stinnere0be4232011-10-25 13:06:09 +020012142if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012143
12144cat >>confdefs.h <<_ACEOF
12145#define HAVE_STRUCT_TM_TM_ZONE 1
12146_ACEOF
12147
12148
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012149fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012150
Martin v. Löwis11437992002-04-12 09:54:03 +000012151if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12152
Matthias Kloseb9621712010-04-24 17:59:49 +000012153$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012154
12155else
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12157"
Victor Stinnere0be4232011-10-25 13:06:09 +020012158if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012159 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012160else
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162fi
12163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012164cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012165#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166_ACEOF
12167
Matthias Kloseb9621712010-04-24 17:59:49 +000012168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12169$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012170if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012171 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012172else
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012174/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012175#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176#if !HAVE_DECL_TZNAME
12177extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012179
Martin v. Löwis11437992002-04-12 09:54:03 +000012180int
12181main ()
12182{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012183return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 ;
12185 return 0;
12186}
12187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012188if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012189 ac_cv_var_tzname=yes
12190else
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012193rm -f core conftest.err conftest.$ac_objext \
12194 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12197$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012198 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012199
Matthias Kloseb9621712010-04-24 17:59:49 +000012200$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012201
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012202 fi
12203fi
12204
Matthias Kloseb9621712010-04-24 17:59:49 +000012205ac_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 +020012206if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012207
12208cat >>confdefs.h <<_ACEOF
12209#define HAVE_STRUCT_STAT_ST_RDEV 1
12210_ACEOF
12211
12212
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012213fi
12214
Matthias Kloseb9621712010-04-24 17:59:49 +000012215ac_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 +020012216if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012217
Martin v. Löwis11437992002-04-12 09:54:03 +000012218cat >>confdefs.h <<_ACEOF
12219#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12220_ACEOF
12221
12222
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012223fi
12224
Matthias Kloseb9621712010-04-24 17:59:49 +000012225ac_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 +020012226if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012227
12228cat >>confdefs.h <<_ACEOF
12229#define HAVE_STRUCT_STAT_ST_FLAGS 1
12230_ACEOF
12231
12232
12233fi
12234
Matthias Kloseb9621712010-04-24 17:59:49 +000012235ac_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 +020012236if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012237
12238cat >>confdefs.h <<_ACEOF
12239#define HAVE_STRUCT_STAT_ST_GEN 1
12240_ACEOF
12241
12242
12243fi
12244
Matthias Kloseb9621712010-04-24 17:59:49 +000012245ac_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 +020012246if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012247
12248cat >>confdefs.h <<_ACEOF
12249#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12250_ACEOF
12251
12252
12253fi
12254
Matthias Kloseb9621712010-04-24 17:59:49 +000012255ac_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 +020012256if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012257
Martin v. Löwis11437992002-04-12 09:54:03 +000012258cat >>confdefs.h <<_ACEOF
12259#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12260_ACEOF
12261
12262
Matthias Kloseb9621712010-04-24 17:59:49 +000012263$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012264
12265else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012266 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012267 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12269 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012270esac
12271
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012272fi
12273
Michael W. Hudson54241132001-12-07 15:38:26 +000012274
Martin v. Löwis11437992002-04-12 09:54:03 +000012275
Matthias Kloseb9621712010-04-24 17:59:49 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12277$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012280else
Matthias Kloseb159a552010-04-25 21:00:44 +000012281
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012283/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012284#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012285int
12286main ()
12287{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012288return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012289 ;
12290 return 0;
12291}
12292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012294 ac_cv_header_time_altzone=yes
12295else
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012300fi
12301
Matthias Kloseb9621712010-04-24 17:59:49 +000012302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12303$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012304if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012305
Matthias Kloseb9621712010-04-24 17:59:49 +000012306$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012307
12308fi
12309
Guido van Rossumda88dad1995-01-26 00:46:29 +000012310was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12312$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012314/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012315
12316#include <sys/types.h>
12317#include <sys/select.h>
12318#include <sys/time.h>
12319
Martin v. Löwis11437992002-04-12 09:54:03 +000012320int
12321main ()
12322{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012323;
Martin v. Löwis11437992002-04-12 09:54:03 +000012324 ;
12325 return 0;
12326}
12327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012328if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012329
12330
Matthias Kloseb9621712010-04-24 17:59:49 +000012331$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012333 was_it_defined=yes
12334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12338$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012339
Matthias Kloseb9621712010-04-24 17:59:49 +000012340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12341$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012342if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012344else
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012346/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012347#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012348int
12349main ()
12350{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012351struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012352 ;
12353 return 0;
12354}
12355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012356if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012357 ac_cv_struct_addrinfo=yes
12358else
Matthias Kloseb9621712010-04-24 17:59:49 +000012359 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12362fi
12363
Matthias Kloseb9621712010-04-24 17:59:49 +000012364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12365$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012366if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012367
Matthias Kloseb9621712010-04-24 17:59:49 +000012368$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012369
12370fi
12371
Matthias Kloseb9621712010-04-24 17:59:49 +000012372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12373$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012374if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012376else
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012378/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012379
12380# include <sys/types.h>
12381# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012382int
12383main ()
12384{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012385struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 ;
12387 return 0;
12388}
12389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012391 ac_cv_struct_sockaddr_storage=yes
12392else
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12396fi
12397
Matthias Kloseb9621712010-04-24 17:59:49 +000012398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12399$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012400if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012401
Matthias Kloseb9621712010-04-24 17:59:49 +000012402$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012403
12404fi
12405
Guido van Rossum627b2d71993-12-24 10:39:16 +000012406# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012407
Matthias Kloseb9621712010-04-24 17:59:49 +000012408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12409$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012410if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012412else
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012415$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012416int
12417main ()
12418{
12419static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012420test_array [0] = 0;
12421return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012422
12423 ;
12424 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012425}
Martin v. Löwis11437992002-04-12 09:54:03 +000012426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012427if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012428 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012429else
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12435$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012436if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012437 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012438
12439fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012440
Matthias Kloseb9621712010-04-24 17:59:49 +000012441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12442$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012443if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012444 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012445else
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012447/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012448
Martin v. Löwis11437992002-04-12 09:54:03 +000012449int
12450main ()
12451{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012452
Martin v. Löwis11437992002-04-12 09:54:03 +000012453#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012454 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012455 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012456 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012457 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458 char const *const *pcpcc;
12459 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012460 /* NEC SVR4.0.2 mips cc rejects this. */
12461 struct point {int x, y;};
12462 static struct point const zero = {0,0};
12463 /* AIX XL C 1.02.0.0 rejects this.
12464 It does not let you subtract one const X* pointer from another in
12465 an arm of an if-expression whose if-part is not a constant
12466 expression */
12467 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012469 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012470 ++pcpcc;
12471 ppc = (char**) pcpcc;
12472 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012473 { /* SCO 3.2v4 cc rejects this sort of thing. */
12474 char tx;
12475 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012476 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012477
Martin v. Löwis11437992002-04-12 09:54:03 +000012478 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012479 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012480 }
12481 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12482 int x[] = {25, 17};
12483 const int *foo = &x[0];
12484 ++foo;
12485 }
12486 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12487 typedef const int *iptr;
12488 iptr p = 0;
12489 ++p;
12490 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012491 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012492 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012493 struct s { int j; const int *ap[3]; } bx;
12494 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012495 }
12496 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12497 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012498 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012499 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012501#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012502
Martin v. Löwis11437992002-04-12 09:54:03 +000012503 ;
12504 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012505}
Martin v. Löwis11437992002-04-12 09:54:03 +000012506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012507if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012508 ac_cv_c_const=yes
12509else
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012513fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12515$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012516if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012517
Matthias Kloseb9621712010-04-24 17:59:49 +000012518$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012519
12520fi
12521
Michael W. Hudson54241132001-12-07 15:38:26 +000012522
Guido van Rossumda88dad1995-01-26 00:46:29 +000012523works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12525$as_echo_n "checking for working volatile... " >&6; }
12526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012527/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012528
Martin v. Löwis11437992002-04-12 09:54:03 +000012529int
12530main ()
12531{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012532volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 ;
12534 return 0;
12535}
12536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012537if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012538 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012539else
Skip Montanaro6dead952003-09-25 14:50:04 +000012540
Matthias Kloseb9621712010-04-24 17:59:49 +000012541$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012542
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012543
Guido van Rossum627b2d71993-12-24 10:39:16 +000012544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12547$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012548
Guido van Rossumda88dad1995-01-26 00:46:29 +000012549works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12551$as_echo_n "checking for working signed char... " >&6; }
12552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012553/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012554
Martin v. Löwis11437992002-04-12 09:54:03 +000012555int
12556main ()
12557{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012558signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012559 ;
12560 return 0;
12561}
12562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012563if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012564 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012565else
Skip Montanaro6dead952003-09-25 14:50:04 +000012566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012568
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012569
Guido van Rossum7f43da71994-08-01 12:15:30 +000012570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12573$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012574
Guido van Rossumda88dad1995-01-26 00:46:29 +000012575have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12577$as_echo_n "checking for prototypes... " >&6; }
12578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012579/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012580int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012581int
12582main ()
12583{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012584return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012585 ;
12586 return 0;
12587}
12588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012590
Matthias Kloseb9621712010-04-24 17:59:49 +000012591$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012592
Matthias Kloseb159a552010-04-25 21:00:44 +000012593 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12597$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012598
Guido van Rossumda88dad1995-01-26 00:46:29 +000012599works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12601$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012603/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012604
12605#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012606int foo(int x, ...) {
12607 va_list va;
12608 va_start(va, x);
12609 va_arg(va, int);
12610 va_arg(va, char *);
12611 va_arg(va, double);
12612 return 0;
12613}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012614
Martin v. Löwis11437992002-04-12 09:54:03 +000012615int
12616main ()
12617{
Guido van Rossum90eea071996-08-30 20:58:57 +000012618return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012619 ;
12620 return 0;
12621}
12622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012623if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012624
12625
Matthias Kloseb9621712010-04-24 17:59:49 +000012626$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012627
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012628 works=yes
12629
Guido van Rossum627b2d71993-12-24 10:39:16 +000012630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12633$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012634
Martin v. Löwisd6320502004-08-12 13:45:08 +000012635# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12637$as_echo_n "checking for socketpair... " >&6; }
12638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012639/* end confdefs.h. */
12640
12641#include <sys/types.h>
12642#include <sys/socket.h>
12643
12644int
12645main ()
12646{
12647void *x=socketpair
12648 ;
12649 return 0;
12650}
12651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012653
Matthias Kloseb9621712010-04-24 17:59:49 +000012654$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012655
Matthias Kloseb159a552010-04-25 21:00:44 +000012656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012657$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012658else
Matthias Kloseb9621712010-04-24 17:59:49 +000012659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12660$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012661
12662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012664
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012665# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12667$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012669/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012670#include <sys/types.h>
12671#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012672int
12673main ()
12674{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012675struct sockaddr x;
12676x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012677 ;
12678 return 0;
12679}
12680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012681if ac_fn_c_try_compile "$LINENO"; then :
12682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12683$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012684
Matthias Kloseb9621712010-04-24 17:59:49 +000012685$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012686
12687else
Matthias Kloseb9621712010-04-24 17:59:49 +000012688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12689$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012690
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012693
Guido van Rossumda88dad1995-01-26 00:46:29 +000012694va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12696$as_echo_n "checking whether va_list is an array... " >&6; }
12697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012698/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012699
12700#ifdef HAVE_STDARG_PROTOTYPES
12701#include <stdarg.h>
12702#else
12703#include <varargs.h>
12704#endif
12705
Martin v. Löwis11437992002-04-12 09:54:03 +000012706int
12707main ()
12708{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012709va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 ;
12711 return 0;
12712}
12713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012714if ac_fn_c_try_compile "$LINENO"; then :
12715
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012716else
Skip Montanaro6dead952003-09-25 14:50:04 +000012717
Martin v. Löwis11437992002-04-12 09:54:03 +000012718
Matthias Kloseb9621712010-04-24 17:59:49 +000012719$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012720
Guido van Rossumda88dad1995-01-26 00:46:29 +000012721 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012722
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12726$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012727
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012728# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012729
12730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012732if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012733
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012735
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12737$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012738 OLD_CFLAGS=$CFLAGS
12739 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012741/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012742
12743# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012744
Martin v. Löwis11437992002-04-12 09:54:03 +000012745int
12746main ()
12747{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012748
12749 char *name;
12750 struct hostent *he, *res;
12751 char buffer[2048];
12752 int buflen = 2048;
12753 int h_errnop;
12754
12755 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
12757 ;
12758 return 0;
12759}
12760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012762
Matthias Kloseb9621712010-04-24 17:59:49 +000012763 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012764
Martin v. Löwis11437992002-04-12 09:54:03 +000012765
Matthias Kloseb9621712010-04-24 17:59:49 +000012766$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12769$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012770
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012771else
Skip Montanaro6dead952003-09-25 14:50:04 +000012772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12774$as_echo "no" >&6; }
12775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12776$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012778/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012779
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012780# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012781
Martin v. Löwis11437992002-04-12 09:54:03 +000012782int
12783main ()
12784{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012785
12786 char *name;
12787 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012788 char buffer[2048];
12789 int buflen = 2048;
12790 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012791
Matthias Kloseb159a552010-04-25 21:00:44 +000012792 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012793
12794 ;
12795 return 0;
12796}
12797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012798if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012801
Martin v. Löwis11437992002-04-12 09:54:03 +000012802
Matthias Kloseb159a552010-04-25 21:00:44 +000012803$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012804
Matthias Kloseb9621712010-04-24 17:59:49 +000012805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12806$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012807
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012808else
Skip Montanaro6dead952003-09-25 14:50:04 +000012809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12811$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12813$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12815/* end confdefs.h. */
12816
12817# include <netdb.h>
12818
12819int
12820main ()
12821{
12822
12823 char *name;
12824 struct hostent *he;
12825 struct hostent_data data;
12826
12827 (void) gethostbyname_r(name, he, &data);
12828
12829 ;
12830 return 0;
12831}
12832_ACEOF
12833if ac_fn_c_try_compile "$LINENO"; then :
12834
12835 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12836
12837
12838$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12839
12840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12841$as_echo "yes" >&6; }
12842
12843else
12844
12845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12846$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012847
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012850
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012853
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012856 CFLAGS=$OLD_CFLAGS
12857
12858else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012859
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 for ac_func in gethostbyname
12861do :
12862 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012863if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012864 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012865#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012866_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012867
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012868fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012869done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012870
Michael W. Hudson54241132001-12-07 15:38:26 +000012871
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012872fi
12873
Michael W. Hudson54241132001-12-07 15:38:26 +000012874
12875
12876
12877
12878
12879
Guido van Rossum627b2d71993-12-24 10:39:16 +000012880# checks for system services
12881# (none yet)
12882
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012883# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012884ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012885if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012886
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012887else
Matthias Kloseb9621712010-04-24 17:59:49 +000012888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12889$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012890if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012892else
Martin v. Löwis11437992002-04-12 09:54:03 +000012893 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012894LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898/* Override any GCC internal prototype to avoid an error.
12899 Use char because int might match the return type of a GCC
12900 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012901#ifdef __cplusplus
12902extern "C"
12903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012904char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012905int
12906main ()
12907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 ;
12910 return 0;
12911}
12912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012913if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012915else
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012918rm -f core conftest.err conftest.$ac_objext \
12919 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012920LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12923$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012924if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012925 cat >>confdefs.h <<_ACEOF
12926#define HAVE_LIBIEEE 1
12927_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012928
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012929 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012930
Guido van Rossum627b2d71993-12-24 10:39:16 +000012931fi
12932
Michael W. Hudson54241132001-12-07 15:38:26 +000012933
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012934fi
12935
Michael W. Hudson54241132001-12-07 15:38:26 +000012936
Guido van Rossum7f253911997-05-09 02:42:48 +000012937# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12939$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012941# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012942if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012944if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012945then
12946
Matthias Kloseb9621712010-04-24 17:59:49 +000012947$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012948
Matthias Kloseb9621712010-04-24 17:59:49 +000012949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12950$as_echo "yes" >&6; }
12951else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12952$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012953fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012954else
Matthias Kloseb9621712010-04-24 17:59:49 +000012955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12956$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957fi
12958
Guido van Rossum7f253911997-05-09 02:42:48 +000012959
Guido van Rossum7f43da71994-08-01 12:15:30 +000012960# check for --with-libm=...
12961
Guido van Rossum563e7081996-09-10 18:20:48 +000012962case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012963Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012964*) LIBM=-lm
12965esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12967$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012969# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012970if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012972if test "$withval" = no
12973then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12975$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012976elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012977then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12979$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012980else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012981fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012982else
Matthias Kloseb9621712010-04-24 17:59:49 +000012983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12984$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012985fi
12986
Guido van Rossum7f43da71994-08-01 12:15:30 +000012987
12988# check for --with-libc=...
12989
Matthias Kloseb9621712010-04-24 17:59:49 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12991$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012993# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012994if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012995 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012996if test "$withval" = no
12997then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12999$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013000elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013001then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13003$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013004else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013005fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013006else
Matthias Kloseb9621712010-04-24 17:59:49 +000013007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13008$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013009fi
13010
Guido van Rossum7f43da71994-08-01 12:15:30 +000013011
Stefan Krah1919b7e2012-03-21 18:25:23 +010013012# **************************************
13013# * Check for gcc x64 inline assembler *
13014# **************************************
13015
13016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13017$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13019/* end confdefs.h. */
13020
13021int
13022main ()
13023{
13024
13025 __asm__ __volatile__ ("movq %rcx, %rax");
13026
13027 ;
13028 return 0;
13029}
13030_ACEOF
13031if ac_fn_c_try_compile "$LINENO"; then :
13032 have_gcc_asm_for_x64=yes
13033else
13034 have_gcc_asm_for_x64=no
13035fi
13036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13038$as_echo "$have_gcc_asm_for_x64" >&6; }
13039if test "$have_gcc_asm_for_x64" = yes
13040then
13041
13042$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13043
13044fi
13045
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013046# **************************************************
13047# * Check for various properties of floating point *
13048# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013049
Matthias Kloseb9621712010-04-24 17:59:49 +000013050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13051$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013052if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013053 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013054else
13055
Matthias Kloseb9621712010-04-24 17:59:49 +000013056if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013057 ac_cv_little_endian_double=no
13058else
Matthias Kloseb9621712010-04-24 17:59:49 +000013059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013060/* end confdefs.h. */
13061
13062#include <string.h>
13063int main() {
13064 double x = 9006104071832581.0;
13065 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13066 return 0;
13067 else
13068 return 1;
13069}
13070
13071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013072if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013073 ac_cv_little_endian_double=yes
13074else
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13078 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013079fi
13080
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013081fi
13082
Matthias Kloseb9621712010-04-24 17:59:49 +000013083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13084$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013085if test "$ac_cv_little_endian_double" = yes
13086then
13087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013089
13090fi
13091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13093$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013094if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013096else
13097
Matthias Kloseb9621712010-04-24 17:59:49 +000013098if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013099 ac_cv_big_endian_double=no
13100else
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013102/* end confdefs.h. */
13103
13104#include <string.h>
13105int main() {
13106 double x = 9006104071832581.0;
13107 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13108 return 0;
13109 else
13110 return 1;
13111}
13112
13113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013114if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013115 ac_cv_big_endian_double=yes
13116else
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13120 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013121fi
13122
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013123fi
13124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13126$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013127if test "$ac_cv_big_endian_double" = yes
13128then
13129
Matthias Kloseb9621712010-04-24 17:59:49 +000013130$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013131
13132fi
13133
13134# Some ARM platforms use a mixed-endian representation for doubles.
13135# While Python doesn't currently have full support for these platforms
13136# (see e.g., issue 1762561), we can at least make sure that float <-> string
13137# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13139$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013140if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013141 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013142else
13143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013145 ac_cv_mixed_endian_double=no
13146else
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013148/* end confdefs.h. */
13149
13150#include <string.h>
13151int main() {
13152 double x = 9006104071832581.0;
13153 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13154 return 0;
13155 else
13156 return 1;
13157}
13158
13159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013160if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013161 ac_cv_mixed_endian_double=yes
13162else
Matthias Kloseb9621712010-04-24 17:59:49 +000013163 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13166 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013167fi
13168
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013169fi
13170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13172$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013173if test "$ac_cv_mixed_endian_double" = yes
13174then
13175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013177
13178fi
13179
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013180# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013181# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013182# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013183# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013184# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013185# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013186
13187# This inline assembler syntax may also work for suncc and icc,
13188# so we try it on all platforms.
13189
Matthias Kloseb9621712010-04-24 17:59:49 +000013190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13191$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013193/* end confdefs.h. */
13194
13195int
13196main ()
13197{
13198
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013199 unsigned short cw;
13200 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13201 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013202
13203 ;
13204 return 0;
13205}
13206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013207if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013208 have_gcc_asm_for_x87=yes
13209else
Matthias Kloseb9621712010-04-24 17:59:49 +000013210 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013211fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13214$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013215if test "$have_gcc_asm_for_x87" = yes
13216then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013217
Matthias Kloseb9621712010-04-24 17:59:49 +000013218$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013219
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013220fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013221
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013222# Detect whether system arithmetic is subject to x87-style double
13223# rounding issues. The result of this test has little meaning on non
13224# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13225# mode is round-to-nearest and double rounding issues are present, and
13226# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13228$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013229# $BASECFLAGS may affect the result
13230ac_save_cc="$CC"
13231CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013232if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013233 ac_cv_x87_double_rounding=no
13234else
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013236/* end confdefs.h. */
13237
13238#include <stdlib.h>
13239#include <math.h>
13240int main() {
13241 volatile double x, y, z;
13242 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13243 x = 0.99999999999999989; /* 1-2**-53 */
13244 y = 1./x;
13245 if (y != 1.)
13246 exit(0);
13247 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13248 x = 1e16;
13249 y = 2.99999;
13250 z = x + y;
13251 if (z != 1e16+4.)
13252 exit(0);
13253 /* both tests show evidence of double rounding */
13254 exit(1);
13255}
13256
13257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013258if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013259 ac_cv_x87_double_rounding=no
13260else
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13264 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013265fi
13266
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013267CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13269$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013270if test "$ac_cv_x87_double_rounding" = yes
13271then
13272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013274
13275fi
13276
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013277# ************************************
13278# * Check for mathematical functions *
13279# ************************************
13280
13281LIBS_SAVE=$LIBS
13282LIBS="$LIBS $LIBM"
13283
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013284for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13285do :
13286 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13287ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013288if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013289 cat >>confdefs.h <<_ACEOF
13290#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13291_ACEOF
13292
13293fi
13294done
13295
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013296for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013297do :
13298 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13299ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013300if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013301 cat >>confdefs.h <<_ACEOF
13302#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13303_ACEOF
13304
13305fi
13306done
13307
13308ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13309"
Victor Stinnere0be4232011-10-25 13:06:09 +020013310if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013311 ac_have_decl=1
13312else
13313 ac_have_decl=0
13314fi
13315
13316cat >>confdefs.h <<_ACEOF
13317#define HAVE_DECL_ISINF $ac_have_decl
13318_ACEOF
13319ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13320"
Victor Stinnere0be4232011-10-25 13:06:09 +020013321if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013322 ac_have_decl=1
13323else
13324 ac_have_decl=0
13325fi
13326
13327cat >>confdefs.h <<_ACEOF
13328#define HAVE_DECL_ISNAN $ac_have_decl
13329_ACEOF
13330ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13331"
Victor Stinnere0be4232011-10-25 13:06:09 +020013332if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013333 ac_have_decl=1
13334else
13335 ac_have_decl=0
13336fi
13337
13338cat >>confdefs.h <<_ACEOF
13339#define HAVE_DECL_ISFINITE $ac_have_decl
13340_ACEOF
13341
13342
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013343# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13344# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13346$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013347if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013349else
13350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013352 ac_cv_tanh_preserves_zero_sign=no
13353else
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013355/* end confdefs.h. */
13356
13357#include <math.h>
13358#include <stdlib.h>
13359int main() {
13360 /* return 0 if either negative zeros don't exist
13361 on this platform or if negative zeros exist
13362 and tanh(-0.) == -0. */
13363 if (atan2(0., -1.) == atan2(-0., -1.) ||
13364 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13365 else exit(1);
13366}
13367
13368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013369if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013370 ac_cv_tanh_preserves_zero_sign=yes
13371else
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13375 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013376fi
13377
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013378fi
13379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13381$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013382if test "$ac_cv_tanh_preserves_zero_sign" = yes
13383then
13384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013386
13387fi
13388
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013389if test "$ac_cv_func_log1p" = yes
13390then
13391 # On some versions of AIX, log1p(-0.) returns 0. instead of
13392 # -0. See issue #9920.
13393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13394$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013395 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013396 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013397else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013398
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013399 if test "$cross_compiling" = yes; then :
13400 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013401else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13403/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013404
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013405 #include <math.h>
13406 #include <stdlib.h>
13407 int main() {
13408 /* Fail if the signs of log1p(-0.) and -0. can be
13409 distinguished. */
13410 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13411 return 0;
13412 else
13413 return 1;
13414 }
13415
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013416_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013417if ac_fn_c_try_run "$LINENO"; then :
13418 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013419else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013420 ac_cv_log1p_drops_zero_sign=yes
13421fi
13422rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13423 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013424fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013425
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013426fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013427
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13429$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13430fi
13431if test "$ac_cv_log1p_drops_zero_sign" = yes
13432then
13433
13434$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13435
13436fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013437
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013438LIBS=$LIBS_SAVE
13439
Mark Dickinsona614f042009-11-28 12:48:43 +000013440# For multiprocessing module, check that sem_open
13441# actually works. For FreeBSD versions <= 7.2,
13442# the kernel module that provides POSIX semaphores
13443# isn't loaded by default, so an attempt to call
13444# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13446$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013447if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013451 ac_cv_posix_semaphores_enabled=yes
13452else
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013454/* end confdefs.h. */
13455
13456#include <unistd.h>
13457#include <fcntl.h>
13458#include <stdio.h>
13459#include <semaphore.h>
13460#include <sys/stat.h>
13461
13462int main(void) {
13463 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13464 if (a == SEM_FAILED) {
13465 perror("sem_open");
13466 return 1;
13467 }
13468 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013469 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013470 return 0;
13471}
13472
13473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013474if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013475 ac_cv_posix_semaphores_enabled=yes
13476else
Matthias Kloseb9621712010-04-24 17:59:49 +000013477 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13480 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013481fi
13482
13483
Mark Dickinsona614f042009-11-28 12:48:43 +000013484fi
13485
Matthias Kloseb9621712010-04-24 17:59:49 +000013486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13487$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013488if test $ac_cv_posix_semaphores_enabled = no
13489then
13490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013492
13493fi
13494
Mark Dickinson10683072009-04-18 21:18:19 +000013495# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13497$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013498if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013500else
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013502 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013503else
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013505/* end confdefs.h. */
13506
13507#include <unistd.h>
13508#include <fcntl.h>
13509#include <stdio.h>
13510#include <semaphore.h>
13511#include <sys/stat.h>
13512
13513int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013514 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013515 int count;
13516 int res;
13517 if(a==SEM_FAILED){
13518 perror("sem_open");
13519 return 1;
13520
13521 }
13522 res = sem_getvalue(a, &count);
13523 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013524 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013525 return res==-1 ? 1 : 0;
13526}
13527
Mark Dickinson10683072009-04-18 21:18:19 +000013528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013529if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013530 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013531else
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13535 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013536fi
13537
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013538
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013539fi
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13542$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013543if test $ac_cv_broken_sem_getvalue = yes
13544then
13545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013547
13548fi
13549
Mark Dickinsonbd792642009-03-18 20:06:12 +000013550# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13552$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013553# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013554if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013555 enableval=$enable_big_digits; case $enable_big_digits in
13556yes)
13557 enable_big_digits=30 ;;
13558no)
13559 enable_big_digits=15 ;;
1356015|30)
13561 ;;
13562*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013563 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 +000013564esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13566$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013567
13568cat >>confdefs.h <<_ACEOF
13569#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13570_ACEOF
13571
13572
13573else
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13575$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013576fi
13577
13578
Guido van Rossumef2255b2000-03-10 22:30:29 +000013579# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013580ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013581if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013582
13583
Matthias Kloseb9621712010-04-24 17:59:49 +000013584$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013585
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013586 wchar_h="yes"
13587
Guido van Rossumef2255b2000-03-10 22:30:29 +000013588else
Martin v. Löwis11437992002-04-12 09:54:03 +000013589 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013590
13591fi
13592
Michael W. Hudson54241132001-12-07 15:38:26 +000013593
Martin v. Löwis11437992002-04-12 09:54:03 +000013594
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013595# determine wchar_t size
13596if test "$wchar_h" = yes
13597then
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13601# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13603$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013604if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013606else
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13608"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Martin v. Löwis11437992002-04-12 09:54:03 +000013610else
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 if test "$ac_cv_type_wchar_t" = yes; then
13612 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13613$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013614as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013615See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013616 else
13617 ac_cv_sizeof_wchar_t=0
13618 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013620
Martin v. Löwis11437992002-04-12 09:54:03 +000013621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13623$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013624
13625
13626
Martin v. Löwis11437992002-04-12 09:54:03 +000013627cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013628#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013629_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013630
Michael W. Hudson54241132001-12-07 15:38:26 +000013631
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013632fi
13633
Matthias Kloseb9621712010-04-24 17:59:49 +000013634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13635$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013636have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013638/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013639
13640#include <tcl.h>
13641#if TCL_UTF_MAX != 6
13642# error "NOT UCS4_TCL"
13643#endif
13644int
13645main ()
13646{
13647
13648 ;
13649 return 0;
13650}
13651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013653
13654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013656
13657 have_ucs4_tcl=yes
13658
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13662$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013663
Skip Montanaro6dead952003-09-25 14:50:04 +000013664# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013665if test "$wchar_h" = yes
13666then
13667 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13669$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013670 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013671 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013672else
13673
Matthias Kloseb9621712010-04-24 17:59:49 +000013674 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013675 ac_cv_wchar_t_signed=yes
13676else
Matthias Kloseb9621712010-04-24 17:59:49 +000013677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013678/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013679
13680 #include <wchar.h>
13681 int main()
13682 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013683 /* Success: exit code 0 */
13684 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013685 }
13686
13687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013688if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013689 ac_cv_wchar_t_signed=yes
13690else
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13694 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013695fi
13696
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013697fi
13698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13700$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013701fi
13702
Georg Brandl52d168a2008-01-07 18:10:24 +000013703# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013704if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013705 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013706then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013707 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013708
Matthias Kloseb9621712010-04-24 17:59:49 +000013709$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013710
Georg Brandl52d168a2008-01-07 18:10:24 +000013711else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013712 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013713fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13715$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013716
13717# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13719$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013720if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013722else
Matthias Kloseb9621712010-04-24 17:59:49 +000013723 ac_cv_c_bigendian=unknown
13724 # See if we're dealing with a universal compiler.
13725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13726/* end confdefs.h. */
13727#ifndef __APPLE_CC__
13728 not a universal capable compiler
13729 #endif
13730 typedef int dummy;
13731
Skip Montanaro6dead952003-09-25 14:50:04 +000013732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013733if ac_fn_c_try_compile "$LINENO"; then :
13734
13735 # Check for potential -arch flags. It is not universal unless
13736 # there are at least two -arch flags with different values.
13737 ac_arch=
13738 ac_prev=
13739 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13740 if test -n "$ac_prev"; then
13741 case $ac_word in
13742 i?86 | x86_64 | ppc | ppc64)
13743 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13744 ac_arch=$ac_word
13745 else
13746 ac_cv_c_bigendian=universal
13747 break
13748 fi
13749 ;;
13750 esac
13751 ac_prev=
13752 elif test "x$ac_word" = "x-arch"; then
13753 ac_prev=arch
13754 fi
13755 done
13756fi
13757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13758 if test $ac_cv_c_bigendian = unknown; then
13759 # See if sys/param.h defines the BYTE_ORDER macro.
13760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013761/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013762#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013764
Martin v. Löwis11437992002-04-12 09:54:03 +000013765int
13766main ()
13767{
Matthias Kloseb9621712010-04-24 17:59:49 +000013768#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13769 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13770 && LITTLE_ENDIAN)
13771 bogus endian macros
13772 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013773
13774 ;
13775 return 0;
13776}
13777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013778if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013779 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013781/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013782#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013784
Martin v. Löwis11437992002-04-12 09:54:03 +000013785int
13786main ()
13787{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013788#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013789 not big endian
13790 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013791
13792 ;
13793 return 0;
13794}
13795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013796if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013797 ac_cv_c_bigendian=yes
13798else
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013802fi
13803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13804 fi
13805 if test $ac_cv_c_bigendian = unknown; then
13806 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013808/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013809#include <limits.h>
13810
Martin v. Löwis11437992002-04-12 09:54:03 +000013811int
13812main ()
13813{
Matthias Kloseb9621712010-04-24 17:59:49 +000013814#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13815 bogus endian macros
13816 #endif
13817
Martin v. Löwis11437992002-04-12 09:54:03 +000013818 ;
13819 return 0;
13820}
13821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013822if ac_fn_c_try_compile "$LINENO"; then :
13823 # It does; now see whether it defined to _BIG_ENDIAN or not.
13824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13825/* end confdefs.h. */
13826#include <limits.h>
13827
13828int
13829main ()
13830{
13831#ifndef _BIG_ENDIAN
13832 not big endian
13833 #endif
13834
13835 ;
13836 return 0;
13837}
13838_ACEOF
13839if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013841else
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13845fi
13846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13847 fi
13848 if test $ac_cv_c_bigendian = unknown; then
13849 # Compile a test program.
13850 if test "$cross_compiling" = yes; then :
13851 # Try to guess by grepping values from an object file.
13852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13853/* end confdefs.h. */
13854short int ascii_mm[] =
13855 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13856 short int ascii_ii[] =
13857 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13858 int use_ascii (int i) {
13859 return ascii_mm[i] + ascii_ii[i];
13860 }
13861 short int ebcdic_ii[] =
13862 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13863 short int ebcdic_mm[] =
13864 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13865 int use_ebcdic (int i) {
13866 return ebcdic_mm[i] + ebcdic_ii[i];
13867 }
13868 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869
Matthias Kloseb9621712010-04-24 17:59:49 +000013870int
13871main ()
13872{
13873return use_ascii (foo) == use_ebcdic (foo);
13874 ;
13875 return 0;
13876}
13877_ACEOF
13878if ac_fn_c_try_compile "$LINENO"; then :
13879 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13880 ac_cv_c_bigendian=yes
13881 fi
13882 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13883 if test "$ac_cv_c_bigendian" = unknown; then
13884 ac_cv_c_bigendian=no
13885 else
13886 # finding both strings is unlikely to happen, but who knows?
13887 ac_cv_c_bigendian=unknown
13888 fi
13889 fi
13890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013892else
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013894/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013896int
13897main ()
13898{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013899
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 /* Are we little or big endian? From Harbison&Steele. */
13901 union
13902 {
13903 long int l;
13904 char c[sizeof (long int)];
13905 } u;
13906 u.l = 1;
13907 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908
13909 ;
13910 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013911}
Martin v. Löwis11437992002-04-12 09:54:03 +000013912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013913if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013914 ac_cv_c_bigendian=no
13915else
Matthias Kloseb9621712010-04-24 17:59:49 +000013916 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13919 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921
Matthias Kloseb9621712010-04-24 17:59:49 +000013922 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13925$as_echo "$ac_cv_c_bigendian" >&6; }
13926 case $ac_cv_c_bigendian in #(
13927 yes)
13928 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13929;; #(
13930 no)
13931 ;; #(
13932 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013933
Matthias Kloseb9621712010-04-24 17:59:49 +000013934$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013935
Matthias Kloseb9621712010-04-24 17:59:49 +000013936 ;; #(
13937 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013938 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013939 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013940 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013941
Michael W. Hudson54241132001-12-07 15:38:26 +000013942
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013943# ABI version string for Python extension modules. This appears between the
13944# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13945# from the following attributes which affect the ABI of this Python build (in
13946# this order):
13947#
13948# * The Python implementation (always 'cpython-' for us)
13949# * The major and minor version numbers
13950# * --with-pydebug (adds a 'd')
13951# * --with-pymalloc (adds a 'm')
13952# * --with-wide-unicode (adds a 'u')
13953#
13954# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013955# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13956# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013957
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13959$as_echo_n "checking ABIFLAGS... " >&6; }
13960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13961$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13963$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013964SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13966$as_echo "$SOABI" >&6; }
13967
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013968
13969case $ac_sys_system in
13970 Linux*|GNU*)
13971 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13972 *)
13973 EXT_SUFFIX=${SHLIB_SUFFIX};;
13974esac
13975
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13977$as_echo_n "checking LDVERSION... " >&6; }
13978LDVERSION='$(VERSION)$(ABIFLAGS)'
13979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13980$as_echo "$LDVERSION" >&6; }
13981
doko@python.org87421192013-01-26 11:39:31 +010013982
13983LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
13984
13985
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013986# Check whether right shifting a negative integer extends the sign bit
13987# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13989$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013990if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013991 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013992else
Martin v. Löwis11437992002-04-12 09:54:03 +000013993
Matthias Kloseb9621712010-04-24 17:59:49 +000013994if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013995 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013996else
Matthias Kloseb9621712010-04-24 17:59:49 +000013997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013998/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013999
14000int main()
14001{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014002 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014003}
14004
Martin v. Löwis11437992002-04-12 09:54:03 +000014005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014006if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014007 ac_cv_rshift_extends_sign=yes
14008else
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014011rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14012 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014013fi
14014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014015fi
14016
Matthias Kloseb9621712010-04-24 17:59:49 +000014017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14018$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014019if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014020then
Martin v. Löwis11437992002-04-12 09:54:03 +000014021
Matthias Kloseb9621712010-04-24 17:59:49 +000014022$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014023
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014024fi
14025
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014026# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14028$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014029if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014031else
Martin v. Löwis11437992002-04-12 09:54:03 +000014032
Matthias Kloseb9621712010-04-24 17:59:49 +000014033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014034/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014035#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014036int
14037main ()
14038{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014039
14040 FILE *f = fopen("/dev/null", "r");
14041 flockfile(f);
14042 getc_unlocked(f);
14043 funlockfile(f);
14044
Martin v. Löwis11437992002-04-12 09:54:03 +000014045 ;
14046 return 0;
14047}
14048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014049if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014050 ac_cv_have_getc_unlocked=yes
14051else
Matthias Kloseb9621712010-04-24 17:59:49 +000014052 ac_cv_have_getc_unlocked=no
14053fi
14054rm -f core conftest.err conftest.$ac_objext \
14055 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014057
Matthias Kloseb9621712010-04-24 17:59:49 +000014058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14059$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014060if test "$ac_cv_have_getc_unlocked" = yes
14061then
Martin v. Löwis11437992002-04-12 09:54:03 +000014062
Matthias Kloseb9621712010-04-24 17:59:49 +000014063$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014064
14065fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014066
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014067# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014068# save the value of LIBS so we don't actually link Python with readline
14069LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014070
Gregory P. Smith18820942008-09-07 06:24:49 +000014071# On some systems we need to link readline to a termcap compatible
14072# library. NOTE: Keep the precedence of listed libraries synchronised
14073# with setup.py.
14074py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14076$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014077for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014078 if test -z "$py_libtermcap"; then
14079 READLINE_LIBS="-lreadline"
14080 else
14081 READLINE_LIBS="-lreadline -l$py_libtermcap"
14082 fi
14083 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014085/* end confdefs.h. */
14086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014087/* Override any GCC internal prototype to avoid an error.
14088 Use char because int might match the return type of a GCC
14089 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014090#ifdef __cplusplus
14091extern "C"
14092#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014093char readline ();
14094int
14095main ()
14096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014097return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014098 ;
14099 return 0;
14100}
14101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014102if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014103 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014105rm -f core conftest.err conftest.$ac_objext \
14106 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014107 if test $py_cv_lib_readline = yes; then
14108 break
14109 fi
14110done
14111# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14112#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014113if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14115$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014116else
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14118$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014119
Matthias Kloseb9621712010-04-24 17:59:49 +000014120$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014121
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014122fi
14123
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014124# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14126$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014127if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014129else
14130 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014131LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014133/* end confdefs.h. */
14134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014135/* Override any GCC internal prototype to avoid an error.
14136 Use char because int might match the return type of a GCC
14137 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014138#ifdef __cplusplus
14139extern "C"
14140#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014141char rl_callback_handler_install ();
14142int
14143main ()
14144{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014145return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014146 ;
14147 return 0;
14148}
14149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014150if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014151 ac_cv_lib_readline_rl_callback_handler_install=yes
14152else
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014155rm -f core conftest.err conftest.$ac_objext \
14156 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014157LIBS=$ac_check_lib_save_LIBS
14158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14160$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014161if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014162
Matthias Kloseb9621712010-04-24 17:59:49 +000014163$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014164
14165fi
14166
14167
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014168# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014170/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014171#include <readline/readline.h>
14172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014173if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014174 have_readline=yes
14175else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014176 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014177
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014178fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014179rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014180if test $have_readline = yes
14181then
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014183/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014184#include <readline/readline.h>
14185
14186_ACEOF
14187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014189
Matthias Kloseb9621712010-04-24 17:59:49 +000014190$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014191
14192fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014193rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014194
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014196/* end confdefs.h. */
14197#include <readline/readline.h>
14198
14199_ACEOF
14200if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014201 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014202
Matthias Kloseb9621712010-04-24 17:59:49 +000014203$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014204
14205fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014206rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014207
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014208fi
14209
Martin v. Löwis0daad592001-09-30 21:09:59 +000014210# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14212$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014213if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014214 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014215else
Martin v. Löwis11437992002-04-12 09:54:03 +000014216 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014217LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014221/* Override any GCC internal prototype to avoid an error.
14222 Use char because int might match the return type of a GCC
14223 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014224#ifdef __cplusplus
14225extern "C"
14226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014227char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014228int
14229main ()
14230{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014232 ;
14233 return 0;
14234}
14235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014236if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014237 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014238else
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014241rm -f core conftest.err conftest.$ac_objext \
14242 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014243LIBS=$ac_check_lib_save_LIBS
14244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14246$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014247if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014248
Matthias Kloseb9621712010-04-24 17:59:49 +000014249$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014250
Martin v. Löwis0daad592001-09-30 21:09:59 +000014251fi
14252
Michael W. Hudson54241132001-12-07 15:38:26 +000014253
Thomas Wouters89d996e2007-09-08 17:39:28 +000014254# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14256$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014257if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014258 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014259else
14260 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014261LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014263/* end confdefs.h. */
14264
14265/* Override any GCC internal prototype to avoid an error.
14266 Use char because int might match the return type of a GCC
14267 builtin and then its argument prototype would still apply. */
14268#ifdef __cplusplus
14269extern "C"
14270#endif
14271char rl_completion_display_matches_hook ();
14272int
14273main ()
14274{
14275return rl_completion_display_matches_hook ();
14276 ;
14277 return 0;
14278}
14279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014280if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014281 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14282else
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014285rm -f core conftest.err conftest.$ac_objext \
14286 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014287LIBS=$ac_check_lib_save_LIBS
14288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14290$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014291if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014292
Matthias Kloseb9621712010-04-24 17:59:49 +000014293$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014294
14295fi
14296
14297
Martin v. Löwis0daad592001-09-30 21:09:59 +000014298# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14300$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014301if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014303else
Martin v. Löwis11437992002-04-12 09:54:03 +000014304 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014305LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014309/* Override any GCC internal prototype to avoid an error.
14310 Use char because int might match the return type of a GCC
14311 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014312#ifdef __cplusplus
14313extern "C"
14314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014315char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014316int
14317main ()
14318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014319return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014320 ;
14321 return 0;
14322}
14323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014324if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014325 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014326else
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014329rm -f core conftest.err conftest.$ac_objext \
14330 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014331LIBS=$ac_check_lib_save_LIBS
14332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14334$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014335if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014336
Matthias Kloseb9621712010-04-24 17:59:49 +000014337$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014338
Guido van Rossum353ae582001-07-10 16:45:32 +000014339fi
14340
Jack Jansendd19cf82001-12-06 22:36:17 +000014341
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014342# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014344/* end confdefs.h. */
14345#include <readline/readline.h>
14346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014347if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014348 have_readline=yes
14349else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014350 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014351
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014352fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014353rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014354if test $have_readline = yes
14355then
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014357/* end confdefs.h. */
14358#include <readline/readline.h>
14359
14360_ACEOF
14361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014362 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014363
Matthias Kloseb9621712010-04-24 17:59:49 +000014364$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014365
14366fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014367rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014368
14369fi
14370
Martin v. Löwis82bca632006-02-10 20:49:30 +000014371# End of readline checks: restore LIBS
14372LIBS=$LIBS_no_readline
14373
Matthias Kloseb9621712010-04-24 17:59:49 +000014374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14375$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014376if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014378else
Martin v. Löwis11437992002-04-12 09:54:03 +000014379
Matthias Kloseb9621712010-04-24 17:59:49 +000014380if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014381 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +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. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014385
14386int main()
14387{
14388 int val1 = nice(1);
14389 if (val1 != -1 && val1 == nice(2))
14390 exit(0);
14391 exit(1);
14392}
14393
Martin v. Löwis11437992002-04-12 09:54:03 +000014394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014395if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014396 ac_cv_broken_nice=yes
14397else
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014400rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14401 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014402fi
14403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404fi
14405
Matthias Kloseb9621712010-04-24 17:59:49 +000014406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14407$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014408if test "$ac_cv_broken_nice" = yes
14409then
Martin v. Löwis11437992002-04-12 09:54:03 +000014410
Matthias Kloseb9621712010-04-24 17:59:49 +000014411$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014412
14413fi
14414
Matthias Kloseb9621712010-04-24 17:59:49 +000014415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14416$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014417if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014419else
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014421 ac_cv_broken_poll=no
14422else
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014424/* end confdefs.h. */
14425
14426#include <poll.h>
14427
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014428int main()
14429{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014430 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014431 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014432
14433 close (42);
14434
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014435 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014436 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014437 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014438 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014439 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014440 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014441 return 1;
14442}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014443
14444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014445if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014446 ac_cv_broken_poll=yes
14447else
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14451 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014454fi
14455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14457$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014458if test "$ac_cv_broken_poll" = yes
14459then
14460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014462
14463fi
14464
Brett Cannon43802422005-02-10 20:48:03 +000014465# 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 +000014466# (which is not required by ISO C or UNIX spec) and/or if we support
14467# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014468ac_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 +000014469#include <$ac_cv_struct_tm>
14470
Matthias Kloseb9621712010-04-24 17:59:49 +000014471"
Victor Stinnere0be4232011-10-25 13:06:09 +020014472if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014473
14474cat >>confdefs.h <<_ACEOF
14475#define HAVE_STRUCT_TM_TM_ZONE 1
14476_ACEOF
14477
14478
14479fi
14480
14481if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14482
Matthias Kloseb9621712010-04-24 17:59:49 +000014483$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014484
14485else
Matthias Kloseb9621712010-04-24 17:59:49 +000014486 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14487"
Victor Stinnere0be4232011-10-25 13:06:09 +020014488if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014489 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490else
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014492fi
14493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014495#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014496_ACEOF
14497
Matthias Kloseb9621712010-04-24 17:59:49 +000014498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14499$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014500if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014502else
Matthias Kloseb9621712010-04-24 17:59:49 +000014503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014504/* end confdefs.h. */
14505#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506#if !HAVE_DECL_TZNAME
14507extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014508#endif
14509
14510int
14511main ()
14512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014513return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014514 ;
14515 return 0;
14516}
14517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014518if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014519 ac_cv_var_tzname=yes
14520else
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014523rm -f core conftest.err conftest.$ac_objext \
14524 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14527$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014528 if test $ac_cv_var_tzname = yes; then
14529
Matthias Kloseb9621712010-04-24 17:59:49 +000014530$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014531
14532 fi
14533fi
14534
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014535
Martin v. Löwis1d459062005-03-14 21:23:33 +000014536# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14538$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014539if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014541else
14542
Matthias Kloseb9621712010-04-24 17:59:49 +000014543if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014544 ac_cv_working_tzset=no
14545else
Matthias Kloseb9621712010-04-24 17:59:49 +000014546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014547/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014548
14549#include <stdlib.h>
14550#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014551#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014552
14553#if HAVE_TZNAME
14554extern char *tzname[];
14555#endif
14556
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014557int main()
14558{
Brett Cannon18367812003-09-19 00:59:16 +000014559 /* Note that we need to ensure that not only does tzset(3)
14560 do 'something' with localtime, but it works as documented
14561 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014562 This includes making sure that tzname is set properly if
14563 tm->tm_zone does not exist since it is the alternative way
14564 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014565
14566 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014567 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014568 */
14569
Martin v. Löwis1d459062005-03-14 21:23:33 +000014570 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014571 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14572
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014573 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014574 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014575 if (localtime(&groundhogday)->tm_hour != 0)
14576 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014577#if HAVE_TZNAME
14578 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14579 if (strcmp(tzname[0], "UTC") ||
14580 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14581 exit(1);
14582#endif
Brett Cannon18367812003-09-19 00:59:16 +000014583
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014584 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014585 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014586 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014587 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014588#if HAVE_TZNAME
14589 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14590 exit(1);
14591#endif
Brett Cannon18367812003-09-19 00:59:16 +000014592
14593 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14594 tzset();
14595 if (localtime(&groundhogday)->tm_hour != 11)
14596 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014597#if HAVE_TZNAME
14598 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14599 exit(1);
14600#endif
14601
14602#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014603 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14604 exit(1);
14605 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14606 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014607#endif
Brett Cannon18367812003-09-19 00:59:16 +000014608
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014609 exit(0);
14610}
14611
14612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014613if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014614 ac_cv_working_tzset=yes
14615else
Matthias Kloseb9621712010-04-24 17:59:49 +000014616 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14619 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014620fi
14621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014622fi
14623
Matthias Kloseb9621712010-04-24 17:59:49 +000014624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14625$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014626if test "$ac_cv_working_tzset" = yes
14627then
14628
Matthias Kloseb9621712010-04-24 17:59:49 +000014629$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014630
14631fi
14632
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014633# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14635$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014636if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014638else
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014640/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014641#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014642int
14643main ()
14644{
14645
14646struct stat st;
14647st.st_mtim.tv_nsec = 1;
14648
14649 ;
14650 return 0;
14651}
14652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014654 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014655else
Matthias Kloseb9621712010-04-24 17:59:49 +000014656 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14659fi
14660
Matthias Kloseb9621712010-04-24 17:59:49 +000014661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14662$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014663if test "$ac_cv_stat_tv_nsec" = yes
14664then
14665
Matthias Kloseb9621712010-04-24 17:59:49 +000014666$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014667
14668fi
14669
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014670# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14672$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014673if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014674 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014675else
Matthias Kloseb9621712010-04-24 17:59:49 +000014676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014677/* end confdefs.h. */
14678#include <sys/stat.h>
14679int
14680main ()
14681{
14682
14683struct stat st;
14684st.st_mtimespec.tv_nsec = 1;
14685
14686 ;
14687 return 0;
14688}
14689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014690if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014691 ac_cv_stat_tv_nsec2=yes
14692else
Matthias Kloseb9621712010-04-24 17:59:49 +000014693 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14696fi
14697
Matthias Kloseb9621712010-04-24 17:59:49 +000014698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14699$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014700if test "$ac_cv_stat_tv_nsec2" = yes
14701then
14702
Matthias Kloseb9621712010-04-24 17:59:49 +000014703$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014704
14705fi
14706
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014707# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014708ac_save_cppflags="$CPPFLAGS"
14709CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014710
14711for ac_header in curses.h ncurses.h
14712do :
14713 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14714ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14715if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14716 cat >>confdefs.h <<_ACEOF
14717#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14718_ACEOF
14719
14720fi
14721
14722done
14723
14724
14725# On Solaris, term.h requires curses.h
14726for ac_header in term.h
14727do :
14728 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14729#ifdef HAVE_CURSES_H
14730#include <curses.h>
14731#endif
14732
14733"
14734if test "x$ac_cv_header_term_h" = xyes; then :
14735 cat >>confdefs.h <<_ACEOF
14736#define HAVE_TERM_H 1
14737_ACEOF
14738
14739fi
14740
14741done
14742
14743
Jack Jansen666b1e72001-10-31 12:11:48 +000014744# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14746$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014747if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014749else
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014751/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014752#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014753int
14754main ()
14755{
Jack Jansen666b1e72001-10-31 12:11:48 +000014756
14757 int rtn;
14758 rtn = mvwdelch(0,0,0);
14759
Martin v. Löwis11437992002-04-12 09:54:03 +000014760 ;
14761 return 0;
14762}
14763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014764if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014765 ac_cv_mvwdelch_is_expression=yes
14766else
Matthias Kloseb9621712010-04-24 17:59:49 +000014767 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14770fi
14771
Matthias Kloseb9621712010-04-24 17:59:49 +000014772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14773$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014774
14775if test "$ac_cv_mvwdelch_is_expression" = yes
14776then
Martin v. Löwis11437992002-04-12 09:54:03 +000014777
Matthias Kloseb9621712010-04-24 17:59:49 +000014778$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014779
14780fi
14781
Matthias Kloseb9621712010-04-24 17:59:49 +000014782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14783$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014784if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014786else
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014788/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014789#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014790int
14791main ()
14792{
Jack Jansen666b1e72001-10-31 12:11:48 +000014793
14794 WINDOW *w;
14795 w->_flags = 0;
14796
Martin v. Löwis11437992002-04-12 09:54:03 +000014797 ;
14798 return 0;
14799}
14800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014801if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014802 ac_cv_window_has_flags=yes
14803else
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14807fi
14808
Matthias Kloseb9621712010-04-24 17:59:49 +000014809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14810$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014811
Jack Jansen666b1e72001-10-31 12:11:48 +000014812
14813if test "$ac_cv_window_has_flags" = yes
14814then
Martin v. Löwis11437992002-04-12 09:54:03 +000014815
Matthias Kloseb9621712010-04-24 17:59:49 +000014816$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014817
14818fi
14819
Matthias Kloseb9621712010-04-24 17:59:49 +000014820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14821$as_echo_n "checking for is_term_resized... " >&6; }
14822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014823/* end confdefs.h. */
14824#include <curses.h>
14825int
14826main ()
14827{
14828void *x=is_term_resized
14829 ;
14830 return 0;
14831}
14832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014833if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014834
Matthias Kloseb9621712010-04-24 17:59:49 +000014835$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014836
Matthias Kloseb159a552010-04-25 21:00:44 +000014837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014838$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014839else
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14841$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014842
14843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14845
Matthias Kloseb9621712010-04-24 17:59:49 +000014846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14847$as_echo_n "checking for resize_term... " >&6; }
14848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014849/* end confdefs.h. */
14850#include <curses.h>
14851int
14852main ()
14853{
14854void *x=resize_term
14855 ;
14856 return 0;
14857}
14858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014859if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014860
Matthias Kloseb9621712010-04-24 17:59:49 +000014861$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014862
Matthias Kloseb159a552010-04-25 21:00:44 +000014863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014864$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014865else
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14867$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014868
14869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14871
Matthias Kloseb9621712010-04-24 17:59:49 +000014872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14873$as_echo_n "checking for resizeterm... " >&6; }
14874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014875/* end confdefs.h. */
14876#include <curses.h>
14877int
14878main ()
14879{
14880void *x=resizeterm
14881 ;
14882 return 0;
14883}
14884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014885if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014886
Matthias Kloseb9621712010-04-24 17:59:49 +000014887$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014888
Matthias Kloseb159a552010-04-25 21:00:44 +000014889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014890$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014891else
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14893$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014894
14895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014897# last curses configure check
14898CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14901$as_echo "$as_me: checking for device files" >&6;}
14902
14903if test "x$cross_compiling" = xyes; then
14904 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14906$as_echo_n "checking for /dev/ptmx... " >&6; }
14907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14908$as_echo "not set" >&6; }
14909 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14910 fi
14911 if test "${ac_cv_file__dev_ptc+set}" != set; then
14912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14913$as_echo_n "checking for /dev/ptc... " >&6; }
14914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14915$as_echo "not set" >&6; }
14916 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14917 fi
14918fi
14919
Matthias Kloseb9621712010-04-24 17:59:49 +000014920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14921$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014922if ${ac_cv_file__dev_ptmx+:} false; then :
14923 $as_echo_n "(cached) " >&6
14924else
14925 test "$cross_compiling" = yes &&
14926 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14927if test -r "/dev/ptmx"; then
14928 ac_cv_file__dev_ptmx=yes
14929else
14930 ac_cv_file__dev_ptmx=no
14931fi
14932fi
14933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14934$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14935if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014936
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014937fi
14938
14939if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014940
Matthias Kloseb9621712010-04-24 17:59:49 +000014941$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014942
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14945$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014946if ${ac_cv_file__dev_ptc+:} false; then :
14947 $as_echo_n "(cached) " >&6
14948else
14949 test "$cross_compiling" = yes &&
14950 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14951if test -r "/dev/ptc"; then
14952 ac_cv_file__dev_ptc=yes
14953else
14954 ac_cv_file__dev_ptc=no
14955fi
14956fi
14957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14958$as_echo "$ac_cv_file__dev_ptc" >&6; }
14959if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014960
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014961fi
14962
14963if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014964
Matthias Kloseb9621712010-04-24 17:59:49 +000014965$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014966
Neal Norwitz865400f2003-03-21 01:42:58 +000014967fi
14968
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014969if test "$have_long_long" = yes
14970then
Matthias Kloseb9621712010-04-24 17:59:49 +000014971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14972$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014973 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014975else
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014977 ac_cv_have_long_long_format="cross -- assuming no"
14978 if test x$GCC = xyes; then
14979 save_CFLAGS=$CFLAGS
14980 CFLAGS="$CFLAGS -Werror -Wformat"
14981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14982/* end confdefs.h. */
14983
14984 #include <stdio.h>
14985 #include <stddef.h>
14986
14987int
14988main ()
14989{
14990
14991 char *buffer;
14992 sprintf(buffer, "%lld", (long long)123);
14993 sprintf(buffer, "%lld", (long long)-123);
14994 sprintf(buffer, "%llu", (unsigned long long)123);
14995
14996 ;
14997 return 0;
14998}
14999_ACEOF
15000if ac_fn_c_try_compile "$LINENO"; then :
15001 ac_cv_have_long_long_format=yes
15002
15003fi
15004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15005 CFLAGS=$save_CFLAGS
15006 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015007else
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015009/* end confdefs.h. */
15010
15011 #include <stdio.h>
15012 #include <stddef.h>
15013 #include <string.h>
15014
15015 #ifdef HAVE_SYS_TYPES_H
15016 #include <sys/types.h>
15017 #endif
15018
15019 int main()
15020 {
15021 char buffer[256];
15022
15023 if (sprintf(buffer, "%lld", (long long)123) < 0)
15024 return 1;
15025 if (strcmp(buffer, "123"))
15026 return 1;
15027
15028 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15029 return 1;
15030 if (strcmp(buffer, "-123"))
15031 return 1;
15032
15033 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15034 return 1;
15035 if (strcmp(buffer, "123"))
15036 return 1;
15037
15038 return 0;
15039 }
15040
15041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015042if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015043 ac_cv_have_long_long_format=yes
15044else
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15048 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015049fi
15050
15051
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015052fi
15053
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15055$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015056fi
15057
Mark Dickinson89d7d412009-12-31 20:50:59 +000015058if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015059then
15060
Matthias Kloseb9621712010-04-24 17:59:49 +000015061$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015062
15063fi
15064
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015065if test $ac_sys_system = Darwin
15066then
15067 LIBS="$LIBS -framework CoreFoundation"
15068fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015069
Matthias Kloseb9621712010-04-24 17:59:49 +000015070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15071$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015072if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015074else
Matthias Kloseb9621712010-04-24 17:59:49 +000015075 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015076 ac_cv_have_size_t_format="cross -- assuming yes"
15077
Thomas Wouters477c8d52006-05-27 19:21:47 +000015078else
Matthias Kloseb9621712010-04-24 17:59:49 +000015079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015080/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015081
Thomas Wouters477c8d52006-05-27 19:21:47 +000015082#include <stdio.h>
15083#include <stddef.h>
15084#include <string.h>
15085
Christian Heimes2c181612007-12-17 20:04:13 +000015086#ifdef HAVE_SYS_TYPES_H
15087#include <sys/types.h>
15088#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015089
15090#ifdef HAVE_SSIZE_T
15091typedef ssize_t Py_ssize_t;
15092#elif SIZEOF_VOID_P == SIZEOF_LONG
15093typedef long Py_ssize_t;
15094#else
15095typedef int Py_ssize_t;
15096#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015097
Christian Heimes2c181612007-12-17 20:04:13 +000015098int main()
15099{
15100 char buffer[256];
15101
Thomas Wouters477c8d52006-05-27 19:21:47 +000015102 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15103 return 1;
15104
Thomas Wouters89f507f2006-12-13 04:49:30 +000015105 if (strcmp(buffer, "123"))
15106 return 1;
15107
15108 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15109 return 1;
15110
15111 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015112 return 1;
15113
15114 return 0;
15115}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015116
Thomas Wouters477c8d52006-05-27 19:21:47 +000015117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015118if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015119 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015120else
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15124 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015125fi
15126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15129$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015130if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015131
Matthias Kloseb9621712010-04-24 17:59:49 +000015132$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015133
15134fi
15135
Matthias Kloseb9621712010-04-24 17:59:49 +000015136ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015137#ifdef HAVE_SYS_TYPES_H
15138#include <sys/types.h>
15139#endif
15140#ifdef HAVE_SYS_SOCKET_H
15141#include <sys/socket.h>
15142#endif
15143
Matthias Kloseb9621712010-04-24 17:59:49 +000015144"
Victor Stinnere0be4232011-10-25 13:06:09 +020015145if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015146
Martin v. Löwis11437992002-04-12 09:54:03 +000015147else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015150
15151fi
15152
Michael W. Hudson54241132001-12-07 15:38:26 +000015153
Matthias Kloseb9621712010-04-24 17:59:49 +000015154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15155$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015156if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015158else
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015160 ac_cv_broken_mbstowcs=no
15161else
Matthias Kloseb9621712010-04-24 17:59:49 +000015162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015163/* end confdefs.h. */
15164
Stefan Krah19c21392012-11-22 23:47:32 +010015165#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015166#include<stdlib.h>
15167int main() {
15168 size_t len = -1;
15169 const char *str = "text";
15170 len = mbstowcs(NULL, str, 0);
15171 return (len != 4);
15172}
15173
15174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015175if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015176 ac_cv_broken_mbstowcs=no
15177else
Matthias Kloseb9621712010-04-24 17:59:49 +000015178 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15181 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015182fi
15183
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015184fi
15185
Matthias Kloseb9621712010-04-24 17:59:49 +000015186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15187$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015188if test "$ac_cv_broken_mbstowcs" = yes
15189then
15190
Matthias Kloseb9621712010-04-24 17:59:49 +000015191$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015192
15193fi
15194
Antoine Pitroub52ec782009-01-25 16:34:23 +000015195# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15197$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015198
15199# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015200if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015201 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015202if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015203then
15204
Matthias Kloseb9621712010-04-24 17:59:49 +000015205$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015206
Matthias Kloseb9621712010-04-24 17:59:49 +000015207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15208$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015209fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015210if test "$withval" = no
15211then
15212
15213$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15214
Matthias Kloseb9621712010-04-24 17:59:49 +000015215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15216$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015217fi
15218
Antoine Pitrou042b1282010-08-13 21:15:58 +000015219else
15220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15221$as_echo "no value specified" >&6; }
15222fi
15223
Antoine Pitroub52ec782009-01-25 16:34:23 +000015224
Matthias Kloseb17289e2012-03-15 19:51:34 +010015225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15226$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15227if ${ac_cv_computed_gotos+:} false; then :
15228 $as_echo_n "(cached) " >&6
15229else
15230 if test "$cross_compiling" = yes; then :
15231 if test "${with_computed_gotos+set}" = set; then
15232 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15233 else
15234 ac_cv_computed_gotos=no
15235 fi
15236else
15237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15238/* end confdefs.h. */
15239
15240int main(int argc, char **argv)
15241{
15242 static void *targets[1] = { &&LABEL1 };
15243 goto LABEL2;
15244LABEL1:
15245 return 0;
15246LABEL2:
15247 goto *targets[0];
15248 return 1;
15249}
15250
15251_ACEOF
15252if ac_fn_c_try_run "$LINENO"; then :
15253 ac_cv_computed_gotos=yes
15254else
15255 ac_cv_computed_gotos=no
15256fi
15257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15258 conftest.$ac_objext conftest.beam conftest.$ac_ext
15259fi
15260
15261fi
15262
15263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15264$as_echo "$ac_cv_computed_gotos" >&6; }
15265case "$ac_cv_computed_gotos" in yes*)
15266
15267$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15268
15269esac
15270
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015271case $ac_sys_system in
15272AIX*)
15273
15274$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15275 ;;
15276esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015277
Michael W. Hudson54241132001-12-07 15:38:26 +000015278
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015279
15280
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015281for h in `(cd $srcdir;echo Python/thread_*.h)`
15282do
15283 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15284done
15285
Michael W. Hudson54241132001-12-07 15:38:26 +000015286
Neal Norwitzd24499d2005-12-18 21:36:39 +000015287SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15289$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015290for dir in $SRCDIRS; do
15291 if test ! -d $dir; then
15292 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015293 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015294done
Matthias Kloseb9621712010-04-24 17:59:49 +000015295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15296$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015297
Stefan Krah1919b7e2012-03-21 18:25:23 +010015298# Availability of -O2:
15299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15300$as_echo_n "checking for -O2... " >&6; }
15301saved_cflags="$CFLAGS"
15302CFLAGS="-O2"
15303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15304/* end confdefs.h. */
15305
15306int
15307main ()
15308{
15309
15310
15311 ;
15312 return 0;
15313}
15314_ACEOF
15315if ac_fn_c_try_compile "$LINENO"; then :
15316 have_O2=yes
15317else
15318 have_O2=no
15319fi
15320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15322$as_echo "$have_O2" >&6; }
15323CFLAGS="$saved_cflags"
15324
15325# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15326# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15328$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15329saved_cflags="$CFLAGS"
15330CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15331if test "$have_O2" = no; then
15332 CFLAGS=""
15333fi
15334if test "$cross_compiling" = yes; then :
15335 have_glibc_memmove_bug=undefined
15336else
15337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15338/* end confdefs.h. */
15339
15340#include <stdio.h>
15341#include <stdlib.h>
15342#include <string.h>
15343void foo(void *p, void *q) { memmove(p, q, 19); }
15344int main() {
15345 char a[32] = "123456789000000000";
15346 foo(&a[9], a);
15347 if (strcmp(a, "123456789123456789000000000") != 0)
15348 return 1;
15349 foo(a, &a[9]);
15350 if (strcmp(a, "123456789000000000") != 0)
15351 return 1;
15352 return 0;
15353}
15354
15355_ACEOF
15356if ac_fn_c_try_run "$LINENO"; then :
15357 have_glibc_memmove_bug=no
15358else
15359 have_glibc_memmove_bug=yes
15360fi
15361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15362 conftest.$ac_objext conftest.beam conftest.$ac_ext
15363fi
15364
15365CFLAGS="$saved_cflags"
15366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15367$as_echo "$have_glibc_memmove_bug" >&6; }
15368if test "$have_glibc_memmove_bug" = yes; then
15369
15370$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15371
15372fi
15373
15374if test "$have_gcc_asm_for_x87" = yes; then
15375 # Some versions of gcc miscompile inline asm:
15376 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15377 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15378 case $CC in
15379 *gcc*)
15380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15381$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15382 saved_cflags="$CFLAGS"
15383 CFLAGS="-O2"
15384 if test "$cross_compiling" = yes; then :
15385 have_ipa_pure_const_bug=undefined
15386else
15387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15388/* end confdefs.h. */
15389
15390 __attribute__((noinline)) int
15391 foo(int *p) {
15392 int r;
15393 asm ( "movl \$6, (%1)\n\t"
15394 "xorl %0, %0\n\t"
15395 : "=r" (r) : "r" (p) : "memory"
15396 );
15397 return r;
15398 }
15399 int main() {
15400 int p = 8;
15401 if ((foo(&p) ? : p) != 6)
15402 return 1;
15403 return 0;
15404 }
15405
15406_ACEOF
15407if ac_fn_c_try_run "$LINENO"; then :
15408 have_ipa_pure_const_bug=no
15409else
15410 have_ipa_pure_const_bug=yes
15411fi
15412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15413 conftest.$ac_objext conftest.beam conftest.$ac_ext
15414fi
15415
15416 CFLAGS="$saved_cflags"
15417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15418$as_echo "$have_ipa_pure_const_bug" >&6; }
15419 if test "$have_ipa_pure_const_bug" = yes; then
15420
15421$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15422
15423 fi
15424 ;;
15425 esac
15426fi
15427
Ned Deily322f5ba2013-11-21 23:01:59 -080015428# ensurepip option
15429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15430$as_echo_n "checking for ensurepip... " >&6; }
15431
15432# Check whether --with-ensurepip was given.
15433if test "${with_ensurepip+set}" = set; then :
15434 withval=$with_ensurepip;
15435else
15436 with_ensurepip=upgrade
15437fi
15438
15439case $with_ensurepip in #(
15440 yes|upgrade) :
15441 ENSUREPIP=upgrade ;; #(
15442 install) :
15443 ENSUREPIP=install ;; #(
15444 no) :
15445 ENSUREPIP=no ;; #(
15446 *) :
15447 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15448esac
15449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15450$as_echo "$ENSUREPIP" >&6; }
15451
15452
Guido van Rossum627b2d71993-12-24 10:39:16 +000015453# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015454ac_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 +000015455
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015456ac_config_files="$ac_config_files Modules/ld_so_aix"
15457
Martin v. Löwis11437992002-04-12 09:54:03 +000015458cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015459# This file is a shell script that caches the results of configure
15460# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015461# scripts and configure runs, see configure's option --config-cache.
15462# It is not useful on other systems. If it contains results you don't
15463# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015464#
Martin v. Löwis11437992002-04-12 09:54:03 +000015465# config.status only pays attention to the cache file if you give it
15466# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015467#
Skip Montanaro6dead952003-09-25 14:50:04 +000015468# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015469# loading this file, other *unset* `ac_cv_foo' will be assigned the
15470# following values.
15471
15472_ACEOF
15473
Guido van Rossumf78abae1997-01-21 22:02:36 +000015474# The following way of writing the cache mishandles newlines in values,
15475# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015477# Ultrix sh set writes to stderr and can't be redirected directly,
15478# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015479(
15480 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15481 eval ac_val=\$$ac_var
15482 case $ac_val in #(
15483 *${as_nl}*)
15484 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015485 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15486$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015487 esac
15488 case $ac_var in #(
15489 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015490 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15491 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015492 esac ;;
15493 esac
15494 done
15495
Martin v. Löwis11437992002-04-12 09:54:03 +000015496 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015497 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15498 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015499 # `set' does not quote correctly, so add quotes: double-quote
15500 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015501 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015502 "s/'/'\\\\''/g;
15503 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015504 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015505 *)
15506 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015507 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015508 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015509 esac |
15510 sort
15511) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015512 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015513 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015514 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015515 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015516 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15517 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015518 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15519 :end' >>confcache
15520if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15521 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015522 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015523 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15524$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015525 if test ! -f "$cache_file" || test -h "$cache_file"; then
15526 cat confcache >"$cache_file"
15527 else
15528 case $cache_file in #(
15529 */* | ?:*)
15530 mv -f confcache "$cache_file"$$ &&
15531 mv -f "$cache_file"$$ "$cache_file" ;; #(
15532 *)
15533 mv -f confcache "$cache_file" ;;
15534 esac
15535 fi
15536 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015537 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15539$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015540 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015541fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015542rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015543
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015544test "x$prefix" = xNONE && prefix=$ac_default_prefix
15545# Let make expand exec_prefix.
15546test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015547
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015548DEFS=-DHAVE_CONFIG_H
15549
Skip Montanaro6dead952003-09-25 14:50:04 +000015550ac_libobjs=
15551ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015552U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015553for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15554 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015555 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015557 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15558 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015559 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15560 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015561done
15562LIBOBJS=$ac_libobjs
15563
15564LTLIBOBJS=$ac_ltlibobjs
15565
15566
Martin v. Löwis11437992002-04-12 09:54:03 +000015567
Matthias Kloseb9621712010-04-24 17:59:49 +000015568
Victor Stinnere0be4232011-10-25 13:06:09 +020015569: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015570ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015571ac_clean_files_save=$ac_clean_files
15572ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015573{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15574$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15575as_write_fail=0
15576cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015577#! $SHELL
15578# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015579# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015580# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015581# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015582
Martin v. Löwis11437992002-04-12 09:54:03 +000015583debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015584ac_cs_recheck=false
15585ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015586
Matthias Kloseb9621712010-04-24 17:59:49 +000015587SHELL=\${CONFIG_SHELL-$SHELL}
15588export SHELL
15589_ASEOF
15590cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15591## -------------------- ##
15592## M4sh Initialization. ##
15593## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595# Be more Bourne compatible
15596DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015597if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015598 emulate sh
15599 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015600 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015601 # is contrary to our usage. Disable this feature.
15602 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015603 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015604else
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 case `(set -o) 2>/dev/null` in #(
15606 *posix*) :
15607 set -o posix ;; #(
15608 *) :
15609 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015610esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015611fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015612
15613
Matthias Kloseb9621712010-04-24 17:59:49 +000015614as_nl='
15615'
15616export as_nl
15617# Printing a long string crashes Solaris 7 /usr/bin/printf.
15618as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15619as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15620as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15621# Prefer a ksh shell builtin over an external printf program on Solaris,
15622# but without wasting forks for bash or zsh.
15623if test -z "$BASH_VERSION$ZSH_VERSION" \
15624 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15625 as_echo='print -r --'
15626 as_echo_n='print -rn --'
15627elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15628 as_echo='printf %s\n'
15629 as_echo_n='printf %s'
15630else
15631 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15632 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15633 as_echo_n='/usr/ucb/echo -n'
15634 else
15635 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15636 as_echo_n_body='eval
15637 arg=$1;
15638 case $arg in #(
15639 *"$as_nl"*)
15640 expr "X$arg" : "X\\(.*\\)$as_nl";
15641 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15642 esac;
15643 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15644 '
15645 export as_echo_n_body
15646 as_echo_n='sh -c $as_echo_n_body as_echo'
15647 fi
15648 export as_echo_body
15649 as_echo='sh -c $as_echo_body as_echo'
15650fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015651
15652# The user is always right.
15653if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 PATH_SEPARATOR=:
15655 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15656 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15657 PATH_SEPARATOR=';'
15658 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015661
15662# IFS
15663# We need space, tab and new line, in precisely that order. Quoting is
15664# there to prevent editors from complaining about space-tab.
15665# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15666# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015667IFS=" "" $as_nl"
15668
15669# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015670as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015671case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015672 *[\\/]* ) as_myself=$0 ;;
15673 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015674for as_dir in $PATH
15675do
15676 IFS=$as_save_IFS
15677 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015678 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15679 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015680IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015682 ;;
15683esac
15684# We did not find ourselves, most probably we were run as `sh COMMAND'
15685# in which case we are not to be found in the path.
15686if test "x$as_myself" = x; then
15687 as_myself=$0
15688fi
15689if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015690 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15691 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015692fi
15693
Matthias Kloseb9621712010-04-24 17:59:49 +000015694# Unset variables that we do not need and which cause bugs (e.g. in
15695# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15696# suppresses any "Segmentation fault" message there. '((' could
15697# trigger a bug in pdksh 5.2.14.
15698for as_var in BASH_ENV ENV MAIL MAILPATH
15699do eval test x\${$as_var+set} = xset \
15700 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701done
15702PS1='$ '
15703PS2='> '
15704PS4='+ '
15705
15706# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015707LC_ALL=C
15708export LC_ALL
15709LANGUAGE=C
15710export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015711
Matthias Kloseb9621712010-04-24 17:59:49 +000015712# CDPATH.
15713(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15714
15715
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015716# as_fn_error STATUS ERROR [LINENO LOG_FD]
15717# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015718# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15719# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015720# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015721as_fn_error ()
15722{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015723 as_status=$1; test $as_status -eq 0 && as_status=1
15724 if test "$4"; then
15725 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15726 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015727 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015728 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015729 as_fn_exit $as_status
15730} # as_fn_error
15731
15732
15733# as_fn_set_status STATUS
15734# -----------------------
15735# Set $? to STATUS, without forking.
15736as_fn_set_status ()
15737{
15738 return $1
15739} # as_fn_set_status
15740
15741# as_fn_exit STATUS
15742# -----------------
15743# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15744as_fn_exit ()
15745{
15746 set +e
15747 as_fn_set_status $1
15748 exit $1
15749} # as_fn_exit
15750
15751# as_fn_unset VAR
15752# ---------------
15753# Portably unset VAR.
15754as_fn_unset ()
15755{
15756 { eval $1=; unset $1;}
15757}
15758as_unset=as_fn_unset
15759# as_fn_append VAR VALUE
15760# ----------------------
15761# Append the text in VALUE to the end of the definition contained in VAR. Take
15762# advantage of any shell optimizations that allow amortized linear growth over
15763# repeated appends, instead of the typical quadratic growth present in naive
15764# implementations.
15765if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15766 eval 'as_fn_append ()
15767 {
15768 eval $1+=\$2
15769 }'
15770else
15771 as_fn_append ()
15772 {
15773 eval $1=\$$1\$2
15774 }
15775fi # as_fn_append
15776
15777# as_fn_arith ARG...
15778# ------------------
15779# Perform arithmetic evaluation on the ARGs, and store the result in the
15780# global $as_val. Take advantage of shells that can avoid forks. The arguments
15781# must be portable across $(()) and expr.
15782if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15783 eval 'as_fn_arith ()
15784 {
15785 as_val=$(( $* ))
15786 }'
15787else
15788 as_fn_arith ()
15789 {
15790 as_val=`expr "$@" || test $? -eq 1`
15791 }
15792fi # as_fn_arith
15793
15794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015795if expr a : '\(a\)' >/dev/null 2>&1 &&
15796 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15797 as_expr=expr
15798else
15799 as_expr=false
15800fi
15801
15802if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15803 as_basename=basename
15804else
15805 as_basename=false
15806fi
15807
Matthias Kloseb9621712010-04-24 17:59:49 +000015808if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15809 as_dirname=dirname
15810else
15811 as_dirname=false
15812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814as_me=`$as_basename -- "$0" ||
15815$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15816 X"$0" : 'X\(//\)$' \| \
15817 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015818$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015819 sed '/^.*\/\([^/][^/]*\)\/*$/{
15820 s//\1/
15821 q
15822 }
15823 /^X\/\(\/\/\)$/{
15824 s//\1/
15825 q
15826 }
15827 /^X\/\(\/\).*/{
15828 s//\1/
15829 q
15830 }
15831 s/.*/./; q'`
15832
Matthias Kloseb9621712010-04-24 17:59:49 +000015833# Avoid depending upon Character Ranges.
15834as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15835as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15836as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15837as_cr_digits='0123456789'
15838as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839
15840ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015841case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015842-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015843 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015845 xy) ECHO_C='\c';;
15846 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15847 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015848 esac;;
15849*)
15850 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015851esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015852
Martin v. Löwis11437992002-04-12 09:54:03 +000015853rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015854if test -d conf$$.dir; then
15855 rm -f conf$$.dir/conf$$.file
15856else
15857 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015858 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015860if (echo >conf$$.file) 2>/dev/null; then
15861 if ln -s conf$$.file conf$$ 2>/dev/null; then
15862 as_ln_s='ln -s'
15863 # ... but there are two gotchas:
15864 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15865 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015866 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015867 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015868 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015869 elif ln conf$$.file conf$$ 2>/dev/null; then
15870 as_ln_s=ln
15871 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015872 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015873 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015874else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015875 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15878rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015879
Matthias Kloseb9621712010-04-24 17:59:49 +000015880
15881# as_fn_mkdir_p
15882# -------------
15883# Create "$as_dir" as a directory, including parents if necessary.
15884as_fn_mkdir_p ()
15885{
15886
15887 case $as_dir in #(
15888 -*) as_dir=./$as_dir;;
15889 esac
15890 test -d "$as_dir" || eval $as_mkdir_p || {
15891 as_dirs=
15892 while :; do
15893 case $as_dir in #(
15894 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15895 *) as_qdir=$as_dir;;
15896 esac
15897 as_dirs="'$as_qdir' $as_dirs"
15898 as_dir=`$as_dirname -- "$as_dir" ||
15899$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15900 X"$as_dir" : 'X\(//\)[^/]' \| \
15901 X"$as_dir" : 'X\(//\)$' \| \
15902 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15903$as_echo X"$as_dir" |
15904 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15905 s//\1/
15906 q
15907 }
15908 /^X\(\/\/\)[^/].*/{
15909 s//\1/
15910 q
15911 }
15912 /^X\(\/\/\)$/{
15913 s//\1/
15914 q
15915 }
15916 /^X\(\/\).*/{
15917 s//\1/
15918 q
15919 }
15920 s/.*/./; q'`
15921 test -d "$as_dir" && break
15922 done
15923 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015924 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015925
15926
15927} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015928if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015929 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015930else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015931 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015932 as_mkdir_p=false
15933fi
15934
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015935
15936# as_fn_executable_p FILE
15937# -----------------------
15938# Test if FILE is an executable regular file.
15939as_fn_executable_p ()
15940{
15941 test -f "$1" && test -x "$1"
15942} # as_fn_executable_p
15943as_test_x='test -x'
15944as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015945
15946# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015947as_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 +000015948
15949# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015950as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015951
15952
Martin v. Löwis11437992002-04-12 09:54:03 +000015953exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015954## ----------------------------------- ##
15955## Main body of $CONFIG_STATUS script. ##
15956## ----------------------------------- ##
15957_ASEOF
15958test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015959
Matthias Kloseb9621712010-04-24 17:59:49 +000015960cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15961# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015962# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015963# values after options handling.
15964ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015965This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015966generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015967
15968 CONFIG_FILES = $CONFIG_FILES
15969 CONFIG_HEADERS = $CONFIG_HEADERS
15970 CONFIG_LINKS = $CONFIG_LINKS
15971 CONFIG_COMMANDS = $CONFIG_COMMANDS
15972 $ $0 $@
15973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015974on `(hostname || uname -n) 2>/dev/null | sed 1q`
15975"
15976
Martin v. Löwis11437992002-04-12 09:54:03 +000015977_ACEOF
15978
Matthias Kloseb9621712010-04-24 17:59:49 +000015979case $ac_config_files in *"
15980"*) set x $ac_config_files; shift; ac_config_files=$*;;
15981esac
15982
15983case $ac_config_headers in *"
15984"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15985esac
15986
15987
15988cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015989# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015990config_files="$ac_config_files"
15991config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015993_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015994
Matthias Kloseb9621712010-04-24 17:59:49 +000015995cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015996ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015997\`$as_me' instantiates files and other configuration actions
15998from templates according to the current configuration. Unless the files
15999and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016000
Matthias Kloseb9621712010-04-24 17:59:49 +000016001Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016002
16003 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016004 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016005 --config print configuration, then exit
16006 -q, --quiet, --silent
16007 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 -d, --debug don't remove temporary files
16009 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016010 --file=FILE[:TEMPLATE]
16011 instantiate the configuration file FILE
16012 --header=FILE[:TEMPLATE]
16013 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016014
16015Configuration files:
16016$config_files
16017
16018Configuration headers:
16019$config_headers
16020
Matthias Kloseb9621712010-04-24 17:59:49 +000016021Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016024cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16025ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016026ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020016027python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016028configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016029 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016030
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016031Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016032This config.status script is free software; the Free Software Foundation
16033gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016034
16035ac_pwd='$ac_pwd'
16036srcdir='$srcdir'
16037INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016038MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016039test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016040_ACEOF
16041
Matthias Kloseb9621712010-04-24 17:59:49 +000016042cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16043# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016044ac_need_defaults=:
16045while test $# != 0
16046do
16047 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016048 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016049 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16050 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016051 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016052 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016053 --*=)
16054 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16055 ac_optarg=
16056 ac_shift=:
16057 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016058 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016059 ac_option=$1
16060 ac_optarg=$2
16061 ac_shift=shift
16062 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016063 esac
16064
Skip Montanaro6dead952003-09-25 14:50:04 +000016065 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016066 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016067 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16068 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016069 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016070 $as_echo "$ac_cs_version"; exit ;;
16071 --config | --confi | --conf | --con | --co | --c )
16072 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016073 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016074 debug=: ;;
16075 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016076 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016077 case $ac_optarg in
16078 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016079 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016080 esac
16081 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016082 ac_need_defaults=false;;
16083 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016084 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016085 case $ac_optarg in
16086 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16087 esac
16088 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016089 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016090 --he | --h)
16091 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016092 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016093Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016094 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016095 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016096 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16097 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16098 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016099
16100 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016101 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016102Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016103
Matthias Kloseb9621712010-04-24 17:59:49 +000016104 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016105 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016106
16107 esac
16108 shift
16109done
16110
Skip Montanaro6dead952003-09-25 14:50:04 +000016111ac_configure_extra_args=
16112
16113if $ac_cs_silent; then
16114 exec 6>/dev/null
16115 ac_configure_extra_args="$ac_configure_extra_args --silent"
16116fi
16117
16118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016119cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016120if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016121 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016122 shift
16123 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16124 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016125 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016126 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016127fi
16128
Martin v. Löwis11437992002-04-12 09:54:03 +000016129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016130cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016131exec 5>>config.log
16132{
16133 echo
16134 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16135## Running $as_me. ##
16136_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016137 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016138} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016141cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016142_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016143
Matthias Kloseb9621712010-04-24 17:59:49 +000016144cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016145
16146# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016147for ac_config_target in $ac_config_targets
16148do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016149 case $ac_config_target in
16150 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16151 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16152 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016153 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16154 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016155 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16156 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016157 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016158 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016159 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016160
Victor Stinnere0be4232011-10-25 13:06:09 +020016161 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016162 esac
16163done
16164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165
Martin v. Löwis11437992002-04-12 09:54:03 +000016166# If the user did not use the arguments to specify the items to instantiate,
16167# then the envvar interface is used. Set only those that are not.
16168# We use the long form for the default assignment because of an extremely
16169# bizarre bug on SunOS 4.1.3.
16170if $ac_need_defaults; then
16171 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16172 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16173fi
16174
Skip Montanaro6dead952003-09-25 14:50:04 +000016175# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016176# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016177# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178# Hook for its removal unless debugging.
16179# Note that there is a small window in which the directory will not be cleaned:
16180# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016181$debug ||
16182{
Victor Stinnere0be4232011-10-25 13:06:09 +020016183 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016185 : "${ac_tmp:=$tmp}"
16186 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016187' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016188 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016189}
Martin v. Löwis11437992002-04-12 09:54:03 +000016190# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016191
Martin v. Löwis11437992002-04-12 09:54:03 +000016192{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016193 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016194 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016195} ||
16196{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197 tmp=./conf$$-$RANDOM
16198 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016199} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016200ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016201
Matthias Kloseb9621712010-04-24 17:59:49 +000016202# Set up the scripts for CONFIG_FILES section.
16203# No need to generate them if there are no CONFIG_FILES.
16204# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016205if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016206
Matthias Kloseb9621712010-04-24 17:59:49 +000016207
16208ac_cr=`echo X | tr X '\015'`
16209# On cygwin, bash can eat \r inside `` if the user requested igncr.
16210# But we know of no other shell where ac_cr would be empty at this
16211# point, so we can use a bashism as a fallback.
16212if test "x$ac_cr" = x; then
16213 eval ac_cr=\$\'\\r\'
16214fi
16215ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16216if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016217 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016218else
16219 ac_cs_awk_cr=$ac_cr
16220fi
16221
Victor Stinnere0be4232011-10-25 13:06:09 +020016222echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016223_ACEOF
16224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016225
Matthias Kloseb9621712010-04-24 17:59:49 +000016226{
16227 echo "cat >conf$$subs.awk <<_ACEOF" &&
16228 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16229 echo "_ACEOF"
16230} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016231 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16232ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233ac_delim='%!_!# '
16234for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016235 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016236 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016237
Matthias Kloseb9621712010-04-24 17:59:49 +000016238 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16239 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016240 break
16241 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016242 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016243 else
16244 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016245 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016246done
Matthias Kloseb9621712010-04-24 17:59:49 +000016247rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248
Matthias Kloseb9621712010-04-24 17:59:49 +000016249cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016250cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016252sed -n '
16253h
16254s/^/S["/; s/!.*/"]=/
16255p
16256g
16257s/^[^!]*!//
16258:repl
16259t repl
16260s/'"$ac_delim"'$//
16261t delim
16262:nl
16263h
16264s/\(.\{148\}\)..*/\1/
16265t more1
16266s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16267p
16268n
16269b repl
16270:more1
16271s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16272p
16273g
16274s/.\{148\}//
16275t nl
16276:delim
16277h
16278s/\(.\{148\}\)..*/\1/
16279t more2
16280s/["\\]/\\&/g; s/^/"/; s/$/"/
16281p
16282b
16283:more2
16284s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16285p
16286g
16287s/.\{148\}//
16288t delim
16289' <conf$$subs.awk | sed '
16290/^[^""]/{
16291 N
16292 s/\n//
16293}
16294' >>$CONFIG_STATUS || ac_write_fail=1
16295rm -f conf$$subs.awk
16296cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16297_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016298cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016299 for (key in S) S_is_set[key] = 1
16300 FS = ""
16301
16302}
16303{
16304 line = $ 0
16305 nfields = split(line, field, "@")
16306 substed = 0
16307 len = length(field[1])
16308 for (i = 2; i < nfields; i++) {
16309 key = field[i]
16310 keylen = length(key)
16311 if (S_is_set[key]) {
16312 value = S[key]
16313 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16314 len += length(value) + length(field[++i])
16315 substed = 1
16316 } else
16317 len += 1 + keylen
16318 }
16319
16320 print line
16321}
16322
16323_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016325cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16326if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16327 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16328else
16329 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016330fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016331 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016332_ACEOF
16333
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016334# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16335# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016336# trailing colons and then remove the whole line if VPATH becomes empty
16337# (actually we leave an empty line to preserve line numbers).
16338if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016339 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16340h
16341s///
16342s/^/:/
16343s/[ ]*$/:/
16344s/:\$(srcdir):/:/g
16345s/:\${srcdir}:/:/g
16346s/:@srcdir@:/:/g
16347s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016348s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016349x
16350s/\(=[ ]*\).*/\1/
16351G
16352s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016353s/^[^=]*=[ ]*$//
16354}'
16355fi
16356
Matthias Kloseb9621712010-04-24 17:59:49 +000016357cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016358fi # test -n "$CONFIG_FILES"
16359
Matthias Kloseb9621712010-04-24 17:59:49 +000016360# Set up the scripts for CONFIG_HEADERS section.
16361# No need to generate them if there are no CONFIG_HEADERS.
16362# This happens for instance with `./config.status Makefile'.
16363if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016364cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016365BEGIN {
16366_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016367
Matthias Kloseb9621712010-04-24 17:59:49 +000016368# Transform confdefs.h into an awk script `defines.awk', embedded as
16369# here-document in config.status, that substitutes the proper values into
16370# config.h.in to produce config.h.
16371
16372# Create a delimiter string that does not exist in confdefs.h, to ease
16373# handling of long lines.
16374ac_delim='%!_!# '
16375for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016376 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16377 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016378 break
16379 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016380 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016381 else
16382 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16383 fi
16384done
16385
16386# For the awk script, D is an array of macro values keyed by name,
16387# likewise P contains macro parameters if any. Preserve backslash
16388# newline sequences.
16389
16390ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16391sed -n '
16392s/.\{148\}/&'"$ac_delim"'/g
16393t rset
16394:rset
16395s/^[ ]*#[ ]*define[ ][ ]*/ /
16396t def
16397d
16398:def
16399s/\\$//
16400t bsnl
16401s/["\\]/\\&/g
16402s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16403D["\1"]=" \3"/p
16404s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16405d
16406:bsnl
16407s/["\\]/\\&/g
16408s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16409D["\1"]=" \3\\\\\\n"\\/p
16410t cont
16411s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16412t cont
16413d
16414:cont
16415n
16416s/.\{148\}/&'"$ac_delim"'/g
16417t clear
16418:clear
16419s/\\$//
16420t bsnlc
16421s/["\\]/\\&/g; s/^/"/; s/$/"/p
16422d
16423:bsnlc
16424s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16425b cont
16426' <confdefs.h | sed '
16427s/'"$ac_delim"'/"\\\
16428"/g' >>$CONFIG_STATUS || ac_write_fail=1
16429
16430cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16431 for (key in D) D_is_set[key] = 1
16432 FS = ""
16433}
16434/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16435 line = \$ 0
16436 split(line, arg, " ")
16437 if (arg[1] == "#") {
16438 defundef = arg[2]
16439 mac1 = arg[3]
16440 } else {
16441 defundef = substr(arg[1], 2)
16442 mac1 = arg[2]
16443 }
16444 split(mac1, mac2, "(") #)
16445 macro = mac2[1]
16446 prefix = substr(line, 1, index(line, defundef) - 1)
16447 if (D_is_set[macro]) {
16448 # Preserve the white space surrounding the "#".
16449 print prefix "define", macro P[macro] D[macro]
16450 next
16451 } else {
16452 # Replace #undef with comments. This is necessary, for example,
16453 # in the case of _POSIX_SOURCE, which is predefined and required
16454 # on some systems where configure will not decide to define it.
16455 if (defundef == "undef") {
16456 print "/*", prefix defundef, macro, "*/"
16457 next
16458 }
16459 }
16460}
16461{ print }
16462_ACAWK
16463_ACEOF
16464cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016465 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016466fi # test -n "$CONFIG_HEADERS"
16467
16468
16469eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16470shift
16471for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016472do
16473 case $ac_tag in
16474 :[FHLC]) ac_mode=$ac_tag; continue;;
16475 esac
16476 case $ac_mode$ac_tag in
16477 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016478 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016479 :[FH]-) ac_tag=-:-;;
16480 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16481 esac
16482 ac_save_IFS=$IFS
16483 IFS=:
16484 set x $ac_tag
16485 IFS=$ac_save_IFS
16486 shift
16487 ac_file=$1
16488 shift
16489
16490 case $ac_mode in
16491 :L) ac_source=$1;;
16492 :[FH])
16493 ac_file_inputs=
16494 for ac_f
16495 do
16496 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016497 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016498 *) # Look for the file first in the build tree, then in the source tree
16499 # (if the path is not absolute). The absolute path cannot be DOS-style,
16500 # because $ac_f cannot contain `:'.
16501 test -f "$ac_f" ||
16502 case $ac_f in
16503 [\\/$]*) false;;
16504 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16505 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016506 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016507 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016508 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16509 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016510 done
16511
16512 # Let's still pretend it is `configure' which instantiates (i.e., don't
16513 # use $as_me), people would be surprised to read:
16514 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016515 configure_input='Generated from '`
16516 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16517 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518 if test x"$ac_file" != x-; then
16519 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016520 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16521$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016523 # Neutralize special characters interpreted by sed in replacement strings.
16524 case $configure_input in #(
16525 *\&* | *\|* | *\\* )
16526 ac_sed_conf_input=`$as_echo "$configure_input" |
16527 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16528 *) ac_sed_conf_input=$configure_input;;
16529 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016530
16531 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016532 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16533 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534 esac
16535 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016536 esac
16537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016538 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016539$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016540 X"$ac_file" : 'X\(//\)[^/]' \| \
16541 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016543$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16545 s//\1/
16546 q
16547 }
16548 /^X\(\/\/\)[^/].*/{
16549 s//\1/
16550 q
16551 }
16552 /^X\(\/\/\)$/{
16553 s//\1/
16554 q
16555 }
16556 /^X\(\/\).*/{
16557 s//\1/
16558 q
16559 }
16560 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016561 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016562 ac_builddir=.
16563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564case "$ac_dir" in
16565.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16566*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016567 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016569 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016570 case $ac_top_builddir_sub in
16571 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16572 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16573 esac ;;
16574esac
16575ac_abs_top_builddir=$ac_pwd
16576ac_abs_builddir=$ac_pwd$ac_dir_suffix
16577# for backward compatibility:
16578ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016579
16580case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016581 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016582 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016583 ac_top_srcdir=$ac_top_builddir_sub
16584 ac_abs_top_srcdir=$ac_pwd ;;
16585 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016586 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016587 ac_top_srcdir=$srcdir
16588 ac_abs_top_srcdir=$srcdir ;;
16589 *) # Relative name.
16590 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16591 ac_top_srcdir=$ac_top_build_prefix$srcdir
16592 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016593esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016594ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016595
Martin v. Löwis11437992002-04-12 09:54:03 +000016596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016597 case $ac_mode in
16598 :F)
16599 #
16600 # CONFIG_FILE
16601 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016602
16603 case $INSTALL in
16604 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016605 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016606 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016607 ac_MKDIR_P=$MKDIR_P
16608 case $MKDIR_P in
16609 [\\/$]* | ?:[\\/]* ) ;;
16610 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16611 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016612_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613
Matthias Kloseb9621712010-04-24 17:59:49 +000016614cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016615# If the template does not know about datarootdir, expand it.
16616# FIXME: This hack should be removed a few years after 2.60.
16617ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016618ac_sed_dataroot='
16619/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016620 p
16621 q
16622}
16623/@datadir@/p
16624/@docdir@/p
16625/@infodir@/p
16626/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016627/@mandir@/p'
16628case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016629*datarootdir*) ac_datarootdir_seen=yes;;
16630*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016631 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16632$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016634cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016635 ac_datarootdir_hack='
16636 s&@datadir@&$datadir&g
16637 s&@docdir@&$docdir&g
16638 s&@infodir@&$infodir&g
16639 s&@localedir@&$localedir&g
16640 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016641 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016642esac
16643_ACEOF
16644
16645# Neutralize VPATH when `$srcdir' = `.'.
16646# Shell code in configure.ac might set extrasub.
16647# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016648cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16649ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016650$extrasub
16651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016652cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016653:t
16654/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016655s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016656s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016657s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016658s&@srcdir@&$ac_srcdir&;t t
16659s&@abs_srcdir@&$ac_abs_srcdir&;t t
16660s&@top_srcdir@&$ac_top_srcdir&;t t
16661s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16662s&@builddir@&$ac_builddir&;t t
16663s&@abs_builddir@&$ac_abs_builddir&;t t
16664s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16665s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016666s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016667$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016668"
Victor Stinnere0be4232011-10-25 13:06:09 +020016669eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16670 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016672test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016673 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16674 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16675 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016677which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016678$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016679which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016680
Victor Stinnere0be4232011-10-25 13:06:09 +020016681 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016682 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016683 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16684 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016685 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016686 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016687 ;;
16688 :H)
16689 #
16690 # CONFIG_HEADER
16691 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016692 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016693 {
16694 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016695 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16696 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016697 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016698 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016699 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16700$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016701 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016702 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016703 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016704 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016705 fi
16706 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016707 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016708 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016709 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016710 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016713
16714 esac
16715
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016716
16717 case $ac_file$ac_mode in
16718 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16719
16720 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721done # for ac_tag
16722
Guido van Rossum627b2d71993-12-24 10:39:16 +000016723
Matthias Kloseb9621712010-04-24 17:59:49 +000016724as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016725_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016726ac_clean_files=$ac_clean_files_save
16727
Matthias Kloseb9621712010-04-24 17:59:49 +000016728test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016729 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016730
Martin v. Löwis11437992002-04-12 09:54:03 +000016731
16732# configure is writing to config.log, and then calls config.status.
16733# config.status does its own redirection, appending to config.log.
16734# Unfortunately, on DOS this fails, as config.log is still kept open
16735# by configure, so config.status won't be able to write to it; its
16736# output is simply discarded. So we exec the FD to /dev/null,
16737# effectively closing config.log, so it can be properly (re)opened and
16738# appended to by config.status. When coming back to configure, we
16739# need to make the FD available again.
16740if test "$no_create" != yes; then
16741 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016742 ac_config_status_args=
16743 test "$silent" = yes &&
16744 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016745 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016746 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016747 exec 5>>config.log
16748 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16749 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016750 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016751fi
16752if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16754$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016755fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016756
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016757
Christian Heimes75ed8902013-11-20 01:11:18 +010016758echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016759if test ! -f Modules/Setup
16760then
16761 cp $srcdir/Modules/Setup.dist Modules/Setup
16762fi
16763
Christian Heimes75ed8902013-11-20 01:11:18 +010016764echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016765if test ! -f Modules/Setup.local
16766then
16767 echo "# Edit this file for local setup changes" >Modules/Setup.local
16768fi
16769
Christian Heimes75ed8902013-11-20 01:11:18 +010016770echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016771$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16772 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016773 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016774mv config.c Modules