blob: f7e49b824a14d4875269eefbad041016e26cbea0 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose0f4c16e2012-03-14 23:10:15 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004# Generated by GNU Autoconf 2.69 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027else
Matthias Kloseb9621712010-04-24 17:59:49 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000035
36
Matthias Kloseb9621712010-04-24 17:59:49 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080093as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000094case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000115fi
116
Matthias Kloseb9621712010-04-24 17:59:49 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000134
Matthias Kloseb9621712010-04-24 17:59:49 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
271$0: http://bugs.python.org/ about your system, including
272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000360
361
362} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000411# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000412as_fn_error ()
413{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000418 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Kloseb9621712010-04-24 17:59:49 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000446$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Kloseb9621712010-04-24 17:59:49 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467
468
Matthias Kloseb9621712010-04-24 17:59:49 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000489 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000490 { $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 +0000491
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000505case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000506-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000507 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000522 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000523fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000530 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000532 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000536 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_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 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Kloseb9621712010-04-24 17:59:49 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000584PACKAGE_VERSION='3.2'
585PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000586PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000618#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Kloseb9621712010-04-24 17:59:49 +0000626ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000629SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000630LIBC
631LIBM
632HAVE_GETHOSTBYNAME
633HAVE_GETHOSTBYNAME_R
634HAVE_GETHOSTBYNAME_R_3_ARG
635HAVE_GETHOSTBYNAME_R_5_ARG
636HAVE_GETHOSTBYNAME_R_6_ARG
637LIBOBJS
638TRUE
639MACHDEP_OBJS
640DYNLOADFILE
641DLINCLDIR
642THREADOBJ
643LDLAST
644USE_THREAD_MODULE
645SIGNAL_OBJS
646USE_SIGNAL_MODULE
647LIBFFI_INCLUDEDIR
648PKG_CONFIG
649SHLIBS
650CFLAGSFORSHARED
651LINKFORSHARED
652CCSHARED
653BLDSHARED
654LDCXXSHARED
655LDSHARED
656SO
657LIBTOOL_CRUFT
658OTHER_LIBTOOL_OPT
659UNIVERSAL_ARCH_FLAGS
660BASECFLAGS
661OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000662ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000663LN
Trent Nelsona45afca2012-08-30 14:32:02 +0000664MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000665INSTALL_DATA
666INSTALL_SCRIPT
667INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200668PYTHON
669ASDLGEN
Georg Brandl1ca2e792011-03-05 20:51:24 +0100670HAS_HG
671HGBRANCH
672HGTAG
673HGVERSION
Trent Nelson9effe692012-10-16 08:41:32 -0400674BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000675SVNVERSION
676ARFLAGS
677AR
678RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000679USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000680GNULD
681LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000682LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000683RUNSHARED
684INSTSONAME
685LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000686PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000687BLDLIBRARY
688DLLLIBRARY
689LDLIBRARY
690LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100691MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000692BUILDEXEEXT
693EGREP
694GREP
695CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200696NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000697MAINCC
698CXX
699OBJEXT
700EXEEXT
701ac_ct_CC
702CPPFLAGS
703LDFLAGS
704CFLAGS
705CC
706EXPORT_MACOSX_DEPLOYMENT_TARGET
707CONFIGURE_MACOSX_DEPLOYMENT_TARGET
708SGI_ABI
709MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000710FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000711FRAMEWORKUNIXTOOLSPREFIX
712FRAMEWORKALTINSTALLLAST
713FRAMEWORKALTINSTALLFIRST
714FRAMEWORKINSTALLLAST
715FRAMEWORKINSTALLFIRST
716PYTHONFRAMEWORKINSTALLDIR
717PYTHONFRAMEWORKPREFIX
718PYTHONFRAMEWORKDIR
719PYTHONFRAMEWORKIDENTIFIER
720PYTHONFRAMEWORK
721LIPO_32BIT_FLAGS
722ARCH_RUN_32BIT
723UNIVERSALSDK
724CONFIG_ARGS
725SOVERSION
726VERSION
727target_alias
728host_alias
729build_alias
730LIBS
731ECHO_T
732ECHO_N
733ECHO_C
734DEFS
735mandir
736localedir
737libdir
738psdir
739pdfdir
740dvidir
741htmldir
742infodir
743docdir
744oldincludedir
745includedir
746localstatedir
747sharedstatedir
748sysconfdir
749datadir
750datarootdir
751libexecdir
752sbindir
753bindir
754program_transform_name
755prefix
756exec_prefix
757PACKAGE_URL
758PACKAGE_BUGREPORT
759PACKAGE_STRING
760PACKAGE_VERSION
761PACKAGE_TARNAME
762PACKAGE_NAME
763PATH_SEPARATOR
764SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000765ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000766ac_user_opts='
767enable_option_checking
768enable_universalsdk
769with_universal_archs
770with_framework_name
771enable_framework
772with_gcc
773with_cxx_main
774with_suffix
775enable_shared
776enable_profiling
777with_pydebug
778with_libs
779with_system_expat
780with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000781enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000782with_dbmliborder
783with_signal_module
784with_dec_threads
785with_threads
786with_thread
787enable_ipv6
788with_doc_strings
789with_tsc
790with_pymalloc
791with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000792with_fpectl
793with_libm
794with_libc
795enable_big_digits
796with_wide_unicode
797with_computed_gotos
798'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799 ac_precious_vars='build_alias
800host_alias
801target_alias
802CC
803CFLAGS
804LDFLAGS
805LIBS
806CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000807CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000808
Guido van Rossum627b2d71993-12-24 10:39:16 +0000809
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000811ac_init_help=
812ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000813ac_unrecognized_opts=
814ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815# The variables have the same names as the options, with
816# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000817cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000820no_recursion=
821prefix=NONE
822program_prefix=NONE
823program_suffix=NONE
824program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000826site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000829x_includes=NONE
830x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000831
832# Installation directory options.
833# These are left unexpanded so users can "make install exec_prefix=/foo"
834# and all the variables that are supposed to be based on exec_prefix
835# by default will actually change.
836# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838bindir='${exec_prefix}/bin'
839sbindir='${exec_prefix}/sbin'
840libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841datarootdir='${prefix}/share'
842datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000843sysconfdir='${prefix}/etc'
844sharedstatedir='${prefix}/com'
845localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846includedir='${prefix}/include'
847oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
849infodir='${datarootdir}/info'
850htmldir='${docdir}'
851dvidir='${docdir}'
852pdfdir='${docdir}'
853psdir='${docdir}'
854libdir='${exec_prefix}/lib'
855localedir='${datarootdir}/locale'
856mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862 # If the previous option needs an argument, assign it.
863 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865 ac_prev=
866 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000867 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000870 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
871 *=) ac_optarg= ;;
872 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000873 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875 # Accept the important Cygnus configure options, so we can diagnose typos.
876
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877 case $ac_dashdash$ac_option in
878 --)
879 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881 -bindir | --bindir | --bindi | --bind | --bin | --bi)
882 ac_prev=bindir ;;
883 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885
886 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000889 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000891 -cache-file | --cache-file | --cache-fil | --cache-fi \
892 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
893 ac_prev=cache_file ;;
894 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
895 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 cache_file=$ac_optarg ;;
897
898 --config-cache | -C)
899 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000905
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
907 | --dataroo | --dataro | --datar)
908 ac_prev=datarootdir ;;
909 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
910 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
911 datarootdir=$ac_optarg ;;
912
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000914 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000916 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000917 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000918 ac_useropt_orig=$ac_useropt
919 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
920 case $ac_user_opts in
921 *"
922"enable_$ac_useropt"
923"*) ;;
924 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
925 ac_unrecognized_sep=', ';;
926 esac
927 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928
929 -docdir | --docdir | --docdi | --doc | --do)
930 ac_prev=docdir ;;
931 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
932 docdir=$ac_optarg ;;
933
934 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
935 ac_prev=dvidir ;;
936 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
937 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
939 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000940 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000941 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000942 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000943 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000944 ac_useropt_orig=$ac_useropt
945 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
946 case $ac_user_opts in
947 *"
948"enable_$ac_useropt"
949"*) ;;
950 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
951 ac_unrecognized_sep=', ';;
952 esac
953 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
956 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
957 | --exec | --exe | --ex)
958 ac_prev=exec_prefix ;;
959 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
960 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
961 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
964 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000965 # Obsolete; use --with-gas.
966 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 -help | --help | --hel | --he | -h)
969 ac_init_help=long ;;
970 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
971 ac_init_help=recursive ;;
972 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
973 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
981 ac_prev=htmldir ;;
982 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
983 | --ht=*)
984 htmldir=$ac_optarg ;;
985
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986 -includedir | --includedir | --includedi | --included | --include \
987 | --includ | --inclu | --incl | --inc)
988 ac_prev=includedir ;;
989 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
990 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992
993 -infodir | --infodir | --infodi | --infod | --info | --inf)
994 ac_prev=infodir ;;
995 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000996 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000997
998 -libdir | --libdir | --libdi | --libd)
999 ac_prev=libdir ;;
1000 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002
1003 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1004 | --libexe | --libex | --libe)
1005 ac_prev=libexecdir ;;
1006 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1007 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001010 -localedir | --localedir | --localedi | --localed | --locale)
1011 ac_prev=localedir ;;
1012 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1013 localedir=$ac_optarg ;;
1014
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001016 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017 ac_prev=localstatedir ;;
1018 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001019 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
1022 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1023 ac_prev=mandir ;;
1024 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001028 # Obsolete; use --without-fp.
1029 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
1031 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033 no_create=yes ;;
1034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1036 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1037 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1040 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1041 | --oldin | --oldi | --old | --ol | --o)
1042 ac_prev=oldincludedir ;;
1043 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1044 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1045 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1049 ac_prev=prefix ;;
1050 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052
1053 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1054 | --program-pre | --program-pr | --program-p)
1055 ac_prev=program_prefix ;;
1056 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1057 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1061 | --program-suf | --program-su | --program-s)
1062 ac_prev=program_suffix ;;
1063 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1064 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066
1067 -program-transform-name | --program-transform-name \
1068 | --program-transform-nam | --program-transform-na \
1069 | --program-transform-n | --program-transform- \
1070 | --program-transform | --program-transfor \
1071 | --program-transfo | --program-transf \
1072 | --program-trans | --program-tran \
1073 | --progr-tra | --program-tr | --program-t)
1074 ac_prev=program_transform_name ;;
1075 -program-transform-name=* | --program-transform-name=* \
1076 | --program-transform-nam=* | --program-transform-na=* \
1077 | --program-transform-n=* | --program-transform-=* \
1078 | --program-transform=* | --program-transfor=* \
1079 | --program-transfo=* | --program-transf=* \
1080 | --program-trans=* | --program-tran=* \
1081 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001084 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1085 ac_prev=pdfdir ;;
1086 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1087 pdfdir=$ac_optarg ;;
1088
1089 -psdir | --psdir | --psdi | --psd | --ps)
1090 ac_prev=psdir ;;
1091 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1092 psdir=$ac_optarg ;;
1093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1095 | -silent | --silent | --silen | --sile | --sil)
1096 silent=yes ;;
1097
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1099 ac_prev=sbindir ;;
1100 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1101 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001103
1104 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1105 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1106 | --sharedst | --shareds | --shared | --share | --shar \
1107 | --sha | --sh)
1108 ac_prev=sharedstatedir ;;
1109 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1110 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1111 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1112 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001114
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001115 -site | --site | --sit)
1116 ac_prev=site ;;
1117 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1121 ac_prev=srcdir ;;
1122 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001125 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1126 | --syscon | --sysco | --sysc | --sys | --sy)
1127 ac_prev=sysconfdir ;;
1128 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1129 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001131
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
1137 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1138 verbose=yes ;;
1139
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 -version | --version | --versio | --versi | --vers | -V)
1141 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142
1143 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001144 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001145 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001146 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001147 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001148 ac_useropt_orig=$ac_useropt
1149 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1150 case $ac_user_opts in
1151 *"
1152"with_$ac_useropt"
1153"*) ;;
1154 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1155 ac_unrecognized_sep=', ';;
1156 esac
1157 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
1159 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001160 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001161 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001162 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001163 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001164 ac_useropt_orig=$ac_useropt
1165 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1166 case $ac_user_opts in
1167 *"
1168"with_$ac_useropt"
1169"*) ;;
1170 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1171 ac_unrecognized_sep=', ';;
1172 esac
1173 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175 --x)
1176 # Obsolete; use --with-x.
1177 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
1179 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1180 | --x-incl | --x-inc | --x-in | --x-i)
1181 ac_prev=x_includes ;;
1182 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1183 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
1186 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1187 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1188 ac_prev=x_libraries ;;
1189 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1190 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001193 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1194Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 ;;
1196
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 *=*)
1198 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1199 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 case $ac_envvar in #(
1201 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001202 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001204 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 export $ac_envvar ;;
1206
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001207 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Gregory P. Smith69140482012-01-16 02:05:55 -08001212 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213 ;;
1214
1215 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216done
1217
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001220 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221fi
1222
Matthias Kloseb9621712010-04-24 17:59:49 +00001223if test -n "$ac_unrecognized_opts"; then
1224 case $enable_option_checking in
1225 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001226 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1228 esac
1229fi
1230
1231# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001232for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1233 datadir sysconfdir sharedstatedir localstatedir includedir \
1234 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1235 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001238 # Remove trailing slashes.
1239 case $ac_val in
1240 */ )
1241 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1242 eval $ac_var=\$ac_val;;
1243 esac
1244 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246 [\\/$]* | ?:[\\/]* ) continue;;
1247 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001249 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001250done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001251
Martin v. Löwis11437992002-04-12 09:54:03 +00001252# There might be people who depend on the old broken behavior: `$host'
1253# used to hold the argument of --host etc.
1254# FIXME: To remove some day.
1255build=$build_alias
1256host=$host_alias
1257target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258
Martin v. Löwis11437992002-04-12 09:54:03 +00001259# FIXME: To remove some day.
1260if test "x$host_alias" != x; then
1261 if test "x$build_alias" = x; then
1262 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 elif test "x$build_alias" != "x$host_alias"; then
1264 cross_compiling=yes
1265 fi
1266fi
1267
1268ac_tool_prefix=
1269test -n "$host_alias" && ac_tool_prefix=$host_alias-
1270
1271test "$silent" = yes && exec 6>/dev/null
1272
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274ac_pwd=`pwd` && test -n "$ac_pwd" &&
1275ac_ls_di=`ls -di .` &&
1276ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001277 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001279 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001280
1281
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282# Find the source files, if location was not specified.
1283if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001286 ac_confdir=`$as_dirname -- "$as_myself" ||
1287$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1288 X"$as_myself" : 'X\(//\)[^/]' \| \
1289 X"$as_myself" : 'X\(//\)$' \| \
1290 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1291$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1293 s//\1/
1294 q
1295 }
1296 /^X\(\/\/\)[^/].*/{
1297 s//\1/
1298 q
1299 }
1300 /^X\(\/\/\)$/{
1301 s//\1/
1302 q
1303 }
1304 /^X\(\/\).*/{
1305 s//\1/
1306 q
1307 }
1308 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311 srcdir=..
1312 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313else
1314 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001316if test ! -r "$srcdir/$ac_unique_file"; then
1317 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001318 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001320ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1321ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001322 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323 pwd)`
1324# When building in place, set srcdir=.
1325if test "$ac_abs_confdir" = "$ac_pwd"; then
1326 srcdir=.
1327fi
1328# Remove unnecessary trailing slashes from srcdir.
1329# Double slashes in file names in object file debugging info
1330# mess up M-x gdb in Emacs.
1331case $srcdir in
1332*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1333esac
1334for ac_var in $ac_precious_vars; do
1335 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1336 eval ac_env_${ac_var}_value=\$${ac_var}
1337 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1338 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1339done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001340
Martin v. Löwis11437992002-04-12 09:54:03 +00001341#
1342# Report the --help message.
1343#
1344if test "$ac_init_help" = "long"; then
1345 # Omit some internal or obsolete options to make the list less imposing.
1346 # This message is too long to be a string in the A/UX 3.1 sh.
1347 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001348\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001349
1350Usage: $0 [OPTION]... [VAR=VALUE]...
1351
1352To assign environment variables (e.g., CC, CFLAGS...), specify them as
1353VAR=VALUE. See below for descriptions of some of the useful variables.
1354
1355Defaults for the options are specified in brackets.
1356
1357Configuration:
1358 -h, --help display this help and exit
1359 --help=short display options specific to this package
1360 --help=recursive display the short help of all the included packages
1361 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001362 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001363 --cache-file=FILE cache test results in FILE [disabled]
1364 -C, --config-cache alias for \`--cache-file=config.cache'
1365 -n, --no-create do not create output files
1366 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1367
Martin v. Löwis11437992002-04-12 09:54:03 +00001368Installation directories:
1369 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001370 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001371 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001372 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001373
1374By default, \`make install' will install all the files in
1375\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1376an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1377for instance \`--prefix=\$HOME'.
1378
1379For better control, use the options below.
1380
1381Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001382 --bindir=DIR user executables [EPREFIX/bin]
1383 --sbindir=DIR system admin executables [EPREFIX/sbin]
1384 --libexecdir=DIR program executables [EPREFIX/libexec]
1385 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1386 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1387 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1388 --libdir=DIR object code libraries [EPREFIX/lib]
1389 --includedir=DIR C header files [PREFIX/include]
1390 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1391 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1392 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1393 --infodir=DIR info documentation [DATAROOTDIR/info]
1394 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1395 --mandir=DIR man documentation [DATAROOTDIR/man]
1396 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1397 --htmldir=DIR html documentation [DOCDIR]
1398 --dvidir=DIR dvi documentation [DOCDIR]
1399 --pdfdir=DIR pdf documentation [DOCDIR]
1400 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001401_ACEOF
1402
1403 cat <<\_ACEOF
1404_ACEOF
1405fi
1406
1407if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001408 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001409 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001410 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001411 cat <<\_ACEOF
1412
1413Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001414 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1416 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001417 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001418 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --enable-framework[=INSTALLDIR]
1420 Build (MacOSX|Darwin) framework
1421 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001422 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001423 --enable-loadable-sqlite-extensions
1424 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --enable-ipv6 Enable ipv6 (with ipv4) support
1426 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001427 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
1430Optional Packages:
1431 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1432 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001433 --with-universal-archs=ARCH
1434 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001435 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001436 --with-framework-name=FRAMEWORK
1437 specify an alternate name of the framework built
1438 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001440 --with-cxx-main=<compiler>
1441 compile main() and link python executable with C++
1442 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001443 --with-suffix=.exe set executable suffix
1444 --with-pydebug build with Py_DEBUG defined
1445 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001446 --with-system-expat build pyexpat module using an installed expat
1447 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001448 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001449 --with-dbmliborder=db1:db2:...
1450 order to check db backends for dbm. Valid value is a
1451 colon separated string with the backend names
1452 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --with-signal-module disable/enable signal module
1454 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1455 --with(out)-threads[=DIRECTORY]
1456 disable/enable thread support
1457 --with(out)-thread[=DIRECTORY]
1458 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001459 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001460 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001462 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001463 --with-fpectl enable SIGFPE catching
1464 --with-libm=STRING math library
1465 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001466 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001467 --with(out)-computed-gotos
1468 Use computed gotos in evaluation loop (enabled by
1469 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001470
1471Some influential environment variables:
1472 CC C compiler command
1473 CFLAGS C compiler flags
1474 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1475 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 CPP C preprocessor
1480
1481Use these variables to override the choices made by `configure' or to help
1482it to find libraries and programs with nonstandard names/locations.
1483
Georg Brandle2e15612009-05-20 18:25:10 +00001484Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001485_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001487fi
1488
1489if test "$ac_init_help" = "recursive"; then
1490 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001492 test -d "$ac_dir" ||
1493 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1494 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001495 ac_builddir=.
1496
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001497case "$ac_dir" in
1498.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1499*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001500 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001502 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001503 case $ac_top_builddir_sub in
1504 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1505 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1506 esac ;;
1507esac
1508ac_abs_top_builddir=$ac_pwd
1509ac_abs_builddir=$ac_pwd$ac_dir_suffix
1510# for backward compatibility:
1511ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001512
1513case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516 ac_top_srcdir=$ac_top_builddir_sub
1517 ac_abs_top_srcdir=$ac_pwd ;;
1518 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520 ac_top_srcdir=$srcdir
1521 ac_abs_top_srcdir=$srcdir ;;
1522 *) # Relative name.
1523 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1524 ac_top_srcdir=$ac_top_build_prefix$srcdir
1525 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001526esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001527ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 cd "$ac_dir" || { ac_status=$?; continue; }
1530 # Check for guested configure.
1531 if test -f "$ac_srcdir/configure.gnu"; then
1532 echo &&
1533 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1534 elif test -f "$ac_srcdir/configure"; then
1535 echo &&
1536 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001537 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001538 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001539 fi || ac_status=$?
1540 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001541 done
1542fi
1543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001544test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001545if $ac_init_version; then
1546 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001547python configure 3.2
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001548generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001550Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001551This configure script is free software; the Free Software Foundation
1552gives unlimited permission to copy, distribute and modify it.
1553_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001556
1557## ------------------------ ##
1558## Autoconf initialization. ##
1559## ------------------------ ##
1560
1561# ac_fn_c_try_compile LINENO
1562# --------------------------
1563# Try to compile conftest.$ac_ext, and return whether this succeeded.
1564ac_fn_c_try_compile ()
1565{
1566 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1567 rm -f conftest.$ac_objext
1568 if { { ac_try="$ac_compile"
1569case "(($ac_try" in
1570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1571 *) ac_try_echo=$ac_try;;
1572esac
1573eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1574$as_echo "$ac_try_echo"; } >&5
1575 (eval "$ac_compile") 2>conftest.err
1576 ac_status=$?
1577 if test -s conftest.err; then
1578 grep -v '^ *+' conftest.err >conftest.er1
1579 cat conftest.er1 >&5
1580 mv -f conftest.er1 conftest.err
1581 fi
1582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1583 test $ac_status = 0; } && {
1584 test -z "$ac_c_werror_flag" ||
1585 test ! -s conftest.err
1586 } && test -s conftest.$ac_objext; then :
1587 ac_retval=0
1588else
1589 $as_echo "$as_me: failed program was:" >&5
1590sed 's/^/| /' conftest.$ac_ext >&5
1591
1592 ac_retval=1
1593fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001594 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001595 as_fn_set_status $ac_retval
1596
1597} # ac_fn_c_try_compile
1598
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001599# ac_fn_c_try_link LINENO
1600# -----------------------
1601# Try to link conftest.$ac_ext, and return whether this succeeded.
1602ac_fn_c_try_link ()
1603{
1604 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1605 rm -f conftest.$ac_objext conftest$ac_exeext
1606 if { { ac_try="$ac_link"
1607case "(($ac_try" in
1608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1609 *) ac_try_echo=$ac_try;;
1610esac
1611eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1612$as_echo "$ac_try_echo"; } >&5
1613 (eval "$ac_link") 2>conftest.err
1614 ac_status=$?
1615 if test -s conftest.err; then
1616 grep -v '^ *+' conftest.err >conftest.er1
1617 cat conftest.er1 >&5
1618 mv -f conftest.er1 conftest.err
1619 fi
1620 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1621 test $ac_status = 0; } && {
1622 test -z "$ac_c_werror_flag" ||
1623 test ! -s conftest.err
1624 } && test -s conftest$ac_exeext && {
1625 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001626 test -x conftest$ac_exeext
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001627 }; then :
1628 ac_retval=0
1629else
1630 $as_echo "$as_me: failed program was:" >&5
1631sed 's/^/| /' conftest.$ac_ext >&5
1632
1633 ac_retval=1
1634fi
1635 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1636 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1637 # interfere with the next link command; also delete a directory that is
1638 # left behind by Apple's compiler. We do this before executing the actions.
1639 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001640 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001641 as_fn_set_status $ac_retval
1642
1643} # ac_fn_c_try_link
1644
Matthias Kloseb9621712010-04-24 17:59:49 +00001645# ac_fn_c_try_cpp LINENO
1646# ----------------------
1647# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1648ac_fn_c_try_cpp ()
1649{
1650 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1651 if { { ac_try="$ac_cpp conftest.$ac_ext"
1652case "(($ac_try" in
1653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1654 *) ac_try_echo=$ac_try;;
1655esac
1656eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1657$as_echo "$ac_try_echo"; } >&5
1658 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1659 ac_status=$?
1660 if test -s conftest.err; then
1661 grep -v '^ *+' conftest.err >conftest.er1
1662 cat conftest.er1 >&5
1663 mv -f conftest.er1 conftest.err
1664 fi
1665 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001666 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001667 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1668 test ! -s conftest.err
1669 }; then :
1670 ac_retval=0
1671else
1672 $as_echo "$as_me: failed program was:" >&5
1673sed 's/^/| /' conftest.$ac_ext >&5
1674
1675 ac_retval=1
1676fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001677 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001678 as_fn_set_status $ac_retval
1679
1680} # ac_fn_c_try_cpp
1681
1682# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1683# -------------------------------------------------------
1684# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1685# the include files in INCLUDES and setting the cache variable VAR
1686# accordingly.
1687ac_fn_c_check_header_mongrel ()
1688{
1689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Gregory P. Smith69140482012-01-16 02:05:55 -08001690 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1692$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001693if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001694 $as_echo_n "(cached) " >&6
1695fi
1696eval ac_res=\$$3
1697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1698$as_echo "$ac_res" >&6; }
1699else
1700 # Is the header compilable?
1701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1702$as_echo_n "checking $2 usability... " >&6; }
1703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1704/* end confdefs.h. */
1705$4
1706#include <$2>
1707_ACEOF
1708if ac_fn_c_try_compile "$LINENO"; then :
1709 ac_header_compiler=yes
1710else
1711 ac_header_compiler=no
1712fi
1713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1715$as_echo "$ac_header_compiler" >&6; }
1716
1717# Is the header present?
1718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1719$as_echo_n "checking $2 presence... " >&6; }
1720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1721/* end confdefs.h. */
1722#include <$2>
1723_ACEOF
1724if ac_fn_c_try_cpp "$LINENO"; then :
1725 ac_header_preproc=yes
1726else
1727 ac_header_preproc=no
1728fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001729rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1731$as_echo "$ac_header_preproc" >&6; }
1732
1733# So? What about this header?
1734case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1735 yes:no: )
1736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1737$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1738 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1739$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1740 ;;
1741 no:yes:* )
1742 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1743$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1745$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1747$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1748 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1749$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1751$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001752( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001753## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001754## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 ) | sed "s/^/$as_me: WARNING: /" >&2
1756 ;;
1757esac
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1759$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001760if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001761 $as_echo_n "(cached) " >&6
1762else
1763 eval "$3=\$ac_header_compiler"
1764fi
1765eval ac_res=\$$3
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1767$as_echo "$ac_res" >&6; }
1768fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001769 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001770
1771} # ac_fn_c_check_header_mongrel
1772
1773# ac_fn_c_try_run LINENO
1774# ----------------------
1775# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1776# that executables *can* be run.
1777ac_fn_c_try_run ()
1778{
1779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1780 if { { ac_try="$ac_link"
1781case "(($ac_try" in
1782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1783 *) ac_try_echo=$ac_try;;
1784esac
1785eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1786$as_echo "$ac_try_echo"; } >&5
1787 (eval "$ac_link") 2>&5
1788 ac_status=$?
1789 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1790 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1791 { { case "(($ac_try" in
1792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1793 *) ac_try_echo=$ac_try;;
1794esac
1795eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1796$as_echo "$ac_try_echo"; } >&5
1797 (eval "$ac_try") 2>&5
1798 ac_status=$?
1799 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1800 test $ac_status = 0; }; }; then :
1801 ac_retval=0
1802else
1803 $as_echo "$as_me: program exited with status $ac_status" >&5
1804 $as_echo "$as_me: failed program was:" >&5
1805sed 's/^/| /' conftest.$ac_ext >&5
1806
1807 ac_retval=$ac_status
1808fi
1809 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001810 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001811 as_fn_set_status $ac_retval
1812
1813} # ac_fn_c_try_run
1814
1815# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1816# -------------------------------------------------------
1817# Tests whether HEADER exists and can be compiled using the include files in
1818# INCLUDES, setting the cache variable VAR accordingly.
1819ac_fn_c_check_header_compile ()
1820{
1821 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1823$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001824if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001825 $as_echo_n "(cached) " >&6
1826else
1827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1828/* end confdefs.h. */
1829$4
1830#include <$2>
1831_ACEOF
1832if ac_fn_c_try_compile "$LINENO"; then :
1833 eval "$3=yes"
1834else
1835 eval "$3=no"
1836fi
1837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1838fi
1839eval ac_res=\$$3
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1841$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001842 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001843
1844} # ac_fn_c_check_header_compile
1845
Matthias Kloseb9621712010-04-24 17:59:49 +00001846# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1847# -------------------------------------------
1848# Tests whether TYPE exists after having included INCLUDES, setting cache
1849# variable VAR accordingly.
1850ac_fn_c_check_type ()
1851{
1852 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001855if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001856 $as_echo_n "(cached) " >&6
1857else
1858 eval "$3=no"
1859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1860/* end confdefs.h. */
1861$4
1862int
1863main ()
1864{
1865if (sizeof ($2))
1866 return 0;
1867 ;
1868 return 0;
1869}
1870_ACEOF
1871if ac_fn_c_try_compile "$LINENO"; then :
1872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1873/* end confdefs.h. */
1874$4
1875int
1876main ()
1877{
1878if (sizeof (($2)))
1879 return 0;
1880 ;
1881 return 0;
1882}
1883_ACEOF
1884if ac_fn_c_try_compile "$LINENO"; then :
1885
1886else
1887 eval "$3=yes"
1888fi
1889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1890fi
1891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1892fi
1893eval ac_res=\$$3
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1895$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001896 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001897
1898} # ac_fn_c_check_type
1899
1900# ac_fn_c_find_uintX_t LINENO BITS VAR
1901# ------------------------------------
1902# Finds an unsigned integer type with width BITS, setting cache variable VAR
1903# accordingly.
1904ac_fn_c_find_uintX_t ()
1905{
1906 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1908$as_echo_n "checking for uint$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001909if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001910 $as_echo_n "(cached) " >&6
1911else
1912 eval "$3=no"
1913 # Order is important - never check a type that is potentially smaller
1914 # than half of the expected target width.
1915 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1916 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1918/* end confdefs.h. */
1919$ac_includes_default
1920int
1921main ()
1922{
1923static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001924test_array [0] = 0;
1925return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001926
1927 ;
1928 return 0;
1929}
1930_ACEOF
1931if ac_fn_c_try_compile "$LINENO"; then :
1932 case $ac_type in #(
1933 uint$2_t) :
1934 eval "$3=yes" ;; #(
1935 *) :
1936 eval "$3=\$ac_type" ;;
1937esac
1938fi
1939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001940 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001941
1942else
1943 break
1944fi
1945 done
1946fi
1947eval ac_res=\$$3
1948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1949$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001950 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001951
1952} # ac_fn_c_find_uintX_t
1953
1954# ac_fn_c_find_intX_t LINENO BITS VAR
1955# -----------------------------------
1956# Finds a signed integer type with width BITS, setting cache variable VAR
1957# accordingly.
1958ac_fn_c_find_intX_t ()
1959{
1960 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1962$as_echo_n "checking for int$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001963if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001964 $as_echo_n "(cached) " >&6
1965else
1966 eval "$3=no"
1967 # Order is important - never check a type that is potentially smaller
1968 # than half of the expected target width.
1969 for ac_type in int$2_t 'int' 'long int' \
1970 'long long int' 'short int' 'signed char'; do
1971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1972/* end confdefs.h. */
1973$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001974 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001975int
1976main ()
1977{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001978static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001979test_array [0] = 0;
1980return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982 ;
1983 return 0;
1984}
1985_ACEOF
1986if ac_fn_c_try_compile "$LINENO"; then :
1987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001990 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001991int
1992main ()
1993{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001994static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001995 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001996test_array [0] = 0;
1997return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001998
1999 ;
2000 return 0;
2001}
2002_ACEOF
2003if ac_fn_c_try_compile "$LINENO"; then :
2004
2005else
2006 case $ac_type in #(
2007 int$2_t) :
2008 eval "$3=yes" ;; #(
2009 *) :
2010 eval "$3=\$ac_type" ;;
2011esac
2012fi
2013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2014fi
2015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002016 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018else
2019 break
2020fi
2021 done
2022fi
2023eval ac_res=\$$3
2024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2025$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002026 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002027
2028} # ac_fn_c_find_intX_t
2029
2030# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2031# --------------------------------------------
2032# Tries to find the compile-time value of EXPR in a program that includes
2033# INCLUDES, setting VAR accordingly. Returns whether the value could be
2034# computed
2035ac_fn_c_compute_int ()
2036{
2037 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2038 if test "$cross_compiling" = yes; then
2039 # Depending upon the size, compute the lo and hi bounds.
2040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
2044main ()
2045{
2046static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002047test_array [0] = 0;
2048return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002049
2050 ;
2051 return 0;
2052}
2053_ACEOF
2054if ac_fn_c_try_compile "$LINENO"; then :
2055 ac_lo=0 ac_mid=0
2056 while :; do
2057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002064test_array [0] = 0;
2065return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_hi=$ac_mid; break
2073else
2074 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2075 if test $ac_lo -le $ac_mid; then
2076 ac_lo= ac_hi=
2077 break
2078 fi
2079 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2082 done
2083else
2084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2085/* end confdefs.h. */
2086$4
2087int
2088main ()
2089{
2090static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002091test_array [0] = 0;
2092return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002093
2094 ;
2095 return 0;
2096}
2097_ACEOF
2098if ac_fn_c_try_compile "$LINENO"; then :
2099 ac_hi=-1 ac_mid=-1
2100 while :; do
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002108test_array [0] = 0;
2109return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002110
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_lo=$ac_mid; break
2117else
2118 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2119 if test $ac_mid -le $ac_hi; then
2120 ac_lo= ac_hi=
2121 break
2122 fi
2123 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2124fi
2125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2126 done
2127else
2128 ac_lo= ac_hi=
2129fi
2130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2131fi
2132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133# Binary search between lo and hi bounds.
2134while test "x$ac_lo" != "x$ac_hi"; do
2135 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137/* end confdefs.h. */
2138$4
2139int
2140main ()
2141{
2142static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002143test_array [0] = 0;
2144return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_compile "$LINENO"; then :
2151 ac_hi=$ac_mid
2152else
2153 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2154fi
2155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2156done
2157case $ac_lo in #((
2158?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2159'') ac_retval=1 ;;
2160esac
2161 else
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163/* end confdefs.h. */
2164$4
2165static long int longval () { return $2; }
2166static unsigned long int ulongval () { return $2; }
2167#include <stdio.h>
2168#include <stdlib.h>
2169int
2170main ()
2171{
2172
2173 FILE *f = fopen ("conftest.val", "w");
2174 if (! f)
2175 return 1;
2176 if (($2) < 0)
2177 {
2178 long int i = longval ();
2179 if (i != ($2))
2180 return 1;
2181 fprintf (f, "%ld", i);
2182 }
2183 else
2184 {
2185 unsigned long int i = ulongval ();
2186 if (i != ($2))
2187 return 1;
2188 fprintf (f, "%lu", i);
2189 }
2190 /* Do not output a trailing newline, as this causes \r\n confusion
2191 on some platforms. */
2192 return ferror (f) || fclose (f) != 0;
2193
2194 ;
2195 return 0;
2196}
2197_ACEOF
2198if ac_fn_c_try_run "$LINENO"; then :
2199 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2200else
2201 ac_retval=1
2202fi
2203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2204 conftest.$ac_objext conftest.beam conftest.$ac_ext
2205rm -f conftest.val
2206
2207 fi
Gregory P. Smith69140482012-01-16 02:05:55 -08002208 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002209 as_fn_set_status $ac_retval
2210
2211} # ac_fn_c_compute_int
2212
2213# ac_fn_c_check_func LINENO FUNC VAR
2214# ----------------------------------
2215# Tests whether FUNC exists, setting the cache variable VAR accordingly
2216ac_fn_c_check_func ()
2217{
2218 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2220$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002221if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002222 $as_echo_n "(cached) " >&6
2223else
2224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2225/* end confdefs.h. */
2226/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2227 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2228#define $2 innocuous_$2
2229
2230/* System header to define __stub macros and hopefully few prototypes,
2231 which can conflict with char $2 (); below.
2232 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2233 <limits.h> exists even on freestanding compilers. */
2234
2235#ifdef __STDC__
2236# include <limits.h>
2237#else
2238# include <assert.h>
2239#endif
2240
2241#undef $2
2242
2243/* Override any GCC internal prototype to avoid an error.
2244 Use char because int might match the return type of a GCC
2245 builtin and then its argument prototype would still apply. */
2246#ifdef __cplusplus
2247extern "C"
2248#endif
2249char $2 ();
2250/* The GNU C library defines this for functions which it implements
2251 to always fail with ENOSYS. Some functions are actually named
2252 something starting with __ and the normal name is an alias. */
2253#if defined __stub_$2 || defined __stub___$2
2254choke me
2255#endif
2256
2257int
2258main ()
2259{
2260return $2 ();
2261 ;
2262 return 0;
2263}
2264_ACEOF
2265if ac_fn_c_try_link "$LINENO"; then :
2266 eval "$3=yes"
2267else
2268 eval "$3=no"
2269fi
2270rm -f core conftest.err conftest.$ac_objext \
2271 conftest$ac_exeext conftest.$ac_ext
2272fi
2273eval ac_res=\$$3
2274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2275$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002276 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002277
2278} # ac_fn_c_check_func
2279
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002280# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2281# ---------------------------------------------
2282# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2283# accordingly.
2284ac_fn_c_check_decl ()
2285{
2286 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2287 as_decl_name=`echo $2|sed 's/ *(.*//'`
2288 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2290$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2291if eval \${$3+:} false; then :
2292 $as_echo_n "(cached) " >&6
2293else
2294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h. */
2296$4
2297int
2298main ()
2299{
2300#ifndef $as_decl_name
2301#ifdef __cplusplus
2302 (void) $as_decl_use;
2303#else
2304 (void) $as_decl_name;
2305#endif
2306#endif
2307
2308 ;
2309 return 0;
2310}
2311_ACEOF
2312if ac_fn_c_try_compile "$LINENO"; then :
2313 eval "$3=yes"
2314else
2315 eval "$3=no"
2316fi
2317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318fi
2319eval ac_res=\$$3
2320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2321$as_echo "$ac_res" >&6; }
2322 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2323
2324} # ac_fn_c_check_decl
2325
Matthias Kloseb9621712010-04-24 17:59:49 +00002326# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2327# ----------------------------------------------------
2328# Tries to find if the field MEMBER exists in type AGGR, after including
2329# INCLUDES, setting cache variable VAR accordingly.
2330ac_fn_c_check_member ()
2331{
2332 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2334$as_echo_n "checking for $2.$3... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002335if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002336 $as_echo_n "(cached) " >&6
2337else
2338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2339/* end confdefs.h. */
2340$5
2341int
2342main ()
2343{
2344static $2 ac_aggr;
2345if (ac_aggr.$3)
2346return 0;
2347 ;
2348 return 0;
2349}
2350_ACEOF
2351if ac_fn_c_try_compile "$LINENO"; then :
2352 eval "$4=yes"
2353else
2354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355/* end confdefs.h. */
2356$5
2357int
2358main ()
2359{
2360static $2 ac_aggr;
2361if (sizeof ac_aggr.$3)
2362return 0;
2363 ;
2364 return 0;
2365}
2366_ACEOF
2367if ac_fn_c_try_compile "$LINENO"; then :
2368 eval "$4=yes"
2369else
2370 eval "$4=no"
2371fi
2372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2373fi
2374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2375fi
2376eval ac_res=\$$4
2377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2378$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002379 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002380
2381} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002383This file contains any messages produced by compilers while
2384running configure, to aid debugging if configure makes a mistake.
2385
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002386It was created by python $as_me 3.2, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002387generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002388
2389 $ $0 $@
2390
2391_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002393{
2394cat <<_ASUNAME
2395## --------- ##
2396## Platform. ##
2397## --------- ##
2398
2399hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2400uname -m = `(uname -m) 2>/dev/null || echo unknown`
2401uname -r = `(uname -r) 2>/dev/null || echo unknown`
2402uname -s = `(uname -s) 2>/dev/null || echo unknown`
2403uname -v = `(uname -v) 2>/dev/null || echo unknown`
2404
2405/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2406/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2407
2408/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2409/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2410/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002411/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002412/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2413/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2414/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2415
2416_ASUNAME
2417
2418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2419for as_dir in $PATH
2420do
2421 IFS=$as_save_IFS
2422 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002423 $as_echo "PATH: $as_dir"
2424 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002426
2427} >&5
2428
2429cat >&5 <<_ACEOF
2430
2431
2432## ----------- ##
2433## Core tests. ##
2434## ----------- ##
2435
2436_ACEOF
2437
2438
2439# Keep a trace of the command line.
2440# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002441# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002442# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002443# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002444ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002445ac_configure_args0=
2446ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002447ac_must_keep_next=false
2448for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002449do
Skip Montanaro6dead952003-09-25 14:50:04 +00002450 for ac_arg
2451 do
2452 case $ac_arg in
2453 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2454 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2455 | -silent | --silent | --silen | --sile | --sil)
2456 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002458 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002459 esac
2460 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002462 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002464 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002465 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002466 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002467 case $ac_arg in
2468 *=* | --config-cache | -C | -disable-* | --disable-* \
2469 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2470 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2471 | -with-* | --with-* | -without-* | --without-* | --x)
2472 case "$ac_configure_args0 " in
2473 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2474 esac
2475 ;;
2476 -* ) ac_must_keep_next=true ;;
2477 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 ;;
2481 esac
2482 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002483done
Matthias Kloseb9621712010-04-24 17:59:49 +00002484{ ac_configure_args0=; unset ac_configure_args0;}
2485{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002486
2487# When interrupted or exit'd, cleanup temporary files, and complete
2488# config.log. We remove comments because anyway the quotes in there
2489# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490# WARNING: Use '\'' to represent an apostrophe within the trap.
2491# 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 +00002492trap 'exit_status=$?
2493 # Save into config.log some information that might help in debugging.
2494 {
2495 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002496
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002497 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002498## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002499## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 echo
2501 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502(
2503 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2504 eval ac_val=\$$ac_var
2505 case $ac_val in #(
2506 *${as_nl}*)
2507 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2509$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 esac
2511 case $ac_var in #(
2512 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2514 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac ;;
2516 esac
2517 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2520 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 "s/'\''/'\''\\\\'\'''\''/g;
2523 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2524 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002525 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002527 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 esac |
2529 sort
2530)
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002532
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002533 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002534## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002535## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002536 echo
2537 for ac_var in $ac_subst_vars
2538 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 eval ac_val=\$$ac_var
2540 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002543 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002544 done | sort
2545 echo
2546
2547 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002548 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002550## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002551 echo
2552 for ac_var in $ac_subst_files
2553 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 eval ac_val=\$$ac_var
2555 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002556 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002559 done | sort
2560 echo
2561 fi
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002564 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002565## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002566## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 echo
2570 fi
2571 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002572 $as_echo "$as_me: caught signal $ac_signal"
2573 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 rm -f core *.core core.conftest.* &&
2576 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002579for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002581done
2582ac_signal=0
2583
2584# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002586
Matthias Kloseb9621712010-04-24 17:59:49 +00002587$as_echo "/* confdefs.h */" > confdefs.h
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589# Predefined preprocessor variables.
2590
2591cat >>confdefs.h <<_ACEOF
2592#define PACKAGE_NAME "$PACKAGE_NAME"
2593_ACEOF
2594
Martin v. Löwis11437992002-04-12 09:54:03 +00002595cat >>confdefs.h <<_ACEOF
2596#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2597_ACEOF
2598
Martin v. Löwis11437992002-04-12 09:54:03 +00002599cat >>confdefs.h <<_ACEOF
2600#define PACKAGE_VERSION "$PACKAGE_VERSION"
2601_ACEOF
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603cat >>confdefs.h <<_ACEOF
2604#define PACKAGE_STRING "$PACKAGE_STRING"
2605_ACEOF
2606
Martin v. Löwis11437992002-04-12 09:54:03 +00002607cat >>confdefs.h <<_ACEOF
2608#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2609_ACEOF
2610
Matthias Kloseb9621712010-04-24 17:59:49 +00002611cat >>confdefs.h <<_ACEOF
2612#define PACKAGE_URL "$PACKAGE_URL"
2613_ACEOF
2614
Martin v. Löwis11437992002-04-12 09:54:03 +00002615
2616# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002617# Prefer an explicitly selected file to automatically selected ones.
2618ac_site_file1=NONE
2619ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002621 # We do not want a PATH search for config.site.
2622 case $CONFIG_SITE in #((
2623 -*) ac_site_file1=./$CONFIG_SITE;;
2624 */*) ac_site_file1=$CONFIG_SITE;;
2625 *) ac_site_file1=./$CONFIG_SITE;;
2626 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 ac_site_file1=$prefix/share/config.site
2629 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630else
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 ac_site_file1=$ac_default_prefix/share/config.site
2632 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002634for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635do
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 test "x$ac_site_file" = xNONE && continue
2637 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2639$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002641 . "$ac_site_file" \
2642 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2644as_fn_error $? "failed to load site script $ac_site_file
Gregory P. Smith69140482012-01-16 02:05:55 -08002645See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002646 fi
2647done
2648
2649if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 # Some versions of bash will fail to source /dev/null (special files
2651 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2652 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2654$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002656 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2657 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 esac
2659 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002660else
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2662$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 >$cache_file
2664fi
2665
2666# Check that the precious variables saved in the cache have kept the same
2667# value.
2668ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002669for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2671 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2673 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 case $ac_old_set,$ac_new_set in
2675 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2677$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 +00002678 ac_cache_corrupted=: ;;
2679 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2681$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 ac_cache_corrupted=: ;;
2683 ,);;
2684 *)
2685 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002686 # differences in whitespace do not lead to failure.
2687 ac_old_val_w=`echo x $ac_old_val`
2688 ac_new_val_w=`echo x $ac_new_val`
2689 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2691$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2692 ac_cache_corrupted=:
2693 else
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2695$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2696 eval $ac_var=\$ac_old_val
2697 fi
2698 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2699$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2701$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 fi;;
2703 esac
2704 # Pass precious variables to config.status.
2705 if test "$ac_new_set" = set; then
2706 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002707 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 *) ac_arg=$ac_var=$ac_new_val ;;
2709 esac
2710 case " $ac_configure_args " in
2711 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002712 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 esac
2714 fi
2715done
2716if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002717 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2718$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2720$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002721 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002723## -------------------- ##
2724## Main body of script. ##
2725## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002726
Guido van Rossum7f43da71994-08-01 12:15:30 +00002727ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002728ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002729ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2730ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2731ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002732
Guido van Rossum627b2d71993-12-24 10:39:16 +00002733
Michael W. Hudson54241132001-12-07 15:38:26 +00002734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002735ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002736
2737
Martin v. Löwis11437992002-04-12 09:54:03 +00002738
Benjamin Petersond23f8222009-04-05 19:13:16 +00002739if test "$prefix" != "/"; then
2740 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2741fi
2742
2743
Martin v. Löwis11437992002-04-12 09:54:03 +00002744
2745
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002746# We don't use PACKAGE_ variables, and they cause conflicts
2747# with other autoconf-based packages that include Python.h
2748grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2749rm confdefs.h
2750mv confdefs.h.new confdefs.h
2751
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002752
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002753VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002754
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002755# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002756
2757SOVERSION=1.0
2758
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002759# The later defininition of _XOPEN_SOURCE disables certain features
2760# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2761
Matthias Kloseb9621712010-04-24 17:59:49 +00002762$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002763
2764
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002765# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2766# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2767# them.
2768
Matthias Kloseb9621712010-04-24 17:59:49 +00002769$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002770
2771
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002772# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2773# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2774# them.
2775
Matthias Kloseb9621712010-04-24 17:59:49 +00002776$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002777
2778
Martin v. Löwisd6320502004-08-12 13:45:08 +00002779# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2780# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2781
Matthias Kloseb9621712010-04-24 17:59:49 +00002782$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002783
2784
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002785# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2786# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2787# them.
2788
Matthias Kloseb9621712010-04-24 17:59:49 +00002789$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002790
2791
2792
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002793define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002794
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002795# Arguments passed to configure.
2796
2797CONFIG_ARGS="$ac_configure_args"
2798
Matthias Kloseb9621712010-04-24 17:59:49 +00002799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2800$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002801# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002802if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002803 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002804 case $enableval in
2805 yes)
2806 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002807 if test ! -d "${enableval}"
2808 then
2809 enableval=/
2810 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002811 ;;
2812 esac
2813 case $enableval in
2814 no)
2815 UNIVERSALSDK=
2816 enable_universalsdk=
2817 ;;
2818 *)
2819 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002820 if test ! -d "${UNIVERSALSDK}"
2821 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002822 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002823 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002824 ;;
2825 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002826
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002827
Thomas Wouters477c8d52006-05-27 19:21:47 +00002828else
2829
2830 UNIVERSALSDK=
2831 enable_universalsdk=
2832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002833fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002834
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002835if test -n "${UNIVERSALSDK}"
2836then
Matthias Kloseb9621712010-04-24 17:59:49 +00002837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2838$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002839else
Matthias Kloseb9621712010-04-24 17:59:49 +00002840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2841$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002842fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002844
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002845
2846
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002847UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002848
Matthias Kloseb9621712010-04-24 17:59:49 +00002849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2850$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002851
2852# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002853if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002854 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2856$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002857 UNIVERSAL_ARCHS="$withval"
2858
2859else
2860
Matthias Kloseb9621712010-04-24 17:59:49 +00002861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2862$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002863
2864fi
2865
2866
2867
2868
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002869
2870# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002871if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002872 withval=$with_framework_name;
2873 PYTHONFRAMEWORK=${withval}
2874 PYTHONFRAMEWORKDIR=${withval}.framework
2875 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2876
2877else
2878
2879 PYTHONFRAMEWORK=Python
2880 PYTHONFRAMEWORKDIR=Python.framework
2881 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2882
2883fi
2884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002885# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002886if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002887 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002888 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002890 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002891 esac
2892 case $enableval in
2893 no)
2894 PYTHONFRAMEWORK=
2895 PYTHONFRAMEWORKDIR=no-framework
2896 PYTHONFRAMEWORKPREFIX=
2897 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002898 FRAMEWORKINSTALLFIRST=
2899 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002900 FRAMEWORKALTINSTALLFIRST=
2901 FRAMEWORKALTINSTALLLAST=
2902 if test "x${prefix}" = "xNONE"; then
2903 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2904 else
2905 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2906 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002907 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002908 ;;
2909 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002910 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002911 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002912 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002913 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002914 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2915 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002916 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002917
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002918 if test "x${prefix}" = "xNONE" ; then
2919 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002920
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002921 else
2922 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2923 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002924
2925 case "${enableval}" in
2926 /System*)
2927 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2928 if test "${prefix}" = "NONE" ; then
2929 # See below
2930 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2931 fi
2932 ;;
2933
2934 /Library*)
2935 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2936 ;;
2937
2938 */Library/Frameworks)
2939 MDIR="`dirname "${enableval}"`"
2940 MDIR="`dirname "${MDIR}"`"
2941 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2942
2943 if test "${prefix}" = "NONE"; then
2944 # User hasn't specified the
2945 # --prefix option, but wants to install
2946 # the framework in a non-default location,
2947 # ensure that the compatibility links get
2948 # installed relative to that prefix as well
2949 # instead of in /usr/local.
2950 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2951 fi
2952 ;;
2953
2954 *)
2955 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2956 ;;
2957 esac
2958
Jack Jansen127e56e2001-09-11 14:41:54 +00002959 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002960
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002961 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002962 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002963 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002965 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002966
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002967 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2968
2969 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2970
Jack Jansene578a632001-08-15 01:27:14 +00002971 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002972
Guido van Rossum563e7081996-09-10 18:20:48 +00002973else
Martin v. Löwis11437992002-04-12 09:54:03 +00002974
Jack Jansene578a632001-08-15 01:27:14 +00002975 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002976 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002977 PYTHONFRAMEWORKPREFIX=
2978 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002979 FRAMEWORKINSTALLFIRST=
2980 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002981 FRAMEWORKALTINSTALLFIRST=
2982 FRAMEWORKALTINSTALLLAST=
2983 if test "x${prefix}" = "xNONE" ; then
2984 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2985 else
2986 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2987 fi
Jack Jansene578a632001-08-15 01:27:14 +00002988 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002989
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002991fi
2992
Thomas Wouters477c8d52006-05-27 19:21:47 +00002993
2994
Michael W. Hudson54241132001-12-07 15:38:26 +00002995
2996
2997
2998
Jack Jansene578a632001-08-15 01:27:14 +00002999
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003000
3001
3002
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003003
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003004
Jack Jansene578a632001-08-15 01:27:14 +00003005##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003006## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003007## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003008##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003009# Set name for machine-dependent library files
3010
Matthias Kloseb9621712010-04-24 17:59:49 +00003011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3012$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003013if test -z "$MACHDEP"
3014then
Guido van Rossum563e7081996-09-10 18:20:48 +00003015 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003016 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003017 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003018 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003019 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003020 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003021 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003022 ac_md_system=`echo $ac_sys_system |
3023 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3024 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003025 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003026 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003027
Guido van Rossum07397971997-04-29 21:49:50 +00003028 case $MACHDEP in
Victor Stinner0c17d0d2011-08-20 14:01:05 +02003029 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003030 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003031 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003032 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003033 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003034 esac
3035fi
Guido van Rossum91922671997-10-09 20:24:13 +00003036
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003037# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3038# disable features if it is defined, without any means to access these
3039# features as extensions. For these systems, we skip the definition of
3040# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3041# some feature, make sure there is no alternative way to access this
3042# feature. Also, when using wildcards, make sure you have verified the
3043# need for not defining _XOPEN_SOURCE on all systems matching the
3044# wildcard, and that the wildcard does not include future systems
3045# (which may remove their limitations).
3046case $ac_sys_system/$ac_sys_release in
3047 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3048 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003049 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003050 # In addition, Stefan Krah confirms that issue #1244610 exists through
3051 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003052 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003053 define_xopen_source=no
3054 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3055 # also defined. This can be overridden by defining _BSD_SOURCE
3056 # As this has a different meaning on Linux, only define it on OpenBSD
3057
Matthias Kloseb9621712010-04-24 17:59:49 +00003058$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003059
3060 ;;
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003061 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003062 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3063 # also defined. This can be overridden by defining _BSD_SOURCE
3064 # As this has a different meaning on Linux, only define it on OpenBSD
3065
Matthias Kloseb9621712010-04-24 17:59:49 +00003066$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003067
3068 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003069 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3070 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3071 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003072 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 +00003073 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003074 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3075 # request to enable features supported by the standard as a request
3076 # to disable features not supported by the standard. The best way
3077 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3078 # entirely and define __EXTENSIONS__ instead.
3079 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003080 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003081 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3082 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003083 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003084 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003085 define_xopen_source=no;;
3086 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003087 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003088 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003089 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003090 # On FreeBSD 4, the math functions C89 does not cover are never defined
3091 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3092 FreeBSD/4.*)
3093 define_xopen_source=no;;
3094 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3095 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3096 # identifies itself as Darwin/7.*
3097 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3098 # disables platform specific features beyond repair.
3099 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3100 # has no effect, don't bother defining them
3101 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003102 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003103 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003104 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003105 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3106 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3107 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003108 AIX/4)
3109 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003110 AIX/5)
3111 if test `uname -r` -eq 1; then
3112 define_xopen_source=no
3113 fi
3114 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003115 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3116 # defining NI_NUMERICHOST.
3117 QNX/6.3.2)
3118 define_xopen_source=no
3119 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003120
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003121esac
3122
3123if test $define_xopen_source = yes
3124then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003125
Matthias Kloseb9621712010-04-24 17:59:49 +00003126$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003127
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003128
3129 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3130 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3131 # several APIs are not declared. Since this is also needed in some
3132 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003133
Matthias Kloseb9621712010-04-24 17:59:49 +00003134$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003135
3136
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003137
Matthias Kloseb9621712010-04-24 17:59:49 +00003138$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003139
3140
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003141fi
3142
Guido van Rossum91922671997-10-09 20:24:13 +00003143#
3144# SGI compilers allow the specification of the both the ABI and the
3145# ISA on the command line. Depending on the values of these switches,
3146# different and often incompatable code will be generated.
3147#
3148# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3149# thus supply support for various ABI/ISA combinations. The MACHDEP
3150# variable is also adjusted.
3151#
3152
3153if test ! -z "$SGI_ABI"
3154then
3155 CC="cc $SGI_ABI"
3156 LDFLAGS="$SGI_ABI $LDFLAGS"
3157 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3160$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003161
Jack Jansen6b08a402004-06-03 12:41:45 +00003162# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3163# it may influence the way we can build extensions, so distutils
3164# needs to check it
3165
Thomas Wouters477c8d52006-05-27 19:21:47 +00003166
Jack Jansen6b08a402004-06-03 12:41:45 +00003167CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003168EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003169
Matthias Kloseb9621712010-04-24 17:59:49 +00003170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3171$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003172ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3174$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003175
Guido van Rossum627b2d71993-12-24 10:39:16 +00003176# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003177
3178# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3179# for debug/optimization stuff. BASECFLAGS is for flags that are required
3180# just to get things to compile and link. Users are free to override OPT
3181# when running configure or make. The build should not break if they do.
3182# BASECFLAGS should generally not be messed with, however.
3183
3184# XXX shouldn't some/most/all of this code be merged with the stuff later
3185# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3187$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003190if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003192 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003193 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003194 without_gcc=yes;;
3195 yes) CC=gcc
3196 without_gcc=no;;
3197 *) CC=$withval
3198 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003199 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003200else
Martin v. Löwis11437992002-04-12 09:54:03 +00003201
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003202 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003203 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003204 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003205 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003206 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003207fi
3208
Matthias Kloseb9621712010-04-24 17:59:49 +00003209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3210$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003211
Guido van Rossum8b131c51995-03-09 14:10:13 +00003212# If the user switches compilers, we can't believe the cache
3213if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3214then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003215 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003216(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003217fi
3218
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003219# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3220# when the compiler supports them, but we don't always want -O2, and
3221# we set -g later.
3222if test -z "$CFLAGS"; then
3223 CFLAGS=
3224fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003225ac_ext=c
3226ac_cpp='$CPP $CPPFLAGS'
3227ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3228ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3229ac_compiler_gnu=$ac_cv_c_compiler_gnu
3230if test -n "$ac_tool_prefix"; then
3231 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3232set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3234$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003235if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003236 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003237else
3238 if test -n "$CC"; then
3239 ac_cv_prog_CC="$CC" # Let the user override the test.
3240else
Martin v. Löwis11437992002-04-12 09:54:03 +00003241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3242for as_dir in $PATH
3243do
3244 IFS=$as_save_IFS
3245 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003246 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003247 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003248 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003249 $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 +00003250 break 2
3251 fi
3252done
Matthias Kloseb9621712010-04-24 17:59:49 +00003253 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003254IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003255
Jack Jansendd19cf82001-12-06 22:36:17 +00003256fi
3257fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003258CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003259if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3261$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003262else
Matthias Kloseb9621712010-04-24 17:59:49 +00003263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3264$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003265fi
3266
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003267
Martin v. Löwis11437992002-04-12 09:54:03 +00003268fi
3269if test -z "$ac_cv_prog_CC"; then
3270 ac_ct_CC=$CC
3271 # Extract the first word of "gcc", so it can be a program name with args.
3272set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3274$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003275if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003276 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003277else
3278 if test -n "$ac_ct_CC"; then
3279 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3280else
3281as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3282for as_dir in $PATH
3283do
3284 IFS=$as_save_IFS
3285 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003286 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003287 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003288 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003289 $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 +00003290 break 2
3291 fi
3292done
Matthias Kloseb9621712010-04-24 17:59:49 +00003293 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003294IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003295
3296fi
3297fi
3298ac_ct_CC=$ac_cv_prog_ac_ct_CC
3299if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3301$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003302else
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3304$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003305fi
3306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003307 if test "x$ac_ct_CC" = x; then
3308 CC=""
3309 else
3310 case $cross_compiling:$ac_tool_warned in
3311yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003312{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3313$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003314ac_tool_warned=yes ;;
3315esac
3316 CC=$ac_ct_CC
3317 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003318else
3319 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003320fi
3321
Jack Jansendd19cf82001-12-06 22:36:17 +00003322if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003323 if test -n "$ac_tool_prefix"; then
3324 # 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 +00003325set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3327$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003328if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003329 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003330else
3331 if test -n "$CC"; then
3332 ac_cv_prog_CC="$CC" # Let the user override the test.
3333else
Martin v. Löwis11437992002-04-12 09:54:03 +00003334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3335for as_dir in $PATH
3336do
3337 IFS=$as_save_IFS
3338 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003339 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003340 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003341 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003342 $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 +00003343 break 2
3344 fi
3345done
Matthias Kloseb9621712010-04-24 17:59:49 +00003346 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003347IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003348
3349fi
3350fi
3351CC=$ac_cv_prog_CC
3352if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3354$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003355else
Matthias Kloseb9621712010-04-24 17:59:49 +00003356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3357$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003358fi
3359
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003360
Martin v. Löwis11437992002-04-12 09:54:03 +00003361 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003362fi
3363if test -z "$CC"; then
3364 # Extract the first word of "cc", so it can be a program name with args.
3365set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3367$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003368if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003369 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003370else
3371 if test -n "$CC"; then
3372 ac_cv_prog_CC="$CC" # Let the user override the test.
3373else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003374 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3376for as_dir in $PATH
3377do
3378 IFS=$as_save_IFS
3379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003380 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003381 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003382 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3383 ac_prog_rejected=yes
3384 continue
3385 fi
3386 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003387 $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 +00003388 break 2
3389 fi
3390done
Matthias Kloseb9621712010-04-24 17:59:49 +00003391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003393
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003394if test $ac_prog_rejected = yes; then
3395 # We found a bogon in the path, so make sure we never use it.
3396 set dummy $ac_cv_prog_CC
3397 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003399 # We chose a different compiler from the bogus one.
3400 # However, it has the same basename, so the bogon will be chosen
3401 # first if we set CC to just the basename; use the full file name.
3402 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003403 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003404 fi
3405fi
3406fi
3407fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003408CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003409if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3411$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003412else
Matthias Kloseb9621712010-04-24 17:59:49 +00003413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3414$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003415fi
3416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003417
Martin v. Löwis11437992002-04-12 09:54:03 +00003418fi
3419if test -z "$CC"; then
3420 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003421 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003422 do
3423 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3424set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3426$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003427if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003428 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003429else
3430 if test -n "$CC"; then
3431 ac_cv_prog_CC="$CC" # Let the user override the test.
3432else
Martin v. Löwis11437992002-04-12 09:54:03 +00003433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3434for as_dir in $PATH
3435do
3436 IFS=$as_save_IFS
3437 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003438 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003439 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003440 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003441 $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 +00003442 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003443 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003444done
Matthias Kloseb9621712010-04-24 17:59:49 +00003445 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003446IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003447
3448fi
3449fi
3450CC=$ac_cv_prog_CC
3451if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3453$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003454else
Matthias Kloseb9621712010-04-24 17:59:49 +00003455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3456$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003457fi
3458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003459
Martin v. Löwis11437992002-04-12 09:54:03 +00003460 test -n "$CC" && break
3461 done
3462fi
3463if test -z "$CC"; then
3464 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003466do
3467 # Extract the first word of "$ac_prog", so it can be a program name with args.
3468set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3470$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003471if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003472 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003473else
3474 if test -n "$ac_ct_CC"; then
3475 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3476else
3477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3478for as_dir in $PATH
3479do
3480 IFS=$as_save_IFS
3481 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003482 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003483 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003485 $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 +00003486 break 2
3487 fi
3488done
Matthias Kloseb9621712010-04-24 17:59:49 +00003489 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003490IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003491
Martin v. Löwis11437992002-04-12 09:54:03 +00003492fi
3493fi
3494ac_ct_CC=$ac_cv_prog_ac_ct_CC
3495if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3497$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003498else
Matthias Kloseb9621712010-04-24 17:59:49 +00003499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3500$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003501fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003503
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 test -n "$ac_ct_CC" && break
3505done
Michael W. Hudson54241132001-12-07 15:38:26 +00003506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003507 if test "x$ac_ct_CC" = x; then
3508 CC=""
3509 else
3510 case $cross_compiling:$ac_tool_warned in
3511yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003512{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3513$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003514ac_tool_warned=yes ;;
3515esac
3516 CC=$ac_ct_CC
3517 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003518fi
3519
3520fi
3521
3522
Matthias Kloseb9621712010-04-24 17:59:49 +00003523test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3524$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003525as_fn_error $? "no acceptable C compiler found in \$PATH
Gregory P. Smith69140482012-01-16 02:05:55 -08003526See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003527
3528# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003529$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3530set X $ac_compile
3531ac_compiler=$2
3532for ac_option in --version -v -V -qversion; do
3533 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003534case "(($ac_try" in
3535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3536 *) ac_try_echo=$ac_try;;
3537esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003538eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3539$as_echo "$ac_try_echo"; } >&5
3540 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003542 if test -s conftest.err; then
3543 sed '10a\
3544... rest of stderr output deleted ...
3545 10q' conftest.err >conftest.er1
3546 cat conftest.er1 >&5
3547 fi
3548 rm -f conftest.er1 conftest.err
3549 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3550 test $ac_status = 0; }
3551done
Martin v. Löwis11437992002-04-12 09:54:03 +00003552
Matthias Kloseb9621712010-04-24 17:59:49 +00003553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003554/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003555
Martin v. Löwis11437992002-04-12 09:54:03 +00003556int
3557main ()
3558{
3559
3560 ;
3561 return 0;
3562}
3563_ACEOF
3564ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003565ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003566# Try to create an executable without -o first, disregard a.out.
3567# It will help us diagnose broken compilers, and finding out an intuition
3568# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3570$as_echo_n "checking whether the C compiler works... " >&6; }
3571ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3572
3573# The possible output files:
3574ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003576ac_rmfiles=
3577for ac_file in $ac_files
3578do
3579 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003581 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3582 esac
3583done
3584rm -f $ac_rmfiles
3585
Matthias Kloseb9621712010-04-24 17:59:49 +00003586if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003587case "(($ac_try" in
3588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3589 *) ac_try_echo=$ac_try;;
3590esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003591eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3592$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3596 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3598# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3599# in a Makefile. We should not override ac_cv_exeext if it was cached,
3600# so that the user can short-circuit this test for compilers unknown to
3601# Autoconf.
3602for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003603do
3604 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003605 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003607 ;;
3608 [ab].out )
3609 # We found the default executable, but exeext='' is most
3610 # certainly right.
3611 break;;
3612 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614 then :; else
3615 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3616 fi
3617 # We set ac_cv_exeext here because the later test for it is not
3618 # safe: cross compilers may not add the suffix if given an `-o'
3619 # argument, so we may need to know it at that point already.
3620 # Even if this section looks crufty: it has the advantage of
3621 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003622 break;;
3623 * )
3624 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003625 esac
3626done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003627test "$ac_cv_exeext" = no && ac_cv_exeext=
3628
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003629else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630 ac_file=''
3631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003632if test -z "$ac_file"; then :
3633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3634$as_echo "no" >&6; }
3635$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003636sed 's/^/| /' conftest.$ac_ext >&5
3637
Matthias Kloseb9621712010-04-24 17:59:49 +00003638{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3639$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003640as_fn_error 77 "C compiler cannot create executables
Gregory P. Smith69140482012-01-16 02:05:55 -08003641See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003642else
3643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3644$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3647$as_echo_n "checking for C compiler default output file name... " >&6; }
3648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3649$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003650ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003651
Matthias Kloseb9621712010-04-24 17:59:49 +00003652rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003653ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3655$as_echo_n "checking for suffix of executables... " >&6; }
3656if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657case "(($ac_try" in
3658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3659 *) ac_try_echo=$ac_try;;
3660esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3662$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003664 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3666 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003667 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3668# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3669# work properly (i.e., refer to `conftest.exe'), while it won't with
3670# `rm'.
3671for ac_file in conftest.exe conftest conftest.*; do
3672 test -f "$ac_file" || continue
3673 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003675 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3676 break;;
3677 * ) break;;
3678 esac
3679done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003680else
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003683as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Gregory P. Smith69140482012-01-16 02:05:55 -08003684See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003686rm -f conftest conftest$ac_cv_exeext
3687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3688$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003689
3690rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003691EXEEXT=$ac_cv_exeext
3692ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3694/* end confdefs.h. */
3695#include <stdio.h>
3696int
3697main ()
3698{
3699FILE *f = fopen ("conftest.out", "w");
3700 return ferror (f) || fclose (f) != 0;
3701
3702 ;
3703 return 0;
3704}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003706ac_clean_files="$ac_clean_files conftest.out"
3707# Check that the compiler produces executables we can run. If not, either
3708# the compiler is broken, or we cross compile.
3709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3710$as_echo_n "checking whether we are cross compiling... " >&6; }
3711if test "$cross_compiling" != yes; then
3712 { { ac_try="$ac_link"
3713case "(($ac_try" in
3714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3715 *) ac_try_echo=$ac_try;;
3716esac
3717eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3718$as_echo "$ac_try_echo"; } >&5
3719 (eval "$ac_link") 2>&5
3720 ac_status=$?
3721 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3722 test $ac_status = 0; }
3723 if { ac_try='./conftest$ac_cv_exeext'
3724 { { case "(($ac_try" in
3725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3726 *) ac_try_echo=$ac_try;;
3727esac
3728eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3729$as_echo "$ac_try_echo"; } >&5
3730 (eval "$ac_try") 2>&5
3731 ac_status=$?
3732 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3733 test $ac_status = 0; }; }; then
3734 cross_compiling=no
3735 else
3736 if test "$cross_compiling" = maybe; then
3737 cross_compiling=yes
3738 else
3739 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003741as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003742If you meant to cross compile, use \`--host'.
Gregory P. Smith69140482012-01-16 02:05:55 -08003743See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 fi
3745 fi
3746fi
3747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3748$as_echo "$cross_compiling" >&6; }
3749
3750rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3751ac_clean_files=$ac_clean_files_save
3752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3753$as_echo_n "checking for suffix of object files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003754if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 $as_echo_n "(cached) " >&6
3756else
3757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003758/* end confdefs.h. */
3759
3760int
3761main ()
3762{
3763
3764 ;
3765 return 0;
3766}
3767_ACEOF
3768rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003769if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770case "(($ac_try" in
3771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3772 *) ac_try_echo=$ac_try;;
3773esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3775$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3779 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780 for ac_file in conftest.o conftest.obj conftest.*; do
3781 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003782 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003784 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3785 break;;
3786 esac
3787done
3788else
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003790sed 's/^/| /' conftest.$ac_ext >&5
3791
Matthias Kloseb9621712010-04-24 17:59:49 +00003792{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003794as_fn_error $? "cannot compute suffix of object files: cannot compile
Gregory P. Smith69140482012-01-16 02:05:55 -08003795See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003797rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3800$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003801OBJEXT=$ac_cv_objext
3802ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3804$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003805if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003807else
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003810
Martin v. Löwis11437992002-04-12 09:54:03 +00003811int
3812main ()
3813{
3814#ifndef __GNUC__
3815 choke me
3816#endif
3817
3818 ;
3819 return 0;
3820}
3821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003822if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003823 ac_compiler_gnu=yes
3824else
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003828ac_cv_c_compiler_gnu=$ac_compiler_gnu
3829
3830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3832$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3833if test $ac_compiler_gnu = yes; then
3834 GCC=yes
3835else
3836 GCC=
3837fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003838ac_test_CFLAGS=${CFLAGS+set}
3839ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3841$as_echo_n "checking whether $CC accepts -g... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003842if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003844else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845 ac_save_c_werror_flag=$ac_c_werror_flag
3846 ac_c_werror_flag=yes
3847 ac_cv_prog_cc_g=no
3848 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003851
Martin v. Löwis11437992002-04-12 09:54:03 +00003852int
3853main ()
3854{
3855
3856 ;
3857 return 0;
3858}
3859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003860if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003861 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003862else
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 CFLAGS=""
3864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865/* end confdefs.h. */
3866
3867int
3868main ()
3869{
3870
3871 ;
3872 return 0;
3873}
3874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003875if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003876
Matthias Kloseb9621712010-04-24 17:59:49 +00003877else
3878 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881/* end confdefs.h. */
3882
3883int
3884main ()
3885{
3886
3887 ;
3888 return 0;
3889}
3890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003891if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3899 ac_c_werror_flag=$ac_save_c_werror_flag
3900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3902$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003903if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003904 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003905elif test $ac_cv_prog_cc_g = yes; then
3906 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003907 CFLAGS="-g -O2"
3908 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003909 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003910 fi
3911else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003912 if test "$GCC" = yes; then
3913 CFLAGS="-O2"
3914 else
3915 CFLAGS=
3916 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3919$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003920if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003922else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003924ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003926/* end confdefs.h. */
3927#include <stdarg.h>
3928#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003929struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00003930/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3931struct buf { int x; };
3932FILE * (*rcsopen) (struct buf *, struct stat *, int);
3933static char *e (p, i)
3934 char **p;
3935 int i;
3936{
3937 return p[i];
3938}
3939static char *f (char * (*g) (char **, int), char **p, ...)
3940{
3941 char *s;
3942 va_list v;
3943 va_start (v,p);
3944 s = g (p, va_arg (v,int));
3945 va_end (v);
3946 return s;
3947}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003948
3949/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3950 function prototypes and stuff, but not '\xHH' hex character constants.
3951 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003953 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3954 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003956int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3959 inside strings and character constants. */
3960#define FOO(x) 'x'
3961int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3962
Skip Montanaro6dead952003-09-25 14:50:04 +00003963int test (int i, double x);
3964struct s1 {int (*f) (int a);};
3965struct s2 {int (*f) (double a);};
3966int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3967int argc;
3968char **argv;
3969int
3970main ()
3971{
3972return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3973 ;
3974 return 0;
3975}
3976_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3978 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003979do
3980 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003981 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003982 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984rm -f core conftest.err conftest.$ac_objext
3985 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003986done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003988CC=$ac_save_CC
3989
3990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991# AC_CACHE_VAL
3992case "x$ac_cv_prog_cc_c89" in
3993 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3995$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003996 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3998$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003999 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4002$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004003esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004004if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004005
Matthias Kloseb9621712010-04-24 17:59:49 +00004006fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004007
Martin v. Löwis11437992002-04-12 09:54:03 +00004008ac_ext=c
4009ac_cpp='$CPP $CPPFLAGS'
4010ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4011ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4012ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004013
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004014
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004015
4016
Matthias Kloseb9621712010-04-24 17:59:49 +00004017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4018$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004021if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004023
4024 case $withval in
4025 no) with_cxx_main=no
4026 MAINCC='$(CC)';;
4027 yes) with_cxx_main=yes
4028 MAINCC='$(CXX)';;
4029 *) with_cxx_main=yes
4030 MAINCC=$withval
4031 if test -z "$CXX"
4032 then
4033 CXX=$withval
4034 fi;;
4035 esac
4036else
4037
4038 with_cxx_main=no
4039 MAINCC='$(CC)'
4040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041fi
4042
Matthias Kloseb9621712010-04-24 17:59:49 +00004043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4044$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004045
4046preset_cxx="$CXX"
4047if test -z "$CXX"
4048then
4049 case "$CC" in
4050 gcc) # Extract the first word of "g++", so it can be a program name with args.
4051set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4053$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004054if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004055 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004056else
4057 case $CXX in
4058 [\\/]* | ?:[\\/]*)
4059 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4060 ;;
4061 *)
4062 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4063for as_dir in notfound
4064do
4065 IFS=$as_save_IFS
4066 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004067 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004068 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004069 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004070 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004071 break 2
4072 fi
4073done
Matthias Kloseb9621712010-04-24 17:59:49 +00004074 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004075IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004076
4077 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4078 ;;
4079esac
4080fi
4081CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004082if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4084$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004085else
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4087$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004089
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004090 ;;
4091 cc) # Extract the first word of "c++", so it can be a program name with args.
4092set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4094$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004095if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004097else
4098 case $CXX in
4099 [\\/]* | ?:[\\/]*)
4100 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4101 ;;
4102 *)
4103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4104for as_dir in notfound
4105do
4106 IFS=$as_save_IFS
4107 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004109 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004110 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004112 break 2
4113 fi
4114done
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004117
4118 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4119 ;;
4120esac
4121fi
4122CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004123if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4125$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004126else
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4128$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004131 ;;
4132 esac
4133 if test "$CXX" = "notfound"
4134 then
4135 CXX=""
4136 fi
4137fi
4138if test -z "$CXX"
4139then
4140 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4141do
4142 # Extract the first word of "$ac_prog", so it can be a program name with args.
4143set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4145$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004146if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004148else
4149 if test -n "$CXX"; then
4150 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4151else
4152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4153for as_dir in $PATH
4154do
4155 IFS=$as_save_IFS
4156 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004158 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004159 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004161 break 2
4162 fi
4163done
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004165IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004166
4167fi
4168fi
4169CXX=$ac_cv_prog_CXX
4170if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4172$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004173else
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4175$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004176fi
4177
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004178
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004179 test -n "$CXX" && break
4180done
4181test -n "$CXX" || CXX="notfound"
4182
4183 if test "$CXX" = "notfound"
4184 then
4185 CXX=""
4186 fi
4187fi
4188if test "$preset_cxx" != "$CXX"
4189then
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004191
4192 By default, distutils will build C++ extension modules with \"$CXX\".
4193 If this is not intended, then set CXX on the configure command line.
4194 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004195$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004196
4197 By default, distutils will build C++ extension modules with \"$CXX\".
4198 If this is not intended, then set CXX on the configure command line.
4199 " >&2;}
4200fi
4201
4202
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4204$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4205save_LDFLAGS="$LDFLAGS"
4206LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004207
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4209/* end confdefs.h. */
4210
4211int
4212main ()
4213{
4214
4215 ;
4216 return 0;
4217}
4218_ACEOF
4219if ac_fn_c_try_link "$LINENO"; then :
4220 NO_AS_NEEDED="-Wl,--no-as-needed"
4221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4222$as_echo "yes" >&6; }
4223else
4224 NO_AS_NEEDED=""
4225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4226$as_echo "no" >&6; }
4227fi
4228rm -f core conftest.err conftest.$ac_objext \
4229 conftest$ac_exeext conftest.$ac_ext
4230LDFLAGS="$save_LDFLAGS"
4231
4232
4233
4234# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004235ac_ext=c
4236ac_cpp='$CPP $CPPFLAGS'
4237ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4238ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4239ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4241$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004242# On Suns, sometimes $CPP names a directory.
4243if test -n "$CPP" && test -d "$CPP"; then
4244 CPP=
4245fi
4246if test -z "$CPP"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08004247 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004248 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004249else
Martin v. Löwis11437992002-04-12 09:54:03 +00004250 # Double quotes because CPP needs to be expanded
4251 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4252 do
4253 ac_preproc_ok=false
4254for ac_c_preproc_warn_flag in '' yes
4255do
4256 # Use a header file that comes with gcc, so configuring glibc
4257 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004258 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4259 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004260 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004263/* end confdefs.h. */
4264#ifdef __STDC__
4265# include <limits.h>
4266#else
4267# include <assert.h>
4268#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004269 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004271if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004272
Matthias Kloseb9621712010-04-24 17:59:49 +00004273else
Martin v. Löwis11437992002-04-12 09:54:03 +00004274 # Broken: fails on valid input.
4275continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004276fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004277rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004280 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004282/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004283#include <ac_nonexistent.h>
4284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004285if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004286 # Broken: success on invalid input.
4287continue
4288else
Martin v. Löwis11437992002-04-12 09:54:03 +00004289 # Passes both tests.
4290ac_preproc_ok=:
4291break
4292fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004293rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004294
4295done
4296# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004297rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004298if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004299 break
4300fi
4301
4302 done
4303 ac_cv_prog_CPP=$CPP
4304
4305fi
4306 CPP=$ac_cv_prog_CPP
4307else
4308 ac_cv_prog_CPP=$CPP
4309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4311$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004312ac_preproc_ok=false
4313for ac_c_preproc_warn_flag in '' yes
4314do
4315 # Use a header file that comes with gcc, so configuring glibc
4316 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004317 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4318 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004319 # On the NeXT, cc -E runs the code through the compiler's parser,
4320 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004322/* end confdefs.h. */
4323#ifdef __STDC__
4324# include <limits.h>
4325#else
4326# include <assert.h>
4327#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004328 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004330if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004331
Matthias Kloseb9621712010-04-24 17:59:49 +00004332else
Martin v. Löwis11437992002-04-12 09:54:03 +00004333 # Broken: fails on valid input.
4334continue
4335fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004336rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004337
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004339 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004342#include <ac_nonexistent.h>
4343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004344if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004345 # Broken: success on invalid input.
4346continue
4347else
Martin v. Löwis11437992002-04-12 09:54:03 +00004348 # Passes both tests.
4349ac_preproc_ok=:
4350break
4351fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004352rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004353
4354done
4355# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004356rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004357if $ac_preproc_ok; then :
4358
Martin v. Löwis11437992002-04-12 09:54:03 +00004359else
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4361$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004362as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Gregory P. Smith69140482012-01-16 02:05:55 -08004363See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004364fi
4365
4366ac_ext=c
4367ac_cpp='$CPP $CPPFLAGS'
4368ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4369ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4370ac_compiler_gnu=$ac_cv_c_compiler_gnu
4371
4372
Matthias Kloseb9621712010-04-24 17:59:49 +00004373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4374$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004375if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004377else
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004380 # Loop through the user's path and test for each of PROGNAME-LIST
4381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4383do
4384 IFS=$as_save_IFS
4385 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 for ac_prog in grep ggrep; do
4387 for ac_exec_ext in '' $ac_executable_extensions; do
4388 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004389 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004390# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391 # Check for GNU $ac_path_GREP
4392case `"$ac_path_GREP" --version 2>&1` in
4393*GNU*)
4394 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4395*)
4396 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004397 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398 while :
4399 do
4400 cat "conftest.in" "conftest.in" >"conftest.tmp"
4401 mv "conftest.tmp" "conftest.in"
4402 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4405 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4408 # Best one so far, save it but keep looking for a better one
4409 ac_cv_path_GREP="$ac_path_GREP"
4410 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004411 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412 # 10*(2^10) chars as input seems more than enough
4413 test $ac_count -gt 10 && break
4414 done
4415 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4416esac
4417
Matthias Kloseb9621712010-04-24 17:59:49 +00004418 $ac_path_GREP_found && break 3
4419 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004420 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004421 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004424 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 +00004425 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426else
4427 ac_cv_path_GREP=$GREP
4428fi
4429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4432$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004433 GREP="$ac_cv_path_GREP"
4434
4435
Matthias Kloseb9621712010-04-24 17:59:49 +00004436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4437$as_echo_n "checking for egrep... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004438if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004439 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004440else
4441 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4442 then ac_cv_path_EGREP="$GREP -E"
4443 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004444 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004445 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004446 # Loop through the user's path and test for each of PROGNAME-LIST
4447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004448for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4449do
4450 IFS=$as_save_IFS
4451 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004452 for ac_prog in egrep; do
4453 for ac_exec_ext in '' $ac_executable_extensions; do
4454 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004455 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004456# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004457 # Check for GNU $ac_path_EGREP
4458case `"$ac_path_EGREP" --version 2>&1` in
4459*GNU*)
4460 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4461*)
4462 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004463 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004464 while :
4465 do
4466 cat "conftest.in" "conftest.in" >"conftest.tmp"
4467 mv "conftest.tmp" "conftest.in"
4468 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004469 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004470 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4471 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004472 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004473 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4474 # Best one so far, save it but keep looking for a better one
4475 ac_cv_path_EGREP="$ac_path_EGREP"
4476 ac_path_EGREP_max=$ac_count
4477 fi
4478 # 10*(2^10) chars as input seems more than enough
4479 test $ac_count -gt 10 && break
4480 done
4481 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4482esac
4483
Matthias Kloseb9621712010-04-24 17:59:49 +00004484 $ac_path_EGREP_found && break 3
4485 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004486 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004487 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004488IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004489 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004490 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 +00004491 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004492else
4493 ac_cv_path_EGREP=$EGREP
4494fi
4495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004496 fi
4497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4499$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004500 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004501
4502
Matthias Kloseb9621712010-04-24 17:59:49 +00004503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4504$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004505if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004506 $as_echo_n "(cached) " >&6
4507else
4508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004509/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004510#include <stdlib.h>
4511#include <stdarg.h>
4512#include <string.h>
4513#include <float.h>
4514
4515int
4516main ()
4517{
4518
4519 ;
4520 return 0;
4521}
4522_ACEOF
4523if ac_fn_c_try_compile "$LINENO"; then :
4524 ac_cv_header_stdc=yes
4525else
4526 ac_cv_header_stdc=no
4527fi
4528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4529
4530if test $ac_cv_header_stdc = yes; then
4531 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4533/* end confdefs.h. */
4534#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004535
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004536_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004538 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004539
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004540else
Matthias Kloseb9621712010-04-24 17:59:49 +00004541 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004542fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004543rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004544
Matthias Kloseb9621712010-04-24 17:59:49 +00004545fi
4546
4547if test $ac_cv_header_stdc = yes; then
4548 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4550/* end confdefs.h. */
4551#include <stdlib.h>
4552
4553_ACEOF
4554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4555 $EGREP "free" >/dev/null 2>&1; then :
4556
4557else
4558 ac_cv_header_stdc=no
4559fi
4560rm -f conftest*
4561
4562fi
4563
4564if test $ac_cv_header_stdc = yes; then
4565 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4566 if test "$cross_compiling" = yes; then :
4567 :
4568else
4569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4570/* end confdefs.h. */
4571#include <ctype.h>
4572#include <stdlib.h>
4573#if ((' ' & 0x0FF) == 0x020)
4574# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4575# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4576#else
4577# define ISLOWER(c) \
4578 (('a' <= (c) && (c) <= 'i') \
4579 || ('j' <= (c) && (c) <= 'r') \
4580 || ('s' <= (c) && (c) <= 'z'))
4581# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4582#endif
4583
4584#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4585int
4586main ()
4587{
4588 int i;
4589 for (i = 0; i < 256; i++)
4590 if (XOR (islower (i), ISLOWER (i))
4591 || toupper (i) != TOUPPER (i))
4592 return 2;
4593 return 0;
4594}
4595_ACEOF
4596if ac_fn_c_try_run "$LINENO"; then :
4597
4598else
4599 ac_cv_header_stdc=no
4600fi
4601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4602 conftest.$ac_objext conftest.beam conftest.$ac_ext
4603fi
4604
4605fi
4606fi
4607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4608$as_echo "$ac_cv_header_stdc" >&6; }
4609if test $ac_cv_header_stdc = yes; then
4610
4611$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4612
4613fi
4614
4615# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4616for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4617 inttypes.h stdint.h unistd.h
4618do :
4619 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4620ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4621"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004622if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004623 cat >>confdefs.h <<_ACEOF
4624#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4625_ACEOF
4626
4627fi
4628
4629done
4630
4631
4632
4633 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08004634if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004635 MINIX=yes
4636else
4637 MINIX=
4638fi
4639
4640
4641 if test "$MINIX" = yes; then
4642
4643$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4644
4645
4646$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4647
4648
4649$as_echo "#define _MINIX 1" >>confdefs.h
4650
4651 fi
4652
4653
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4655$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004656if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004657 $as_echo_n "(cached) " >&6
4658else
4659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4660/* end confdefs.h. */
4661
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004662# define __EXTENSIONS__ 1
4663 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00004664int
4665main ()
4666{
4667
4668 ;
4669 return 0;
4670}
4671_ACEOF
4672if ac_fn_c_try_compile "$LINENO"; then :
4673 ac_cv_safe_to_define___extensions__=yes
4674else
4675 ac_cv_safe_to_define___extensions__=no
4676fi
4677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4678fi
4679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4680$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4681 test $ac_cv_safe_to_define___extensions__ = yes &&
4682 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4683
4684 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4685
4686 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4687
4688 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4689
4690 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4691
4692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004694# Check for unsupported systems
4695case $ac_sys_system/$ac_sys_release in
4696atheos*|Linux*/1*)
4697 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4698 echo See README for details.
4699 exit 1;;
4700esac
4701
4702
Matthias Kloseb9621712010-04-24 17:59:49 +00004703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4704$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004705
4706# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004707if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004708 withval=$with_suffix;
4709 case $withval in
4710 no) EXEEXT=;;
4711 yes) EXEEXT=.exe;;
4712 *) EXEEXT=$withval;;
4713 esac
4714fi
4715
Matthias Kloseb9621712010-04-24 17:59:49 +00004716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4717$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004718
4719# Test whether we're running on a non-case-sensitive system, in which
4720# case we give a warning if no ext is given
4721
Matthias Kloseb9621712010-04-24 17:59:49 +00004722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4723$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004724if test ! -d CaseSensitiveTestDir; then
4725mkdir CaseSensitiveTestDir
4726fi
4727
4728if test -d casesensitivetestdir
4729then
Matthias Kloseb9621712010-04-24 17:59:49 +00004730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4731$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004732 BUILDEXEEXT=.exe
4733else
Matthias Kloseb9621712010-04-24 17:59:49 +00004734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4735$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004736 BUILDEXEEXT=$EXEEXT
4737fi
4738rmdir CaseSensitiveTestDir
4739
4740case $MACHDEP in
4741bsdos*)
4742 case $CC in
4743 gcc) CC="$CC -D_HAVE_BSDI";;
4744 esac;;
4745esac
4746
4747case $ac_sys_system in
4748hp*|HP*)
4749 case $CC in
4750 cc|*/cc) CC="$CC -Ae";;
4751 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004752esac
4753
doko@python.org3e6e2ac2013-01-25 13:12:29 +01004754MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4755
4756
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757
4758
Matthias Kloseb9621712010-04-24 17:59:49 +00004759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4760$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761if test -z "$LIBRARY"
4762then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004763 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4766$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767
4768# LDLIBRARY is the name of the library to link against (as opposed to the
4769# name of the library into which to insert object files). BLDLIBRARY is also
4770# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4771# is blank as the main program is not linked directly against LDLIBRARY.
4772# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4773# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4774# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4775# DLLLIBRARY is the shared (i.e., DLL) library.
4776#
4777# RUNSHARED is used to run shared python without installed libraries
4778#
4779# INSTSONAME is the name of the shared library that will be use to install
4780# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004781#
4782# LDVERSION is the shared library version number, normally the Python version
4783# with the ABI build flags appended.
4784
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004785
4786
4787
4788
4789
4790
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004791
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004792LDLIBRARY="$LIBRARY"
4793BLDLIBRARY='$(LDLIBRARY)'
4794INSTSONAME='$(LDLIBRARY)'
4795DLLLIBRARY=''
4796LDLIBRARYDIR=''
4797RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004798LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004799
4800# LINKCC is the command that links the python executable -- default is $(CC).
4801# If CXX is set, and if it is needed to link a main function that was
4802# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4803# python might then depend on the C++ runtime
4804# This is altered for AIX in order to build the export list before
4805# linking.
4806
Matthias Kloseb9621712010-04-24 17:59:49 +00004807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4808$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809if test -z "$LINKCC"
4810then
4811 LINKCC='$(PURIFY) $(MAINCC)'
4812 case $ac_sys_system in
4813 AIX*)
4814 exp_extra="\"\""
4815 if test $ac_sys_release -ge 5 -o \
4816 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4817 exp_extra="."
4818 fi
4819 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004820 QNX*)
4821 # qcc must be used because the other compilers do not
4822 # support -N.
4823 LINKCC=qcc;;
4824 esac
4825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4827$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004828
4829# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4830# make sure we default having it set to "no": this is used by
4831# distutils.unixccompiler to know if it should add --enable-new-dtags
4832# to linker command lines, and failing to detect GNU ld simply results
4833# in the same bahaviour as before.
4834
Matthias Kloseb9621712010-04-24 17:59:49 +00004835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4836$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837ac_prog=ld
4838if test "$GCC" = yes; then
4839 ac_prog=`$CC -print-prog-name=ld`
4840fi
4841case `"$ac_prog" -V 2>&1 < /dev/null` in
4842 *GNU*)
4843 GNULD=yes;;
4844 *)
4845 GNULD=no;;
4846esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4848$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4851$as_echo_n "checking for inline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004852if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004853 $as_echo_n "(cached) " >&6
4854else
4855 ac_cv_c_inline=no
4856for ac_kw in inline __inline__ __inline; do
4857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4858/* end confdefs.h. */
4859#ifndef __cplusplus
4860typedef int foo_t;
4861static $ac_kw foo_t static_foo () {return 0; }
4862$ac_kw foo_t foo () {return 0; }
4863#endif
4864
4865_ACEOF
4866if ac_fn_c_try_compile "$LINENO"; then :
4867 ac_cv_c_inline=$ac_kw
4868fi
4869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4870 test "$ac_cv_c_inline" != no && break
4871done
4872
4873fi
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4875$as_echo "$ac_cv_c_inline" >&6; }
4876
4877case $ac_cv_c_inline in
4878 inline | yes) ;;
4879 *)
4880 case $ac_cv_c_inline in
4881 no) ac_val=;;
4882 *) ac_val=$ac_cv_c_inline;;
4883 esac
4884 cat >>confdefs.h <<_ACEOF
4885#ifndef __cplusplus
4886#define inline $ac_val
4887#endif
4888_ACEOF
4889 ;;
4890esac
4891
4892if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004893
4894$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004895
4896
4897fi
4898
4899
Matthias Kloseb9621712010-04-24 17:59:49 +00004900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4901$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004902# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004903if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004904 enableval=$enable_shared;
4905fi
4906
4907
4908if test -z "$enable_shared"
4909then
4910 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004911 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912 enable_shared="yes";;
4913 *)
4914 enable_shared="no";;
4915 esac
4916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4918$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004919
Matthias Kloseb9621712010-04-24 17:59:49 +00004920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4921$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004922# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004923if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004924 enableval=$enable_profiling; ac_save_cc="$CC"
4925 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004926 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 ac_enable_profiling="no"
4928else
Matthias Kloseb9621712010-04-24 17:59:49 +00004929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004930/* end confdefs.h. */
4931int main() { return 0; }
4932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004933if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004934 ac_enable_profiling="yes"
4935else
Matthias Kloseb9621712010-04-24 17:59:49 +00004936 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4939 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004940fi
4941
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942 CC="$ac_save_cc"
4943fi
4944
Matthias Kloseb9621712010-04-24 17:59:49 +00004945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4946$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947
4948case "$ac_enable_profiling" in
4949 "yes")
4950 BASECFLAGS="-pg $BASECFLAGS"
4951 LDFLAGS="-pg $LDFLAGS"
4952 ;;
4953esac
4954
Matthias Kloseb9621712010-04-24 17:59:49 +00004955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4956$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957
4958# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4959# library that we build, but we do not want to link against it (we
4960# will find it with a -framework option). For this reason there is an
4961# extra variable BLDLIBRARY against which Python and the extension
4962# modules are linked, BLDLIBRARY. This is normally the same as
4963# LDLIBRARY, but empty for MacOSX framework builds.
4964if test "$enable_framework"
4965then
4966 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4967 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4968 BLDLIBRARY=''
4969else
4970 BLDLIBRARY='$(LDLIBRARY)'
4971fi
4972
4973# Other platforms follow
4974if test $enable_shared = "yes"; then
4975
Matthias Kloseb9621712010-04-24 17:59:49 +00004976$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004977
4978 case $ac_sys_system in
4979 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004980 LDLIBRARY='libpython$(LDVERSION).dll.a'
4981 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982 ;;
4983 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004984 LDLIBRARY='libpython$(LDVERSION).so'
4985 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4987 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004988 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004989 then
4990 PY3LIBRARY=libpython3.so
4991 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02004993 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004994 LDLIBRARY='libpython$(LDVERSION).so'
4995 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4997 case $ac_sys_system in
4998 FreeBSD*)
4999 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5000 ;;
5001 esac
5002 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005003 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005004 then
5005 PY3LIBRARY=libpython3.so
5006 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007 ;;
5008 hp*|HP*)
5009 case `uname -m` in
5010 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005011 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005012 ;;
5013 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005014 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015 ;;
5016 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005017 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5019 ;;
5020 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005021 LDLIBRARY='libpython$(LDVERSION).so'
5022 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005023 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5024 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005025 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005026 LDLIBRARY='libpython$(LDVERSION).dylib'
5027 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5029 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005030 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005031 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005032 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5033 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005034
5035 esac
5036else # shared is disabled
5037 case $ac_sys_system in
5038 CYGWIN*)
5039 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005040 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005041 ;;
5042 esac
5043fi
5044
Matthias Kloseb9621712010-04-24 17:59:49 +00005045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5046$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047
5048if test -n "$ac_tool_prefix"; then
5049 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5050set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5052$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005053if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055else
5056 if test -n "$RANLIB"; then
5057 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5058else
5059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5060for as_dir in $PATH
5061do
5062 IFS=$as_save_IFS
5063 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005065 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005068 break 2
5069 fi
5070done
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072IFS=$as_save_IFS
5073
5074fi
5075fi
5076RANLIB=$ac_cv_prog_RANLIB
5077if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5079$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005080else
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5082$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083fi
5084
5085
5086fi
5087if test -z "$ac_cv_prog_RANLIB"; then
5088 ac_ct_RANLIB=$RANLIB
5089 # Extract the first word of "ranlib", so it can be a program name with args.
5090set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5092$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005093if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005095else
5096 if test -n "$ac_ct_RANLIB"; then
5097 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5098else
5099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5100for as_dir in $PATH
5101do
5102 IFS=$as_save_IFS
5103 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005106 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005108 break 2
5109 fi
5110done
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112IFS=$as_save_IFS
5113
5114fi
5115fi
5116ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5117if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5119$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120else
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123fi
5124
5125 if test "x$ac_ct_RANLIB" = x; then
5126 RANLIB=":"
5127 else
5128 case $cross_compiling:$ac_tool_warned in
5129yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005130{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5131$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132ac_tool_warned=yes ;;
5133esac
5134 RANLIB=$ac_ct_RANLIB
5135 fi
5136else
5137 RANLIB="$ac_cv_prog_RANLIB"
5138fi
5139
5140
5141for ac_prog in ar aal
5142do
5143 # Extract the first word of "$ac_prog", so it can be a program name with args.
5144set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5146$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005147if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005148 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005149else
5150 if test -n "$AR"; then
5151 ac_cv_prog_AR="$AR" # Let the user override the test.
5152else
5153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5154for as_dir in $PATH
5155do
5156 IFS=$as_save_IFS
5157 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005158 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005159 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005160 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005162 break 2
5163 fi
5164done
Matthias Kloseb9621712010-04-24 17:59:49 +00005165 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005166IFS=$as_save_IFS
5167
5168fi
5169fi
5170AR=$ac_cv_prog_AR
5171if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5173$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005174else
Matthias Kloseb9621712010-04-24 17:59:49 +00005175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5176$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005177fi
5178
5179
5180 test -n "$AR" && break
5181done
5182test -n "$AR" || AR="ar"
5183
5184
5185# tweak ARFLAGS only if the user didn't set it on the command line
5186
5187if test -z "$ARFLAGS"
5188then
5189 ARFLAGS="rc"
5190fi
5191
5192
5193# Extract the first word of "svnversion", so it can be a program name with args.
5194set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5196$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005197if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005198 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005199else
5200 if test -n "$SVNVERSION"; then
5201 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5202else
5203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5204for as_dir in $PATH
5205do
5206 IFS=$as_save_IFS
5207 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005208 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005209 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005210 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005211 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005212 break 2
5213 fi
5214done
Matthias Kloseb9621712010-04-24 17:59:49 +00005215 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005216IFS=$as_save_IFS
5217
5218 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5219fi
5220fi
5221SVNVERSION=$ac_cv_prog_SVNVERSION
5222if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5224$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005225else
Matthias Kloseb9621712010-04-24 17:59:49 +00005226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5227$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228fi
5229
5230
5231if test $SVNVERSION = found
5232then
5233 SVNVERSION="svnversion \$(srcdir)"
5234else
5235 SVNVERSION="echo Unversioned directory"
5236fi
5237
Trent Nelson9effe692012-10-16 08:41:32 -04005238
Trent Nelson739fc542012-10-17 04:45:30 -04005239if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson9effe692012-10-16 08:41:32 -04005240 # If we're building out-of-tree, we need to make sure the following
5241 # resources get picked up before their $srcdir counterparts.
5242 # Objects/ -> typeslots.inc
5243 # Include/ -> Python-ast.h, graminit.h
5244 # Python/ -> importlib.h
5245 # (A side effect of this is that these resources will automatically be
5246 # regenerated when building out-of-tree, regardless of whether or not
5247 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5248 # off.)
5249 BASECPPFLAGS="-IObjects -IInclude -IPython"
5250else
5251 BASECPPFLAGS=""
5252fi
5253
Georg Brandl1ca2e792011-03-05 20:51:24 +01005254
5255
5256
Georg Brandl187c1112011-07-03 09:23:20 +02005257
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005258if test -e $srcdir/.hg/dirstate
Georg Brandl187c1112011-07-03 09:23:20 +02005259then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005260# Extract the first word of "hg", so it can be a program name with args.
5261set dummy hg; ac_word=$2
5262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5263$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005264if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005265 $as_echo_n "(cached) " >&6
5266else
5267 if test -n "$HAS_HG"; then
5268 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5269else
5270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5271for as_dir in $PATH
5272do
5273 IFS=$as_save_IFS
5274 test -z "$as_dir" && as_dir=.
5275 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005276 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005277 ac_cv_prog_HAS_HG="found"
5278 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5279 break 2
5280 fi
5281done
5282 done
5283IFS=$as_save_IFS
5284
5285 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5286fi
5287fi
5288HAS_HG=$ac_cv_prog_HAS_HG
5289if test -n "$HAS_HG"; then
5290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5291$as_echo "$HAS_HG" >&6; }
5292else
5293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5294$as_echo "no" >&6; }
5295fi
5296
5297
Georg Brandl187c1112011-07-03 09:23:20 +02005298else
5299HAS_HG=no-repository
5300fi
Georg Brandl1ca2e792011-03-05 20:51:24 +01005301if test $HAS_HG = found
5302then
5303 HGVERSION="hg id -i \$(srcdir)"
5304 HGTAG="hg id -t \$(srcdir)"
5305 HGBRANCH="hg id -b \$(srcdir)"
5306else
5307 HGVERSION=""
5308 HGTAG=""
5309 HGBRANCH=""
5310fi
5311
Georg Brandl187c1112011-07-03 09:23:20 +02005312
Matthias Klosec4c48422012-10-21 23:05:35 +02005313for ac_prog in python$PACKAGE_VERSION python3 python
5314do
5315 # Extract the first word of "$ac_prog", so it can be a program name with args.
5316set dummy $ac_prog; ac_word=$2
Georg Brandl187c1112011-07-03 09:23:20 +02005317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5318$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005319if ${ac_cv_prog_PYTHON+:} false; then :
Georg Brandl187c1112011-07-03 09:23:20 +02005320 $as_echo_n "(cached) " >&6
5321else
Matthias Klosec4c48422012-10-21 23:05:35 +02005322 if test -n "$PYTHON"; then
5323 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Georg Brandl187c1112011-07-03 09:23:20 +02005324else
5325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5326for as_dir in $PATH
5327do
5328 IFS=$as_save_IFS
5329 test -z "$as_dir" && as_dir=.
5330 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005331 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005332 ac_cv_prog_PYTHON="$ac_prog"
Georg Brandl187c1112011-07-03 09:23:20 +02005333 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5334 break 2
5335 fi
5336done
5337 done
5338IFS=$as_save_IFS
5339
Georg Brandl187c1112011-07-03 09:23:20 +02005340fi
5341fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005342PYTHON=$ac_cv_prog_PYTHON
5343if test -n "$PYTHON"; then
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5345$as_echo "$PYTHON" >&6; }
Georg Brandl187c1112011-07-03 09:23:20 +02005346else
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5348$as_echo "no" >&6; }
5349fi
5350
5351
Matthias Klosec4c48422012-10-21 23:05:35 +02005352 test -n "$PYTHON" && break
5353done
5354test -n "$PYTHON" || PYTHON="not-found"
5355
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005356if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005357 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5358else
5359 ASDLGEN="$PYTHON"
Georg Brandl187c1112011-07-03 09:23:20 +02005360fi
5361
5362
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005363case $MACHDEP in
5364bsdos*|hp*|HP*)
5365 # install -d does not work on BSDI or HP-UX
5366 if test -z "$INSTALL"
5367 then
5368 INSTALL="${srcdir}/install-sh -c"
5369 fi
5370esac
5371ac_aux_dir=
5372for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005373 if test -f "$ac_dir/install-sh"; then
5374 ac_aux_dir=$ac_dir
5375 ac_install_sh="$ac_aux_dir/install-sh -c"
5376 break
5377 elif test -f "$ac_dir/install.sh"; then
5378 ac_aux_dir=$ac_dir
5379 ac_install_sh="$ac_aux_dir/install.sh -c"
5380 break
5381 elif test -f "$ac_dir/shtool"; then
5382 ac_aux_dir=$ac_dir
5383 ac_install_sh="$ac_aux_dir/shtool install -c"
5384 break
5385 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386done
5387if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005388 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389fi
5390
5391# These three variables are undocumented and unsupported,
5392# and are intended to be withdrawn in a future Autoconf release.
5393# They can cause serious problems if a builder's source tree is in a directory
5394# whose full name contains unusual characters.
5395ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5396ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5397ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5398
5399
5400# Find a good install program. We prefer a C program (faster),
5401# so one script is as good as another. But avoid the broken or
5402# incompatible versions:
5403# SysV /etc/install, /usr/sbin/install
5404# SunOS /usr/etc/install
5405# IRIX /sbin/install
5406# AIX /bin/install
5407# AmigaOS /C/install, which installs bootblocks on floppy discs
5408# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5409# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5410# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5411# OS/2's system install, which has a completely different semantic
5412# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005413# Reject install programs that cannot install multiple files.
5414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5415$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005416if test -z "$INSTALL"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08005417if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419else
5420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5421for as_dir in $PATH
5422do
5423 IFS=$as_save_IFS
5424 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 # Account for people who put trailing slashes in PATH elements.
5426case $as_dir/ in #((
5427 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005429 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005430 /usr/ucb/* ) ;;
5431 *)
5432 # OSF1 and SCO ODT 3.0 have their own names for install.
5433 # Don't use installbsd from OSF since it installs stuff as root
5434 # by default.
5435 for ac_prog in ginstall scoinst install; do
5436 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005437 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005438 if test $ac_prog = install &&
5439 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5440 # AIX install. It has an incompatible calling convention.
5441 :
5442 elif test $ac_prog = install &&
5443 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5444 # program-specific install script used by HP pwplus--don't use.
5445 :
5446 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 rm -rf conftest.one conftest.two conftest.dir
5448 echo one > conftest.one
5449 echo two > conftest.two
5450 mkdir conftest.dir
5451 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5452 test -s conftest.one && test -s conftest.two &&
5453 test -s conftest.dir/conftest.one &&
5454 test -s conftest.dir/conftest.two
5455 then
5456 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5457 break 3
5458 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459 fi
5460 fi
5461 done
5462 done
5463 ;;
5464esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005465
5466 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005467IFS=$as_save_IFS
5468
Matthias Kloseb9621712010-04-24 17:59:49 +00005469rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470
5471fi
5472 if test "${ac_cv_path_install+set}" = set; then
5473 INSTALL=$ac_cv_path_install
5474 else
5475 # As a last resort, use the slow shell script. Don't cache a
5476 # value for INSTALL within a source directory, because that will
5477 # break other packages using the cache if that directory is
5478 # removed, or if the value is a relative name.
5479 INSTALL=$ac_install_sh
5480 fi
5481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5483$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484
5485# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5486# It thinks the first close brace ends the variable substitution.
5487test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5488
5489test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5490
5491test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5492
Trent Nelsona45afca2012-08-30 14:32:02 +00005493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5494$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5495if test -z "$MKDIR_P"; then
5496 if ${ac_cv_path_mkdir+:} false; then :
5497 $as_echo_n "(cached) " >&6
5498else
5499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5500for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5501do
5502 IFS=$as_save_IFS
5503 test -z "$as_dir" && as_dir=.
5504 for ac_prog in mkdir gmkdir; do
5505 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005506 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsona45afca2012-08-30 14:32:02 +00005507 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5508 'mkdir (GNU coreutils) '* | \
5509 'mkdir (coreutils) '* | \
5510 'mkdir (fileutils) '4.1*)
5511 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5512 break 3;;
5513 esac
5514 done
5515 done
5516 done
5517IFS=$as_save_IFS
5518
5519fi
5520
5521 test -d ./--version && rmdir ./--version
5522 if test "${ac_cv_path_mkdir+set}" = set; then
5523 MKDIR_P="$ac_cv_path_mkdir -p"
5524 else
5525 # As a last resort, use the slow shell script. Don't cache a
5526 # value for MKDIR_P within a source directory, because that will
5527 # break other packages using the cache if that directory is
5528 # removed, or if the value is a relative name.
5529 MKDIR_P="$ac_install_sh -d"
5530 fi
5531fi
5532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5533$as_echo "$MKDIR_P" >&6; }
5534
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005535
5536# Not every filesystem supports hard links
5537
5538if test -z "$LN" ; then
5539 case $ac_sys_system in
5540 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541 *) LN=ln;;
5542 esac
5543fi
5544
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005545# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005546
5547ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005548
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5551$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552
5553# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005554if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555 withval=$with_pydebug;
5556if test "$withval" != no
5557then
5558
Matthias Kloseb9621712010-04-24 17:59:49 +00005559$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560
Matthias Kloseb9621712010-04-24 17:59:49 +00005561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5562$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005564 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005565else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567fi
5568else
Matthias Kloseb9621712010-04-24 17:59:49 +00005569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5570$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005571fi
5572
5573
5574# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5575# merged with this chunk of code?
5576
5577# Optimizer/debugger flags
5578# ------------------------
5579# (The following bit of code is complicated enough - please keep things
5580# indented properly. Just pretend you're editing Python code. ;-)
5581
5582# There are two parallel sets of case statements below, one that checks to
5583# see if OPT was set and one that does BASECFLAGS setting based upon
5584# compiler and platform. BASECFLAGS tweaks need to be made even if the
5585# user set OPT.
5586
5587# tweak OPT based on compiler and platform, only if the user didn't set
5588# it on the command line
5589
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005590if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591then
5592 case $GCC in
5593 yes)
5594 if test "$CC" != 'g++' ; then
5595 STRICT_PROTO="-Wstrict-prototypes"
5596 fi
5597 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5598 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5599 WRAP="-fwrapv"
5600 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005601
5602 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005603 case $CC in
5604 *clang*) WRAP="-fwrapv"
5605 ;;
5606 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005607
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608 case $ac_cv_prog_cc_g in
5609 yes)
5610 if test "$Py_DEBUG" = 'true' ; then
5611 # Optimization messes up debuggers, so turn it off for
5612 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005613 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614 else
5615 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5616 fi
5617 ;;
5618 *)
5619 OPT="-O3 -Wall $STRICT_PROTO"
5620 ;;
5621 esac
5622 case $ac_sys_system in
5623 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5624 ;;
5625 esac
5626 ;;
5627
5628 *)
5629 OPT="-O"
5630 ;;
5631 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632fi
5633
5634
5635
5636# The -arch flags for universal builds on OSX
5637UNIVERSAL_ARCH_FLAGS=
5638
5639
5640# tweak BASECFLAGS based on compiler and platform
5641case $GCC in
5642yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005643 # Python doesn't violate C99 aliasing rules, but older versions of
5644 # GCC produce warnings for legal Python code. Enable
5645 # -fno-strict-aliasing on versions of GCC that support but produce
5646 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5648$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649 ac_save_cc="$CC"
5650 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005651 save_CFLAGS="$CFLAGS"
Gregory P. Smith69140482012-01-16 02:05:55 -08005652 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005653 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005654else
Matthias Kloseb9621712010-04-24 17:59:49 +00005655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005657
Matthias Kloseb159a552010-04-25 21:00:44 +00005658
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005659int
5660main ()
5661{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005662
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005663 ;
5664 return 0;
5665}
Matthias Kloseb159a552010-04-25 21:00:44 +00005666
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005668if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005669
5670 CC="$ac_save_cc -fstrict-aliasing"
5671 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005673/* end confdefs.h. */
5674
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005675 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005676int
5677main ()
5678{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005679double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005680 ;
5681 return 0;
5682}
Matthias Kloseb159a552010-04-25 21:00:44 +00005683
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005685if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005686
5687 ac_cv_no_strict_aliasing=no
5688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689else
Matthias Kloseb159a552010-04-25 21:00:44 +00005690
5691 ac_cv_no_strict_aliasing=yes
5692
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005693fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005695
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005696else
Matthias Kloseb159a552010-04-25 21:00:44 +00005697
5698 ac_cv_no_strict_aliasing=no
5699
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005702fi
5703
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005704 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5707$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005708 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709 then
5710 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5711 fi
5712
5713 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5714 # support. Without this, treatment of subnormals doesn't follow
5715 # the standard.
5716 case $ac_sys_machine in
5717 alpha*)
5718 BASECFLAGS="$BASECFLAGS -mieee"
5719 ;;
5720 esac
5721
5722 case $ac_sys_system in
5723 SCO_SV*)
5724 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5725 ;;
5726 # is there any other compiler on Darwin besides gcc?
5727 Darwin*)
5728 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5729 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005730 if test "${CC}" = gcc
5731 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5733$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005734 case "${UNIVERSALSDK}" in
5735 */MacOSX10.4u.sdk)
5736 # Build using 10.4 SDK, force usage of gcc when the
5737 # compiler is gcc, otherwise the user will get very
5738 # confusing error messages when building on OSX 10.6
5739 CC=gcc-4.0
5740 CPP=cpp-4.0
5741 ;;
5742 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5744$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005745 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746
5747
5748 if test "${enable_universalsdk}"; then
5749 UNIVERSAL_ARCH_FLAGS=""
5750 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5751 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5752 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005753 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5755 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005756 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005757 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758
5759 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5760 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005761 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005762 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005764 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5765 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005766 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005767 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005768
5769 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5770 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005771 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005772 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005773
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005775 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776
5777 fi
5778
5779
Ronald Oussoren666028b2010-04-18 19:07:43 +00005780 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5781 if test "${UNIVERSALSDK}" != "/"
5782 then
5783 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5784 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005785 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786 fi
5787 fi
5788
5789 # Calculate the right deployment target for this build.
5790 #
5791 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5792 if test ${cur_target} '>' 10.2; then
5793 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005794 if test ${enable_universalsdk}; then
5795 if test "${UNIVERSAL_ARCHS}" = "all"; then
5796 # Ensure that the default platform for a
5797 # 4-way universal build is OSX 10.5,
5798 # that's the first OS release where
5799 # 4-way builds make sense.
5800 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005801
5802 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5803 cur_target='10.5'
5804
5805 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5806 cur_target='10.5'
5807
5808 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5809 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005810 fi
5811 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005812 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005813 # On Intel macs default to a deployment
5814 # target of 10.4, that's the first OSX
5815 # release with Intel support.
5816 cur_target="10.4"
5817 fi
5818 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819 fi
5820 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5821
5822 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5823 # environment with a value that is the same as what we'll use
5824 # in the Makefile to ensure that we'll get the same compiler
5825 # environment during configure and build time.
5826 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5827 export MACOSX_DEPLOYMENT_TARGET
5828 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5829
5830 ;;
5831 OSF*)
5832 BASECFLAGS="$BASECFLAGS -mieee"
5833 ;;
5834 esac
5835 ;;
5836
5837*)
5838 case $ac_sys_system in
5839 OpenUNIX*|UnixWare*)
5840 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5841 ;;
5842 OSF*)
5843 BASECFLAGS="$BASECFLAGS -ieee -std"
5844 ;;
5845 SCO_SV*)
5846 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5847 ;;
5848 esac
5849 ;;
5850esac
5851
5852if test "$Py_DEBUG" = 'true'; then
5853 :
5854else
5855 OPT="-DNDEBUG $OPT"
5856fi
5857
5858if test "$ac_arch_flags"
5859then
5860 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5861fi
5862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863# Check whether GCC supports PyArg_ParseTuple format
5864if test "$GCC" = "yes"
5865then
Matthias Kloseb9621712010-04-24 17:59:49 +00005866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5867$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868 save_CFLAGS=$CFLAGS
5869 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871/* end confdefs.h. */
5872
5873 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874int
5875main ()
5876{
5877
5878 ;
5879 return 0;
5880}
Matthias Kloseb159a552010-04-25 21:00:44 +00005881
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005883if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884
Matthias Kloseb159a552010-04-25 21:00:44 +00005885
Matthias Kloseb9621712010-04-24 17:59:49 +00005886$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887
Matthias Kloseb159a552010-04-25 21:00:44 +00005888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005889$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005890
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891else
Matthias Kloseb159a552010-04-25 21:00:44 +00005892
5893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005894$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895
5896fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5898 CFLAGS=$save_CFLAGS
5899fi
5900
5901# On some compilers, pthreads are available without further options
5902# (e.g. MacOS X). On some of these systems, the compiler will not
5903# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5904# So we have to see first whether pthreads are available without
5905# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5907$as_echo_n "checking whether pthreads are available without options... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005908if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005909 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910else
Matthias Kloseb9621712010-04-24 17:59:49 +00005911 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 ac_cv_pthread_is_default=no
5913else
Matthias Kloseb9621712010-04-24 17:59:49 +00005914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915/* end confdefs.h. */
5916
5917#include <pthread.h>
5918
5919void* routine(void* p){return NULL;}
5920
5921int main(){
5922 pthread_t p;
5923 if(pthread_create(&p,NULL,routine,NULL)!=0)
5924 return 1;
5925 (void)pthread_detach(p);
5926 return 0;
5927}
5928
5929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005930if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931
5932 ac_cv_pthread_is_default=yes
5933 ac_cv_kthread=no
5934 ac_cv_pthread=no
5935
5936else
Matthias Kloseb9621712010-04-24 17:59:49 +00005937 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5940 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941fi
5942
5943
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944fi
5945
Matthias Kloseb9621712010-04-24 17:59:49 +00005946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5947$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948
5949
5950if test $ac_cv_pthread_is_default = yes
5951then
5952 ac_cv_kpthread=no
5953else
5954# -Kpthread, if available, provides the right #defines
5955# and linker options to make pthread_create available
5956# Some compilers won't report that they do not support -Kpthread,
5957# so we need to run a program to see whether it really made the
5958# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5960$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005961if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005962 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963else
5964 ac_save_cc="$CC"
5965CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005966if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967 ac_cv_kpthread=no
5968else
Matthias Kloseb9621712010-04-24 17:59:49 +00005969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970/* end confdefs.h. */
5971
5972#include <pthread.h>
5973
5974void* routine(void* p){return NULL;}
5975
5976int main(){
5977 pthread_t p;
5978 if(pthread_create(&p,NULL,routine,NULL)!=0)
5979 return 1;
5980 (void)pthread_detach(p);
5981 return 0;
5982}
5983
5984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005985if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 ac_cv_kpthread=yes
5987else
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5991 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992fi
5993
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994CC="$ac_save_cc"
5995fi
5996
Matthias Kloseb9621712010-04-24 17:59:49 +00005997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5998$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999fi
6000
6001if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6002then
6003# -Kthread, if available, provides the right #defines
6004# and linker options to make pthread_create available
6005# Some compilers won't report that they do not support -Kthread,
6006# so we need to run a program to see whether it really made the
6007# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6009$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006010if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006011 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012else
6013 ac_save_cc="$CC"
6014CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006015if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016 ac_cv_kthread=no
6017else
Matthias Kloseb9621712010-04-24 17:59:49 +00006018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019/* end confdefs.h. */
6020
6021#include <pthread.h>
6022
6023void* routine(void* p){return NULL;}
6024
6025int main(){
6026 pthread_t p;
6027 if(pthread_create(&p,NULL,routine,NULL)!=0)
6028 return 1;
6029 (void)pthread_detach(p);
6030 return 0;
6031}
6032
6033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006034if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035 ac_cv_kthread=yes
6036else
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6040 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041fi
6042
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043CC="$ac_save_cc"
6044fi
6045
Matthias Kloseb9621712010-04-24 17:59:49 +00006046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6047$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048fi
6049
6050if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6051then
6052# -pthread, if available, provides the right #defines
6053# and linker options to make pthread_create available
6054# Some compilers won't report that they do not support -pthread,
6055# so we need to run a program to see whether it really made the
6056# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6058$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006059if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061else
6062 ac_save_cc="$CC"
6063CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006064if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065 ac_cv_pthread=no
6066else
Matthias Kloseb9621712010-04-24 17:59:49 +00006067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068/* end confdefs.h. */
6069
6070#include <pthread.h>
6071
6072void* routine(void* p){return NULL;}
6073
6074int main(){
6075 pthread_t p;
6076 if(pthread_create(&p,NULL,routine,NULL)!=0)
6077 return 1;
6078 (void)pthread_detach(p);
6079 return 0;
6080}
6081
6082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006083if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006084 ac_cv_pthread=yes
6085else
Matthias Kloseb9621712010-04-24 17:59:49 +00006086 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006088rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6089 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090fi
6091
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092CC="$ac_save_cc"
6093fi
6094
Matthias Kloseb9621712010-04-24 17:59:49 +00006095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6096$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097fi
6098
6099# If we have set a CC compiler flag for thread support then
6100# check if it works for CXX, too.
6101ac_cv_cxx_thread=no
6102if test ! -z "$CXX"
6103then
Matthias Kloseb9621712010-04-24 17:59:49 +00006104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6105$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106ac_save_cxx="$CXX"
6107
6108if test "$ac_cv_kpthread" = "yes"
6109then
6110 CXX="$CXX -Kpthread"
6111 ac_cv_cxx_thread=yes
6112elif test "$ac_cv_kthread" = "yes"
6113then
6114 CXX="$CXX -Kthread"
6115 ac_cv_cxx_thread=yes
6116elif test "$ac_cv_pthread" = "yes"
6117then
6118 CXX="$CXX -pthread"
6119 ac_cv_cxx_thread=yes
6120fi
6121
6122if test $ac_cv_cxx_thread = yes
6123then
6124 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6125 $CXX -c conftest.$ac_ext 2>&5
6126 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6127 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6128 then
6129 ac_cv_cxx_thread=yes
6130 else
6131 ac_cv_cxx_thread=no
6132 fi
6133 rm -fr conftest*
6134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6136$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137fi
6138CXX="$ac_save_cxx"
6139
6140
6141# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6143$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006144if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006145 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146else
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148/* end confdefs.h. */
6149#include <stdlib.h>
6150#include <stdarg.h>
6151#include <string.h>
6152#include <float.h>
6153
6154int
6155main ()
6156{
6157
6158 ;
6159 return 0;
6160}
6161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006162if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163 ac_cv_header_stdc=yes
6164else
Matthias Kloseb9621712010-04-24 17:59:49 +00006165 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6168
6169if test $ac_cv_header_stdc = yes; then
6170 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172/* end confdefs.h. */
6173#include <string.h>
6174
6175_ACEOF
6176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006177 $EGREP "memchr" >/dev/null 2>&1; then :
6178
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179else
6180 ac_cv_header_stdc=no
6181fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006182rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183
6184fi
6185
6186if test $ac_cv_header_stdc = yes; then
6187 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006189/* end confdefs.h. */
6190#include <stdlib.h>
6191
6192_ACEOF
6193if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006194 $EGREP "free" >/dev/null 2>&1; then :
6195
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196else
6197 ac_cv_header_stdc=no
6198fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006199rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200
6201fi
6202
6203if test $ac_cv_header_stdc = yes; then
6204 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006205 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006206 :
6207else
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006209/* end confdefs.h. */
6210#include <ctype.h>
6211#include <stdlib.h>
6212#if ((' ' & 0x0FF) == 0x020)
6213# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6214# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6215#else
6216# define ISLOWER(c) \
6217 (('a' <= (c) && (c) <= 'i') \
6218 || ('j' <= (c) && (c) <= 'r') \
6219 || ('s' <= (c) && (c) <= 'z'))
6220# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6221#endif
6222
6223#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6224int
6225main ()
6226{
6227 int i;
6228 for (i = 0; i < 256; i++)
6229 if (XOR (islower (i), ISLOWER (i))
6230 || toupper (i) != TOUPPER (i))
6231 return 2;
6232 return 0;
6233}
6234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006235if ac_fn_c_try_run "$LINENO"; then :
6236
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237else
Matthias Kloseb9621712010-04-24 17:59:49 +00006238 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6241 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006242fi
6243
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244fi
6245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6247$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006248if test $ac_cv_header_stdc = yes; then
6249
Matthias Kloseb9621712010-04-24 17:59:49 +00006250$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006251
6252fi
6253
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006254for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6255fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006256ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006257shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006258unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006259sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6260sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006261sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Gregory P. Smith8facece2012-01-21 14:01:08 -08006262sys/syscall.h sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006263sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006264sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006265bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006266do :
6267 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6268ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006269if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006270 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006271#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006272_ACEOF
6273
6274fi
6275
Guido van Rossum627b2d71993-12-24 10:39:16 +00006276done
6277
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006278ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006279for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006280 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6282$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006283if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006284 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006285else
Matthias Kloseb9621712010-04-24 17:59:49 +00006286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006287/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006288#include <sys/types.h>
6289#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006290
Martin v. Löwis11437992002-04-12 09:54:03 +00006291int
6292main ()
6293{
6294if ((DIR *) 0)
6295return 0;
6296 ;
6297 return 0;
6298}
6299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006300if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006301 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006302else
Matthias Kloseb9621712010-04-24 17:59:49 +00006303 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006307eval ac_res=\$$as_ac_Header
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6309$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006310if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006311 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006312#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006313_ACEOF
6314
6315ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006316fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006317
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006318done
6319# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6320if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6322$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006323if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006324 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006325else
Martin v. Löwis11437992002-04-12 09:54:03 +00006326 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006329
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006330/* Override any GCC internal prototype to avoid an error.
6331 Use char because int might match the return type of a GCC
6332 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006333#ifdef __cplusplus
6334extern "C"
6335#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006336char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006337int
6338main ()
6339{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006340return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006341 ;
6342 return 0;
6343}
6344_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006345for ac_lib in '' dir; do
6346 if test -z "$ac_lib"; then
6347 ac_res="none required"
6348 else
6349 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006350 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006351 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006352 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006353 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006354fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006355rm -f core conftest.err conftest.$ac_objext \
6356 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006357 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006358 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006360done
Gregory P. Smith69140482012-01-16 02:05:55 -08006361if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006362
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006363else
6364 ac_cv_search_opendir=no
6365fi
6366rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006367LIBS=$ac_func_search_save_LIBS
6368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6370$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006371ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006372if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006373 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006374
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006375fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006376
Michael W. Hudson54241132001-12-07 15:38:26 +00006377else
Matthias Kloseb9621712010-04-24 17:59:49 +00006378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6379$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006380if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006381 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006382else
6383 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006386
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006387/* Override any GCC internal prototype to avoid an error.
6388 Use char because int might match the return type of a GCC
6389 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006390#ifdef __cplusplus
6391extern "C"
6392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006393char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006394int
6395main ()
6396{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006397return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006398 ;
6399 return 0;
6400}
6401_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006402for ac_lib in '' x; do
6403 if test -z "$ac_lib"; then
6404 ac_res="none required"
6405 else
6406 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006407 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006408 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006409 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006410 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006412rm -f core conftest.err conftest.$ac_objext \
6413 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006414 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006415 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006417done
Gregory P. Smith69140482012-01-16 02:05:55 -08006418if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420else
6421 ac_cv_search_opendir=no
6422fi
6423rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006424LIBS=$ac_func_search_save_LIBS
6425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6427$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006428ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006429if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006430 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006431
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006432fi
6433
6434fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006435
Matthias Kloseb9621712010-04-24 17:59:49 +00006436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6437$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006438if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006439 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006440else
Matthias Kloseb9621712010-04-24 17:59:49 +00006441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006442/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006443#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006444int
6445main ()
6446{
6447return makedev(0, 0);
6448 ;
6449 return 0;
6450}
6451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006452if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006453 ac_cv_header_sys_types_h_makedev=yes
6454else
Matthias Kloseb9621712010-04-24 17:59:49 +00006455 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006457rm -f core conftest.err conftest.$ac_objext \
6458 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006459
6460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6462$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006463
6464if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006465ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006466if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006467
Matthias Kloseb9621712010-04-24 17:59:49 +00006468$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006469
6470fi
6471
6472
6473
6474 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006475 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006476if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006477
Matthias Kloseb9621712010-04-24 17:59:49 +00006478$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006479
6480fi
6481
6482
6483 fi
6484fi
6485
Michael W. Hudson54241132001-12-07 15:38:26 +00006486
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006487# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006488for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006489do :
6490 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006491#ifdef HAVE_CURSES_H
6492#include <curses.h>
6493#endif
6494
Matthias Kloseb9621712010-04-24 17:59:49 +00006495"
Gregory P. Smith69140482012-01-16 02:05:55 -08006496if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006497 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006498#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006499_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006500
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006501fi
6502
6503done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006504
6505
Martin v. Löwis11017b12006-01-14 18:12:57 +00006506# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006507for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006508do :
6509 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 +00006510#ifdef HAVE_ASM_TYPES_H
6511#include <asm/types.h>
6512#endif
6513#ifdef HAVE_SYS_SOCKET_H
6514#include <sys/socket.h>
6515#endif
6516
Matthias Kloseb9621712010-04-24 17:59:49 +00006517"
Gregory P. Smith69140482012-01-16 02:05:55 -08006518if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006519 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006520#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006521_ACEOF
6522
6523fi
6524
6525done
6526
6527
Guido van Rossum627b2d71993-12-24 10:39:16 +00006528# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006529was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6531$as_echo_n "checking for clock_t in time.h... " >&6; }
6532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006533/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006534#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006535
6536_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006538 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006539 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006540else
Martin v. Löwis11437992002-04-12 09:54:03 +00006541
6542
Matthias Kloseb9621712010-04-24 17:59:49 +00006543$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006544
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006545
Guido van Rossum627b2d71993-12-24 10:39:16 +00006546fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006547rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006548
Matthias Kloseb9621712010-04-24 17:59:49 +00006549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6550$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006551
Neal Norwitz11690112002-07-30 01:08:28 +00006552# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6554$as_echo_n "checking for makedev... " >&6; }
6555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006556/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006557
Jesus Cea740f53a2010-04-28 11:35:30 +00006558#if defined(MAJOR_IN_MKDEV)
6559#include <sys/mkdev.h>
6560#elif defined(MAJOR_IN_SYSMACROS)
6561#include <sys/sysmacros.h>
6562#else
6563#include <sys/types.h>
6564#endif
6565
Neal Norwitz11690112002-07-30 01:08:28 +00006566int
6567main ()
6568{
Jesus Cea740f53a2010-04-28 11:35:30 +00006569
6570 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006571 ;
6572 return 0;
6573}
Matthias Kloseb159a552010-04-25 21:00:44 +00006574
Neal Norwitz11690112002-07-30 01:08:28 +00006575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006576if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006577 ac_cv_has_makedev=yes
6578else
Matthias Kloseb9621712010-04-24 17:59:49 +00006579 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006581rm -f core conftest.err conftest.$ac_objext \
6582 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006583if test "$ac_cv_has_makedev" = "no"; then
6584 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006586/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006587
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006588#define _OSF_SOURCE 1
6589#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006590
Neal Norwitz11690112002-07-30 01:08:28 +00006591int
6592main ()
6593{
6594 makedev(0, 0)
6595 ;
6596 return 0;
6597}
6598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006599if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006600 ac_cv_has_makedev=yes
6601else
Matthias Kloseb9621712010-04-24 17:59:49 +00006602 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006604rm -f core conftest.err conftest.$ac_objext \
6605 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006606 if test "$ac_cv_has_makedev" = "yes"; then
6607
Matthias Kloseb9621712010-04-24 17:59:49 +00006608$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006609
6610 fi
6611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6613$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006614if test "$ac_cv_has_makedev" = "yes"; then
6615
Matthias Kloseb9621712010-04-24 17:59:49 +00006616$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006617
6618fi
6619
Martin v. Löwis399a6892002-10-04 10:22:02 +00006620# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6621# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6622# defined, but the compiler does not support pragma redefine_extname,
6623# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6624# structures (such as rlimit64) without declaring them. As a
6625# work-around, disable LFS on such configurations
6626
6627use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6629$as_echo_n "checking Solaris LFS bug... " >&6; }
6630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006631/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006632
6633#define _LARGEFILE_SOURCE 1
6634#define _FILE_OFFSET_BITS 64
6635#include <sys/resource.h>
6636
Martin v. Löwis399a6892002-10-04 10:22:02 +00006637int
6638main ()
6639{
6640struct rlimit foo;
6641 ;
6642 return 0;
6643}
6644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006645if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006646 sol_lfs_bug=no
6647else
Matthias Kloseb9621712010-04-24 17:59:49 +00006648 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6652$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006653if test "$sol_lfs_bug" = "yes"; then
6654 use_lfs=no
6655fi
6656
6657if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006658# Two defines needed to enable largefile support on various platforms
6659# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006660case $ac_sys_system/$ac_sys_release in
6661AIX*)
6662
6663$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6664
6665 ;;
6666esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006667
Matthias Kloseb9621712010-04-24 17:59:49 +00006668$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006669
6670
Matthias Kloseb9621712010-04-24 17:59:49 +00006671$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006672
Martin v. Löwis399a6892002-10-04 10:22:02 +00006673fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006674
Guido van Rossum84e7b241996-08-19 21:59:00 +00006675# Add some code to confdefs.h so that the test for off_t works on SCO
6676cat >> confdefs.h <<\EOF
6677#if defined(SCO_DS)
6678#undef _OFF_T
6679#endif
6680EOF
6681
Guido van Rossumef2255b2000-03-10 22:30:29 +00006682# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006683ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006684if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006685
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006686else
Martin v. Löwis11437992002-04-12 09:54:03 +00006687
6688cat >>confdefs.h <<_ACEOF
6689#define mode_t int
6690_ACEOF
6691
6692fi
6693
Matthias Kloseb9621712010-04-24 17:59:49 +00006694ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006695if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006696
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006697else
Martin v. Löwis11437992002-04-12 09:54:03 +00006698
6699cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006700#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006701_ACEOF
6702
6703fi
6704
Matthias Kloseb9621712010-04-24 17:59:49 +00006705ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006706if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006707
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006708else
Martin v. Löwis11437992002-04-12 09:54:03 +00006709
6710cat >>confdefs.h <<_ACEOF
6711#define pid_t int
6712_ACEOF
6713
6714fi
6715
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006716
Martin v. Löwis11437992002-04-12 09:54:03 +00006717cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006718#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006719_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006720
Matthias Kloseb9621712010-04-24 17:59:49 +00006721ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006722if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006723
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006724else
Martin v. Löwis11437992002-04-12 09:54:03 +00006725
6726cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006727#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006728_ACEOF
6729
6730fi
6731
Matthias Kloseb9621712010-04-24 17:59:49 +00006732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6733$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006734if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006735 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006736else
Matthias Kloseb9621712010-04-24 17:59:49 +00006737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006738/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006739#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006740
6741_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006743 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006744 ac_cv_type_uid_t=yes
6745else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006746 ac_cv_type_uid_t=no
6747fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006748rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006749
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6752$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006753if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006754
Matthias Kloseb9621712010-04-24 17:59:49 +00006755$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006756
6757
Matthias Kloseb9621712010-04-24 17:59:49 +00006758$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006759
6760fi
6761
Mark Dickinsonce31f662012-12-02 13:20:22 +00006762
6763# There are two separate checks for each of the exact-width integer types we
6764# need. First we check whether the type is available using the usual
6765# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
6766# and <stdint.h> where available). We then also use the special type checks of
6767# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
6768# directly, #define's uint32_t to be a suitable type.
6769
6770ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
6771if test "x$ac_cv_type_uint32_t" = xyes; then :
6772
6773$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
6774
6775fi
6776
Matthias Kloseb9621712010-04-24 17:59:49 +00006777ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6778case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006779 no|yes) ;; #(
6780 *)
6781
Matthias Kloseb9621712010-04-24 17:59:49 +00006782$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006783
6784
6785cat >>confdefs.h <<_ACEOF
6786#define uint32_t $ac_cv_c_uint32_t
6787_ACEOF
6788;;
6789 esac
6790
Mark Dickinsonce31f662012-12-02 13:20:22 +00006791
6792ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
6793if test "x$ac_cv_type_uint64_t" = xyes; then :
6794
6795$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
6796
6797fi
6798
Matthias Kloseb9621712010-04-24 17:59:49 +00006799ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6800case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006801 no|yes) ;; #(
6802 *)
6803
Matthias Kloseb9621712010-04-24 17:59:49 +00006804$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006805
6806
6807cat >>confdefs.h <<_ACEOF
6808#define uint64_t $ac_cv_c_uint64_t
6809_ACEOF
6810;;
6811 esac
6812
Mark Dickinsonce31f662012-12-02 13:20:22 +00006813
6814ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
6815if test "x$ac_cv_type_int32_t" = xyes; then :
6816
6817$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
6818
6819fi
6820
Matthias Kloseb9621712010-04-24 17:59:49 +00006821ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6822case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006823 no|yes) ;; #(
6824 *)
6825
6826cat >>confdefs.h <<_ACEOF
6827#define int32_t $ac_cv_c_int32_t
6828_ACEOF
6829;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006830esac
6831
Mark Dickinsonce31f662012-12-02 13:20:22 +00006832
6833ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
6834if test "x$ac_cv_type_int64_t" = xyes; then :
6835
6836$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
6837
6838fi
6839
Matthias Kloseb9621712010-04-24 17:59:49 +00006840ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6841case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006842 no|yes) ;; #(
6843 *)
6844
6845cat >>confdefs.h <<_ACEOF
6846#define int64_t $ac_cv_c_int64_t
6847_ACEOF
6848;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006849esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006850
Mark Dickinsonce31f662012-12-02 13:20:22 +00006851
Matthias Kloseb9621712010-04-24 17:59:49 +00006852ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006853if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006854
Matthias Kloseb9621712010-04-24 17:59:49 +00006855$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006856
6857fi
6858
Jack Jansendd19cf82001-12-06 22:36:17 +00006859
Michael W. Hudson54241132001-12-07 15:38:26 +00006860# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006861# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006862# The cast to long int works around a bug in the HP C Compiler
6863# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6864# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6865# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6867$as_echo_n "checking size of int... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006868if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006870else
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 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 +00006872
Martin v. Löwis11437992002-04-12 09:54:03 +00006873else
Matthias Kloseb9621712010-04-24 17:59:49 +00006874 if test "$ac_cv_type_int" = yes; then
6875 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6876$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006877as_fn_error 77 "cannot compute sizeof (int)
Gregory P. Smith69140482012-01-16 02:05:55 -08006878See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006879 else
6880 ac_cv_sizeof_int=0
6881 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006883
Martin v. Löwis11437992002-04-12 09:54:03 +00006884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6886$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006887
6888
6889
Martin v. Löwis11437992002-04-12 09:54:03 +00006890cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006891#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006892_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006893
6894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895# The cast to long int works around a bug in the HP C Compiler
6896# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6897# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6898# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6900$as_echo_n "checking size of long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006901if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006903else
Matthias Kloseb9621712010-04-24 17:59:49 +00006904 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 +00006905
Martin v. Löwis11437992002-04-12 09:54:03 +00006906else
Matthias Kloseb9621712010-04-24 17:59:49 +00006907 if test "$ac_cv_type_long" = yes; then
6908 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6909$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006910as_fn_error 77 "cannot compute sizeof (long)
Gregory P. Smith69140482012-01-16 02:05:55 -08006911See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006912 else
6913 ac_cv_sizeof_long=0
6914 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006916
Martin v. Löwis11437992002-04-12 09:54:03 +00006917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6919$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006920
6921
6922
Martin v. Löwis11437992002-04-12 09:54:03 +00006923cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006924#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006925_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006926
6927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006928# The cast to long int works around a bug in the HP C Compiler
6929# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6930# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6931# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6933$as_echo_n "checking size of void *... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006934if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006935 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006936else
Matthias Kloseb9621712010-04-24 17:59:49 +00006937 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 +00006938
Martin v. Löwis11437992002-04-12 09:54:03 +00006939else
Matthias Kloseb9621712010-04-24 17:59:49 +00006940 if test "$ac_cv_type_void_p" = yes; then
6941 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006943as_fn_error 77 "cannot compute sizeof (void *)
Gregory P. Smith69140482012-01-16 02:05:55 -08006944See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006945 else
6946 ac_cv_sizeof_void_p=0
6947 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006949
Martin v. Löwis11437992002-04-12 09:54:03 +00006950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6952$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006953
6954
6955
Martin v. Löwis11437992002-04-12 09:54:03 +00006956cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006957#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006958_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006959
6960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006961# The cast to long int works around a bug in the HP C Compiler
6962# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6963# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6964# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6966$as_echo_n "checking size of short... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006967if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006969else
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 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 +00006971
Martin v. Löwis11437992002-04-12 09:54:03 +00006972else
Matthias Kloseb9621712010-04-24 17:59:49 +00006973 if test "$ac_cv_type_short" = yes; then
6974 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006976as_fn_error 77 "cannot compute sizeof (short)
Gregory P. Smith69140482012-01-16 02:05:55 -08006977See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978 else
6979 ac_cv_sizeof_short=0
6980 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006982
Martin v. Löwis11437992002-04-12 09:54:03 +00006983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6985$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006986
6987
6988
Martin v. Löwis11437992002-04-12 09:54:03 +00006989cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006990#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006991_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006992
6993
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006994# The cast to long int works around a bug in the HP C Compiler
6995# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6996# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6997# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6999$as_echo_n "checking size of float... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007000if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007001 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007002else
Matthias Kloseb9621712010-04-24 17:59:49 +00007003 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 +00007004
Martin v. Löwis11437992002-04-12 09:54:03 +00007005else
Matthias Kloseb9621712010-04-24 17:59:49 +00007006 if test "$ac_cv_type_float" = yes; then
7007 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007009as_fn_error 77 "cannot compute sizeof (float)
Gregory P. Smith69140482012-01-16 02:05:55 -08007010See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007011 else
7012 ac_cv_sizeof_float=0
7013 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007015
Martin v. Löwis11437992002-04-12 09:54:03 +00007016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7018$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007019
7020
7021
Martin v. Löwis11437992002-04-12 09:54:03 +00007022cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007023#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007024_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007025
7026
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007027# The cast to long int works around a bug in the HP C Compiler
7028# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7029# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7030# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7032$as_echo_n "checking size of double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007033if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007034 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007035else
Matthias Kloseb9621712010-04-24 17:59:49 +00007036 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 +00007037
Martin v. Löwis11437992002-04-12 09:54:03 +00007038else
Matthias Kloseb9621712010-04-24 17:59:49 +00007039 if test "$ac_cv_type_double" = yes; then
7040 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7041$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007042as_fn_error 77 "cannot compute sizeof (double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007043See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044 else
7045 ac_cv_sizeof_double=0
7046 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007048
Martin v. Löwis11437992002-04-12 09:54:03 +00007049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7051$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007052
7053
7054
Martin v. Löwis11437992002-04-12 09:54:03 +00007055cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007056#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007057_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007058
7059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007060# The cast to long int works around a bug in the HP C Compiler
7061# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7062# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7063# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7065$as_echo_n "checking size of fpos_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007066if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007067 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007068else
Matthias Kloseb9621712010-04-24 17:59:49 +00007069 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 +00007070
Martin v. Löwis11437992002-04-12 09:54:03 +00007071else
Matthias Kloseb9621712010-04-24 17:59:49 +00007072 if test "$ac_cv_type_fpos_t" = yes; then
7073 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7074$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007075as_fn_error 77 "cannot compute sizeof (fpos_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007076See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077 else
7078 ac_cv_sizeof_fpos_t=0
7079 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007080fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007081
Martin v. Löwis11437992002-04-12 09:54:03 +00007082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7084$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007085
7086
7087
Martin v. Löwis11437992002-04-12 09:54:03 +00007088cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007089#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007090_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007091
Michael W. Hudson54241132001-12-07 15:38:26 +00007092
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007093# The cast to long int works around a bug in the HP C Compiler
7094# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7095# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7096# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7098$as_echo_n "checking size of size_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007099if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007100 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007101else
Matthias Kloseb9621712010-04-24 17:59:49 +00007102 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 +00007103
Martin v. Löwis18e16552006-02-15 17:27:45 +00007104else
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 if test "$ac_cv_type_size_t" = yes; then
7106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007108as_fn_error 77 "cannot compute sizeof (size_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007109See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007110 else
7111 ac_cv_sizeof_size_t=0
7112 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007114
Martin v. Löwis18e16552006-02-15 17:27:45 +00007115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7117$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007118
7119
7120
Martin v. Löwis18e16552006-02-15 17:27:45 +00007121cat >>confdefs.h <<_ACEOF
7122#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7123_ACEOF
7124
7125
Christian Heimes400adb02008-02-01 08:12:03 +00007126# The cast to long int works around a bug in the HP C Compiler
7127# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7128# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7129# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7131$as_echo_n "checking size of pid_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007132if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007133 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007134else
Matthias Kloseb9621712010-04-24 17:59:49 +00007135 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 +00007136
Christian Heimes400adb02008-02-01 08:12:03 +00007137else
Matthias Kloseb9621712010-04-24 17:59:49 +00007138 if test "$ac_cv_type_pid_t" = yes; then
7139 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007141as_fn_error 77 "cannot compute sizeof (pid_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007142See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007143 else
7144 ac_cv_sizeof_pid_t=0
7145 fi
7146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007147
Christian Heimes400adb02008-02-01 08:12:03 +00007148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7150$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007151
7152
7153
7154cat >>confdefs.h <<_ACEOF
7155#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7156_ACEOF
7157
7158
Michael W. Hudson54241132001-12-07 15:38:26 +00007159
Matthias Kloseb9621712010-04-24 17:59:49 +00007160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7161$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007162have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007164/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007165
Martin v. Löwis11437992002-04-12 09:54:03 +00007166int
7167main ()
7168{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007169long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007170 ;
7171 return 0;
7172}
7173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007174if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007175
7176
Matthias Kloseb9621712010-04-24 17:59:49 +00007177$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007178
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007179 have_long_long=yes
7180
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7184$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007185if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007186# The cast to long int works around a bug in the HP C Compiler
7187# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7188# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7189# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7191$as_echo_n "checking size of long long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007192if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007193 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007194else
Matthias Kloseb9621712010-04-24 17:59:49 +00007195 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 +00007196
Martin v. Löwis11437992002-04-12 09:54:03 +00007197else
Matthias Kloseb9621712010-04-24 17:59:49 +00007198 if test "$ac_cv_type_long_long" = yes; then
7199 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7200$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007201as_fn_error 77 "cannot compute sizeof (long long)
Gregory P. Smith69140482012-01-16 02:05:55 -08007202See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007203 else
7204 ac_cv_sizeof_long_long=0
7205 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007207
Martin v. Löwis11437992002-04-12 09:54:03 +00007208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7210$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007211
7212
7213
Martin v. Löwis11437992002-04-12 09:54:03 +00007214cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007215#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007216_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007217
Michael W. Hudson54241132001-12-07 15:38:26 +00007218
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007219fi
7220
Matthias Kloseb9621712010-04-24 17:59:49 +00007221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7222$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007223have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007225/* end confdefs.h. */
7226
7227int
7228main ()
7229{
7230long double x; x = (long double)0;
7231 ;
7232 return 0;
7233}
7234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007235if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007236
7237
Matthias Kloseb9621712010-04-24 17:59:49 +00007238$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007239
7240 have_long_double=yes
7241
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007242fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7245$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007246if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007247# The cast to long int works around a bug in the HP C Compiler
7248# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7249# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7250# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7252$as_echo_n "checking size of long double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007253if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007254 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007255else
Matthias Kloseb9621712010-04-24 17:59:49 +00007256 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 +00007257
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007258else
Matthias Kloseb9621712010-04-24 17:59:49 +00007259 if test "$ac_cv_type_long_double" = yes; then
7260 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7261$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007262as_fn_error 77 "cannot compute sizeof (long double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007263See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007264 else
7265 ac_cv_sizeof_long_double=0
7266 fi
7267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007268
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7271$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007272
7273
7274
7275cat >>confdefs.h <<_ACEOF
7276#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7277_ACEOF
7278
7279
7280fi
7281
7282
Matthias Kloseb9621712010-04-24 17:59:49 +00007283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7284$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007285have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007287/* end confdefs.h. */
7288
7289int
7290main ()
7291{
7292_Bool x; x = (_Bool)0;
7293 ;
7294 return 0;
7295}
7296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007297if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007298
7299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007301
7302 have_c99_bool=yes
7303
Thomas Woutersb2137042007-02-01 18:02:27 +00007304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7307$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007308if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007309# The cast to long int works around a bug in the HP C Compiler
7310# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7311# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7312# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7314$as_echo_n "checking size of _Bool... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007315if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007317else
Matthias Kloseb9621712010-04-24 17:59:49 +00007318 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 +00007319
Thomas Woutersb2137042007-02-01 18:02:27 +00007320else
Matthias Kloseb9621712010-04-24 17:59:49 +00007321 if test "$ac_cv_type__Bool" = yes; then
7322 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7323$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007324as_fn_error 77 "cannot compute sizeof (_Bool)
Gregory P. Smith69140482012-01-16 02:05:55 -08007325See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007326 else
7327 ac_cv_sizeof__Bool=0
7328 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007330
Thomas Woutersb2137042007-02-01 18:02:27 +00007331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7333$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007334
7335
7336
Thomas Woutersb2137042007-02-01 18:02:27 +00007337cat >>confdefs.h <<_ACEOF
7338#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7339_ACEOF
7340
7341
7342fi
7343
Matthias Kloseb9621712010-04-24 17:59:49 +00007344ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007345 #include <stdint.h>
7346 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007347 #ifdef HAVE_INTTYPES_H
7348 #include <inttypes.h>
7349 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007350"
Gregory P. Smith69140482012-01-16 02:05:55 -08007351if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007352
7353cat >>confdefs.h <<_ACEOF
7354#define HAVE_UINTPTR_T 1
7355_ACEOF
7356
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007357# The cast to long int works around a bug in the HP C Compiler
7358# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7359# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7360# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7362$as_echo_n "checking size of uintptr_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007363if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007364 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007365else
Matthias Kloseb9621712010-04-24 17:59:49 +00007366 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 +00007367
Martin v. Löwis11437992002-04-12 09:54:03 +00007368else
Matthias Kloseb9621712010-04-24 17:59:49 +00007369 if test "$ac_cv_type_uintptr_t" = yes; then
7370 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7371$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007372as_fn_error 77 "cannot compute sizeof (uintptr_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007373See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007374 else
7375 ac_cv_sizeof_uintptr_t=0
7376 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007377fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007378
Martin v. Löwis11437992002-04-12 09:54:03 +00007379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7381$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007382
7383
7384
Martin v. Löwis11437992002-04-12 09:54:03 +00007385cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007386#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007387_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007388
Michael W. Hudson54241132001-12-07 15:38:26 +00007389
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007390fi
7391
Thomas Wouters89f507f2006-12-13 04:49:30 +00007392
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007393# The cast to long int works around a bug in the HP C Compiler
7394# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7395# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7396# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7398$as_echo_n "checking size of off_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007399if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007400 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007401else
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007403#ifdef HAVE_SYS_TYPES_H
7404#include <sys/types.h>
7405#endif
7406
Matthias Kloseb9621712010-04-24 17:59:49 +00007407"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007408
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007409else
Matthias Kloseb9621712010-04-24 17:59:49 +00007410 if test "$ac_cv_type_off_t" = yes; then
7411 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7412$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007413as_fn_error 77 "cannot compute sizeof (off_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007414See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007415 else
7416 ac_cv_sizeof_off_t=0
7417 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007419
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7422$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007423
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007424
7425
Martin v. Löwis11437992002-04-12 09:54:03 +00007426cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007427#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007428_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007429
Michael W. Hudson54241132001-12-07 15:38:26 +00007430
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007431
Matthias Kloseb9621712010-04-24 17:59:49 +00007432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7433$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007434if test "$have_long_long" = yes
7435then
7436if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007437 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007438
Matthias Kloseb9621712010-04-24 17:59:49 +00007439$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007440
Matthias Kloseb9621712010-04-24 17:59:49 +00007441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7442$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007443else
Matthias Kloseb9621712010-04-24 17:59:49 +00007444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7445$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007446fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007447else
Matthias Kloseb9621712010-04-24 17:59:49 +00007448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7449$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007450fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007451
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007452# The cast to long int works around a bug in the HP C Compiler
7453# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7454# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7455# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7457$as_echo_n "checking size of time_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007458if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007459 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007460else
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007462#ifdef HAVE_SYS_TYPES_H
7463#include <sys/types.h>
7464#endif
7465#ifdef HAVE_TIME_H
7466#include <time.h>
7467#endif
7468
Matthias Kloseb9621712010-04-24 17:59:49 +00007469"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007470
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007471else
Matthias Kloseb9621712010-04-24 17:59:49 +00007472 if test "$ac_cv_type_time_t" = yes; then
7473 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7474$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007475as_fn_error 77 "cannot compute sizeof (time_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007476See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007477 else
7478 ac_cv_sizeof_time_t=0
7479 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007481
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7484$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007485
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007486
7487
Martin v. Löwis11437992002-04-12 09:54:03 +00007488cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007489#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007490_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007491
Michael W. Hudson54241132001-12-07 15:38:26 +00007492
7493
Trent Mick635f6fb2000-08-23 21:33:05 +00007494# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007495ac_save_cc="$CC"
7496if test "$ac_cv_kpthread" = "yes"
7497then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007498elif test "$ac_cv_kthread" = "yes"
7499then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007500elif test "$ac_cv_pthread" = "yes"
7501then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007502fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007503
Matthias Kloseb9621712010-04-24 17:59:49 +00007504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7505$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007506have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007508/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007509
7510 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007511int
7512main ()
7513{
Guido van Rossum12580492000-09-24 16:47:19 +00007514pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007515 ;
7516 return 0;
7517}
Matthias Kloseb159a552010-04-25 21:00:44 +00007518
Martin v. Löwis11437992002-04-12 09:54:03 +00007519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007520if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007521 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7525$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007526if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007527 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007528# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7529# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7530# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7532$as_echo_n "checking size of pthread_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007533if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007535else
Matthias Kloseb9621712010-04-24 17:59:49 +00007536 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007537#ifdef HAVE_PTHREAD_H
7538#include <pthread.h>
7539#endif
7540
Matthias Kloseb9621712010-04-24 17:59:49 +00007541"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007542
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007543else
Matthias Kloseb9621712010-04-24 17:59:49 +00007544 if test "$ac_cv_type_pthread_t" = yes; then
7545 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7546$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007547as_fn_error 77 "cannot compute sizeof (pthread_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007548See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007549 else
7550 ac_cv_sizeof_pthread_t=0
7551 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007553
Trent Mick635f6fb2000-08-23 21:33:05 +00007554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7556$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007557
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007558
7559
Martin v. Löwis11437992002-04-12 09:54:03 +00007560cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007561#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007562_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007563
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007564
Trent Mick635f6fb2000-08-23 21:33:05 +00007565fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007566CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007567
Michael W. Hudson54241132001-12-07 15:38:26 +00007568
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007569case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007570 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007571 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7572 ;;
7573 Darwin/*)
7574 OTHER_LIBTOOL_OPT=""
7575 ;;
7576esac
7577
7578
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007579ARCH_RUN_32BIT=""
7580
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007581case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007582 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007583 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7584 if test "${enable_universalsdk}"; then
7585 :
7586 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007587 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007588 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007589 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007590 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007591 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007592 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007593 if test ${gcc_version} '<' 4.0
7594 then
7595 LIBTOOL_CRUFT="-lcc_dynamic"
7596 else
7597 LIBTOOL_CRUFT=""
7598 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007599 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007600 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007601else
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007603/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007604
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007605 #include <unistd.h>
7606 int main(int argc, char*argv[])
7607 {
7608 if (sizeof(long) == 4) {
7609 return 0;
7610 } else {
7611 return 1;
7612 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007613 }
7614
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007616if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007617 ac_osx_32bit=yes
7618else
Matthias Kloseb9621712010-04-24 17:59:49 +00007619 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7622 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007623fi
7624
7625
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007626 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007627 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007628 i386)
7629 MACOSX_DEFAULT_ARCH="i386"
7630 ;;
7631 ppc)
7632 MACOSX_DEFAULT_ARCH="ppc"
7633 ;;
7634 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007635 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007636 ;;
7637 esac
7638 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007639 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007640 i386)
7641 MACOSX_DEFAULT_ARCH="x86_64"
7642 ;;
7643 ppc)
7644 MACOSX_DEFAULT_ARCH="ppc64"
7645 ;;
7646 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007647 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007648 ;;
7649 esac
7650
7651 #ARCH_RUN_32BIT="true"
7652 fi
7653
7654 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007655 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007656 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007657esac
7658
Matthias Kloseb9621712010-04-24 17:59:49 +00007659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7660$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007661if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007662then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007663 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007664 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007665 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007666
Matthias Kloseb9621712010-04-24 17:59:49 +00007667$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007668
Matthias Kloseb9621712010-04-24 17:59:49 +00007669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7670$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007671 if test $enable_shared = "yes"
7672 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007673 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 +00007674 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007675else
Matthias Kloseb9621712010-04-24 17:59:49 +00007676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7677$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007678fi
7679
Matthias Kloseb9621712010-04-24 17:59:49 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7681$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007682case $ac_sys_system/$ac_sys_release in
7683 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007684
Matthias Kloseb9621712010-04-24 17:59:49 +00007685$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007686
Matthias Kloseb9621712010-04-24 17:59:49 +00007687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7688$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007689 ;;
7690 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7692$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007693 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007694esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007695
Guido van Rossum0a516c91994-09-12 10:58:40 +00007696# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007697
Michael W. Hudson54241132001-12-07 15:38:26 +00007698
7699
7700
7701
Benjamin Peterson99f03762010-04-11 22:15:28 +00007702
Thomas Wouters477c8d52006-05-27 19:21:47 +00007703
Georg Brandlb1441c72009-01-03 22:33:39 +00007704
Thomas Wouters477c8d52006-05-27 19:21:47 +00007705cat >>confdefs.h <<_ACEOF
7706#define SHLIB_EXT "$SO"
7707_ACEOF
7708
Guido van Rossum0a516c91994-09-12 10:58:40 +00007709# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007710# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007711# (Shared libraries in this instance are shared modules to be loaded into
7712# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7714$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007715if test -z "$LDSHARED"
7716then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007717 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007718 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007719 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007720 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007721 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007722 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007723 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007724 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007725 if test "$GCC" = "yes" ; then
7726 LDSHARED='$(CC) -shared'
7727 LDCXXSHARED='$(CXX) -shared'
7728 else
7729 LDSHARED='$(CC) -G'
7730 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007731 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007732 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007733 if test "$GCC" = "yes" ; then
7734 LDSHARED='$(CC) -shared'
7735 LDCXXSHARED='$(CXX) -shared'
7736 else
7737 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007738 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007739 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007740 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007741 LDSHARED='$(CC) -bundle'
7742 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007743 if test "$enable_framework" ; then
7744 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007745 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7746 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007747 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007748 else
7749 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007750 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007751 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007752 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007753 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007754 LDSHARED='$(CC) -bundle'
7755 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007756 if test "$enable_framework" ; then
7757 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007758 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7759 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007760 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007761 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007762 # No framework, use the Python app as bundle-loader
7763 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007764 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007765 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007766 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007767 Darwin/*)
7768 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7769 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007770
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007771 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007772 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007773 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007774 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007775 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007776 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7777 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007778 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007779 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007780 LDSHARED='$(CC) -bundle'
7781 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007782 if test "$enable_framework" ; then
7783 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007784 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7785 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007786 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007787 else
7788 # No framework, use the Python app as bundle-loader
7789 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7790 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007791 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007792 fi
7793 fi
7794 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007795 Linux*|GNU*|QNX*)
7796 LDSHARED='$(CC) -shared'
7797 LDCXXSHARED='$(CXX) -shared';;
7798 BSD/OS*/4*)
7799 LDSHARED="gcc -shared"
7800 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007801 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007802 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007803 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007804 LDSHARED='$(CC) -shared'
7805 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007806 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007807 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007808 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007809 OpenBSD*)
7810 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7811 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007812 LDSHARED='$(CC) -shared $(CCSHARED)'
7813 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007814 else
7815 case `uname -r` in
7816 [01].* | 2.[0-7] | 2.[0-7].*)
7817 LDSHARED="ld -Bshareable ${LDFLAGS}"
7818 ;;
7819 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007820 LDSHARED='$(CC) -shared $(CCSHARED)'
7821 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007822 ;;
7823 esac
7824 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007825 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007826 LDSHARED='$(CC) -shared'
7827 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007828 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007829 if test "$GCC" = "yes" ; then
7830 LDSHARED='$(CC) -shared'
7831 LDCXXSHARED='$(CXX) -shared'
7832 else
7833 LDSHARED='$(CC) -G'
7834 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007835 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007836 SCO_SV*)
7837 LDSHARED='$(CC) -Wl,-G,-Bexport'
7838 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7839 CYGWIN*)
7840 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7841 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007842 *) LDSHARED="ld";;
7843 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7846$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007847LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007848BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007849# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007850# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7852$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007853if test -z "$CCSHARED"
7854then
Guido van Rossum07397971997-04-29 21:49:50 +00007855 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007856 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007857 then CCSHARED="-fPIC";
7858 elif test `uname -p` = sparc;
7859 then CCSHARED="-xcode=pic32";
7860 else CCSHARED="-Kpic";
7861 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007862 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007863 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007864 else CCSHARED="+z";
7865 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007866 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007867 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007868 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007869 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007870 if test "$GCC" = "yes"
7871 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007872 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007873 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007874 SCO_SV*)
7875 if test "$GCC" = "yes"
7876 then CCSHARED="-fPIC"
7877 else CCSHARED="-Kpic -belf"
7878 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007879 IRIX*/6*) case $CC in
7880 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007881 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007882 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007883 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7886$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007887# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007888# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7890$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007891if test -z "$LINKFORSHARED"
7892then
Guido van Rossum07397971997-04-29 21:49:50 +00007893 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007894 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007895 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007896 LINKFORSHARED="-Wl,-E -Wl,+s";;
7897# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007898 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007899 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007900 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007902 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007903 if test "$enable_framework"
7904 then
Jack Jansenda49e192005-01-07 13:08:22 +00007905 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007906 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007907 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007908 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007909 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007910 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007911 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007912 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7913 then
7914 LINKFORSHARED="-Wl,--export-dynamic"
7915 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007916 SunOS/5*) case $CC in
7917 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007918 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007919 then
7920 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007921 fi;;
7922 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007923 CYGWIN*)
7924 if test $enable_shared = "no"
7925 then
7926 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7927 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007928 QNX*)
7929 # -Wl,-E causes the symbols to be added to the dynamic
7930 # symbol table so that they can be found when a module
7931 # is loaded. -N 2048K causes the stack size to be set
7932 # to 2048 kilobytes so that the stack doesn't overflow
7933 # when running test_compile.py.
7934 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007935 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7938$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007939
Michael W. Hudson54241132001-12-07 15:38:26 +00007940
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007941
Matthias Kloseb9621712010-04-24 17:59:49 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7943$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007944if test ! "$LIBRARY" = "$LDLIBRARY"
7945then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007946 case $ac_sys_system in
7947 CYGWIN*)
7948 # Cygwin needs CCSHARED when building extension DLLs
7949 # but not when building the interpreter DLL.
7950 CFLAGSFORSHARED='';;
7951 *)
7952 CFLAGSFORSHARED='$(CCSHARED)'
7953 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7956$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007957
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007958# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7959# library (with --enable-shared).
7960# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007961# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7962# if it is not required, since it creates a dependency of the shared library
7963# to LIBS. This, in turn, means that applications linking the shared libpython
7964# don't need to link LIBS explicitly. The default should be only changed
7965# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007966
Matthias Kloseb9621712010-04-24 17:59:49 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7968$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007969case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007970 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007971 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007972esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7974$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007975
7976
Guido van Rossum627b2d71993-12-24 10:39:16 +00007977# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7979$as_echo_n "checking for dlopen in -ldl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007980if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007981 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007982else
Martin v. Löwis11437992002-04-12 09:54:03 +00007983 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007984LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007987
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988/* Override any GCC internal prototype to avoid an error.
7989 Use char because int might match the return type of a GCC
7990 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007991#ifdef __cplusplus
7992extern "C"
7993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007994char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007995int
7996main ()
7997{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007999 ;
8000 return 0;
8001}
8002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008003if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008005else
Matthias Kloseb9621712010-04-24 17:59:49 +00008006 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008008rm -f core conftest.err conftest.$ac_objext \
8009 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008010LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8013$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008014if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 cat >>confdefs.h <<_ACEOF
8016#define HAVE_LIBDL 1
8017_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008018
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008019 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008020
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008021fi
8022 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8024$as_echo_n "checking for shl_load in -ldld... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008025if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008027else
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008029LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033/* Override any GCC internal prototype to avoid an error.
8034 Use char because int might match the return type of a GCC
8035 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008036#ifdef __cplusplus
8037extern "C"
8038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008039char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008040int
8041main ()
8042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008044 ;
8045 return 0;
8046}
8047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008048if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008049 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008050else
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008053rm -f core conftest.err conftest.$ac_objext \
8054 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008055LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8058$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008059if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 cat >>confdefs.h <<_ACEOF
8061#define HAVE_LIBDLD 1
8062_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008063
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008064 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008066fi
8067 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008068
Georg Brandlb1441c72009-01-03 22:33:39 +00008069# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008070if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8072$as_echo_n "checking for library containing sem_init... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008073if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008075else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008076 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008080/* Override any GCC internal prototype to avoid an error.
8081 Use char because int might match the return type of a GCC
8082 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008083#ifdef __cplusplus
8084extern "C"
8085#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008086char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008087int
8088main ()
8089{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008090return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008091 ;
8092 return 0;
8093}
8094_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095for ac_lib in '' pthread rt posix4; do
8096 if test -z "$ac_lib"; then
8097 ac_res="none required"
8098 else
8099 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008100 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008105rm -f core conftest.err conftest.$ac_objext \
8106 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08008107 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110done
Gregory P. Smith69140482012-01-16 02:05:55 -08008111if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008113else
8114 ac_cv_search_sem_init=no
8115fi
8116rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008117LIBS=$ac_func_search_save_LIBS
8118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8120$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008122if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008124
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008125fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008126 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008127 # posix4 on Solaris 2.6
8128 # pthread (first!) on Linux
8129fi
8130
Martin v. Löwis19d17342003-06-14 21:03:05 +00008131# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8133$as_echo_n "checking for textdomain in -lintl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008134if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008135 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008136else
8137 ac_check_lib_save_LIBS=$LIBS
8138LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008140/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008141
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142/* Override any GCC internal prototype to avoid an error.
8143 Use char because int might match the return type of a GCC
8144 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008145#ifdef __cplusplus
8146extern "C"
8147#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008148char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008149int
8150main ()
8151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008152return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008153 ;
8154 return 0;
8155}
8156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008157if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008158 ac_cv_lib_intl_textdomain=yes
8159else
Matthias Kloseb9621712010-04-24 17:59:49 +00008160 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008162rm -f core conftest.err conftest.$ac_objext \
8163 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008164LIBS=$ac_check_lib_save_LIBS
8165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8167$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008168if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008169
Matthias Kloseb9621712010-04-24 17:59:49 +00008170$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008171
Brett Cannonc6d936e2009-06-07 20:09:53 +00008172 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008173fi
8174
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008175
8176# checks for system dependent C++ extensions support
8177case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008178 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8179$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008181/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008182
Georg Brandl59e87bd2011-02-15 19:48:59 +00008183 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008184int
8185main ()
8186{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008187loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008188 ;
8189 return 0;
8190}
Matthias Kloseb159a552010-04-25 21:00:44 +00008191
Martin v. Löwis11437992002-04-12 09:54:03 +00008192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008193if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008194
Matthias Kloseb159a552010-04-25 21:00:44 +00008195
Matthias Kloseb9621712010-04-24 17:59:49 +00008196$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008197
Matthias Kloseb159a552010-04-25 21:00:44 +00008198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008199$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008200
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008201else
Matthias Kloseb159a552010-04-25 21:00:44 +00008202
8203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008204$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008205
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008207rm -f core conftest.err conftest.$ac_objext \
8208 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008209 *) ;;
8210esac
8211
Guido van Rossum70c7f481998-03-26 18:44:10 +00008212# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8214$as_echo_n "checking for t_open in -lnsl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008215if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008216 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008217else
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008219LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223/* Override any GCC internal prototype to avoid an error.
8224 Use char because int might match the return type of a GCC
8225 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008226#ifdef __cplusplus
8227extern "C"
8228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008229char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008230int
8231main ()
8232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008234 ;
8235 return 0;
8236}
8237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008238if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008239 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008240else
Matthias Kloseb9621712010-04-24 17:59:49 +00008241 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008243rm -f core conftest.err conftest.$ac_objext \
8244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008245LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8248$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008249if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008250 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008251fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008252 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8254$as_echo_n "checking for socket in -lsocket... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008255if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008256 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008257else
Martin v. Löwis11437992002-04-12 09:54:03 +00008258 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008259LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263/* Override any GCC internal prototype to avoid an error.
8264 Use char because int might match the return type of a GCC
8265 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008266#ifdef __cplusplus
8267extern "C"
8268#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008269char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008270int
8271main ()
8272{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008273return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 ;
8275 return 0;
8276}
8277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008278if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008279 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008280else
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008283rm -f core conftest.err conftest.$ac_objext \
8284 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008285LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8288$as_echo "$ac_cv_lib_socket_socket" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008289if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008290 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008291fi
8292 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008293
Matthias Kloseb9621712010-04-24 17:59:49 +00008294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8295$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008296
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008298if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008299 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8301$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008302LIBS="$withval $LIBS"
8303
8304else
Matthias Kloseb9621712010-04-24 17:59:49 +00008305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8306$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008307fi
8308
Guido van Rossum7f43da71994-08-01 12:15:30 +00008309
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008310if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008311 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8312set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8314$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008315if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008316 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008317else
8318 case $PKG_CONFIG in
8319 [\\/]* | ?:[\\/]*)
8320 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8321 ;;
8322 *)
8323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8324for as_dir in $PATH
8325do
8326 IFS=$as_save_IFS
8327 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008329 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008330 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008332 break 2
8333 fi
8334done
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008336IFS=$as_save_IFS
8337
8338 ;;
8339esac
8340fi
8341PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8342if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8344$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008345else
Matthias Kloseb9621712010-04-24 17:59:49 +00008346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8347$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008348fi
8349
8350
8351fi
8352if test -z "$ac_cv_path_PKG_CONFIG"; then
8353 ac_pt_PKG_CONFIG=$PKG_CONFIG
8354 # Extract the first word of "pkg-config", so it can be a program name with args.
8355set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8357$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008358if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008360else
8361 case $ac_pt_PKG_CONFIG in
8362 [\\/]* | ?:[\\/]*)
8363 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8364 ;;
8365 *)
8366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8367for as_dir in $PATH
8368do
8369 IFS=$as_save_IFS
8370 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008372 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008373 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008375 break 2
8376 fi
8377done
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008379IFS=$as_save_IFS
8380
8381 ;;
8382esac
8383fi
8384ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8385if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8387$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008388else
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8390$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008391fi
8392
8393 if test "x$ac_pt_PKG_CONFIG" = x; then
8394 PKG_CONFIG=""
8395 else
8396 case $cross_compiling:$ac_tool_warned in
8397yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008398{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8399$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008400ac_tool_warned=yes ;;
8401esac
8402 PKG_CONFIG=$ac_pt_PKG_CONFIG
8403 fi
8404else
8405 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8406fi
8407
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008408
8409# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8411$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008412
8413# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008414if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008415 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008416else
8417 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008418fi
8419
8420
Matthias Kloseb9621712010-04-24 17:59:49 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8422$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008423
8424# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8426$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008427
8428# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008429if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008430 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008431else
8432 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008433fi
8434
8435
8436if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008437 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8438else
8439 LIBFFI_INCLUDEDIR=""
8440fi
8441
8442
Matthias Kloseb9621712010-04-24 17:59:49 +00008443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8444$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008445
Benjamin Peterson076ed002010-10-31 17:11:02 +00008446# Check for support for loadable sqlite extensions
8447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8448$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8449# Check whether --enable-loadable-sqlite-extensions was given.
8450if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8451 enableval=$enable_loadable_sqlite_extensions;
8452else
8453 enable_loadable_sqlite_extensions="no"
8454fi
8455
8456
8457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8458$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8459
Matthias Klose55708cc2009-04-30 08:06:49 +00008460# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8462$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008463
8464# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008465if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008466 withval=$with_dbmliborder;
8467if test x$with_dbmliborder = xyes
8468then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008469as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008470else
8471 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8472 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8473 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008474 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008475 fi
8476 done
8477fi
8478fi
8479
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8481$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008482
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008483# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008484
8485
Matthias Kloseb9621712010-04-24 17:59:49 +00008486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8487$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008488
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008489# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008490if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008491 withval=$with_signal_module;
8492fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008493
8494
8495if test -z "$with_signal_module"
8496then with_signal_module="yes"
8497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8499$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008500
8501if test "${with_signal_module}" = "yes"; then
8502 USE_SIGNAL_MODULE=""
8503 SIGNAL_OBJS=""
8504else
8505 USE_SIGNAL_MODULE="#"
8506 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8507fi
8508
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008509# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008510
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008511USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008512
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8514$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008515
Guido van Rossumec2f0731997-01-22 20:54:01 +00008516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008517# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008518if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8521$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008522LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008523if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008524 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008525fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008526else
Matthias Kloseb9621712010-04-24 17:59:49 +00008527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8528$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008529fi
8530
Martin v. Löwis11437992002-04-12 09:54:03 +00008531
8532# Templates for things AC_DEFINEd more than once.
8533# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008534
8535
Martin v. Löwis11437992002-04-12 09:54:03 +00008536
8537
Matthias Kloseb9621712010-04-24 17:59:49 +00008538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8539$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008540
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008541# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008542if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543 withval=$with_threads;
8544fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008545
8546
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008547# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008549# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008550if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551 withval=$with_thread; with_threads=$with_thread
8552fi
8553
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008554
8555if test -z "$with_threads"
8556then with_threads="yes"
8557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8559$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008560
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008561
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008562if test "$with_threads" = "no"
8563then
8564 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008565elif test "$ac_cv_pthread_is_default" = yes
8566then
Matthias Kloseb9621712010-04-24 17:59:49 +00008567 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008568
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008569 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008571
8572 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008574elif test "$ac_cv_kpthread" = "yes"
8575then
8576 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008577 if test "$ac_cv_cxx_thread" = "yes"; then
8578 CXX="$CXX -Kpthread"
8579 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008580 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008581
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008582 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008583 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008584elif test "$ac_cv_kthread" = "yes"
8585then
8586 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008587 if test "$ac_cv_cxx_thread" = "yes"; then
8588 CXX="$CXX -Kthread"
8589 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008591
8592 posix_threads=yes
8593 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008594elif test "$ac_cv_pthread" = "yes"
8595then
8596 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008597 if test "$ac_cv_cxx_thread" = "yes"; then
8598 CXX="$CXX -pthread"
8599 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008601
8602 posix_threads=yes
8603 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008604else
8605 if test ! -z "$with_threads" -a -d "$with_threads"
8606 then LDFLAGS="$LDFLAGS -L$with_threads"
8607 fi
8608 if test ! -z "$withval" -a -d "$withval"
8609 then LDFLAGS="$LDFLAGS -L$withval"
8610 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008611
8612 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008613 # define _POSIX_THREADS in unistd.h. Some apparently don't
8614 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8616$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008618/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008619
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008620#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008621#ifdef _POSIX_THREADS
8622yes
8623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008624
8625_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008626if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008628 unistd_defines_pthreads=yes
8629else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008630 unistd_defines_pthreads=no
8631fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008632rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008633
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8635$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008636
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008638
Matthias Kloseb9621712010-04-24 17:59:49 +00008639 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08008640if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008641 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008642
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008644
Martin v. Löwis11437992002-04-12 09:54:03 +00008645
Matthias Kloseb9621712010-04-24 17:59:49 +00008646$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008647
8648 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008649 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008650else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008651
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08008653if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008655
Matthias Kloseb9621712010-04-24 17:59:49 +00008656 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008657
Martin v. Löwis11437992002-04-12 09:54:03 +00008658
Matthias Kloseb9621712010-04-24 17:59:49 +00008659$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008660
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008661 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008662else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008663
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008664 # Just looking for pthread_create in libpthread is not enough:
8665 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8666 # So we really have to include pthread.h, and then link.
8667 _libs=$LIBS
8668 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8670$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008672/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008673#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008674
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008675void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008676int
8677main ()
8678{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008679
8680pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 ;
8682 return 0;
8683}
8684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008685if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008686
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8688$as_echo "yes" >&6; }
8689 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008690
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008691 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008692 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008693else
Martin v. Löwis11437992002-04-12 09:54:03 +00008694
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008695 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Gregory P. Smith69140482012-01-16 02:05:55 -08008697if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008699
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008700 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008701 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008702else
Guido van Rossumad678af1998-10-02 14:42:15 +00008703
Matthias Kloseb9621712010-04-24 17:59:49 +00008704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8705$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008706if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008708else
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008710LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714/* Override any GCC internal prototype to avoid an error.
8715 Use char because int might match the return type of a GCC
8716 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008717#ifdef __cplusplus
8718extern "C"
8719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008720char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008721int
8722main ()
8723{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ;
8726 return 0;
8727}
8728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008729if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008731else
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734rm -f core conftest.err conftest.$ac_objext \
8735 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008736LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8739$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008740if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008742
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008743 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008744 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008745 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008746else
Greg Steinadf63d62000-07-05 10:38:09 +00008747
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8749$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008750if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008752else
Martin v. Löwis11437992002-04-12 09:54:03 +00008753 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008754LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008758/* Override any GCC internal prototype to avoid an error.
8759 Use char because int might match the return type of a GCC
8760 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008761#ifdef __cplusplus
8762extern "C"
8763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008764char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008765int
8766main ()
8767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008768return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008769 ;
8770 return 0;
8771}
8772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008773if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008774 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008778rm -f core conftest.err conftest.$ac_objext \
8779 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008780LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8783$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008784if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008786
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008787 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008788 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008789 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008790else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008791
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8793$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008794if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008796else
Martin v. Löwis11437992002-04-12 09:54:03 +00008797 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008798LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008802/* Override any GCC internal prototype to avoid an error.
8803 Use char because int might match the return type of a GCC
8804 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008805#ifdef __cplusplus
8806extern "C"
8807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008808char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008809int
8810main ()
8811{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008813 ;
8814 return 0;
8815}
8816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008817if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008819else
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822rm -f core conftest.err conftest.$ac_objext \
8823 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008824LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8827$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008828if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008830
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008831 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008832 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008833 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008834else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008835
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8837$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008838if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008840else
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008842LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008846/* Override any GCC internal prototype to avoid an error.
8847 Use char because int might match the return type of a GCC
8848 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008849#ifdef __cplusplus
8850extern "C"
8851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008852char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008853int
8854main ()
8855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008856return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ;
8858 return 0;
8859}
8860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008861if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008862 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008863else
Matthias Kloseb9621712010-04-24 17:59:49 +00008864 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008866rm -f core conftest.err conftest.$ac_objext \
8867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008868LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8871$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008872if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008873 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008874
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008875 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008876 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008877 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008878else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008879
Martin v. Löwis130fb172001-07-19 11:00:41 +00008880 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008881fi
8882
Guido van Rossum627b2d71993-12-24 10:39:16 +00008883
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008884fi
8885
Guido van Rossum0be3e491997-05-22 20:33:33 +00008886fi
8887
Guido van Rossum49545951997-12-02 19:28:29 +00008888fi
8889
Guido van Rossumb93a8621998-05-07 13:27:32 +00008890fi
8891
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008893rm -f core conftest.err conftest.$ac_objext \
8894 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008895fi
8896
Martin v. Löwis11437992002-04-12 09:54:03 +00008897
8898fi
8899
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008900
Michael W. Hudson54241132001-12-07 15:38:26 +00008901
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8903$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008904if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008906else
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008908LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912/* Override any GCC internal prototype to avoid an error.
8913 Use char because int might match the return type of a GCC
8914 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008915#ifdef __cplusplus
8916extern "C"
8917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008918char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008919int
8920main ()
8921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008922return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008923 ;
8924 return 0;
8925}
8926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008927if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008929else
Matthias Kloseb9621712010-04-24 17:59:49 +00008930 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008932rm -f core conftest.err conftest.$ac_objext \
8933 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008934LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8937$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008938if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008940
Martin v. Löwis130fb172001-07-19 11:00:41 +00008941 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008942 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008943 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008944fi
8945
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008946
Neal Norwitza978ab02002-11-02 16:58:05 +00008947 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8949$as_echo_n "checking for thr_create in -lthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008950if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008952else
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008954LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008956/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008958/* Override any GCC internal prototype to avoid an error.
8959 Use char because int might match the return type of a GCC
8960 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008961#ifdef __cplusplus
8962extern "C"
8963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008964char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008965int
8966main ()
8967{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008968return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 ;
8970 return 0;
8971}
8972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008973if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008974 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008975else
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008978rm -f core conftest.err conftest.$ac_objext \
8979 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008980LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8983$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008984if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008986
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008987 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008988 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008989 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008990fi
8991
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008992 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008993
Martin v. Löwis130fb172001-07-19 11:00:41 +00008994 if test "$USE_THREAD_MODULE" != "#"
8995 then
8996 # If the above checks didn't disable threads, (at least) OSF1
8997 # needs this '-threads' argument during linking.
8998 case $ac_sys_system in
8999 OSF1) LDLAST=-threads;;
9000 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009001 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009002fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009003
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009004if test "$posix_threads" = "yes"; then
9005 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009006
Matthias Kloseb9621712010-04-24 17:59:49 +00009007$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009008
9009 fi
9010
9011 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9012 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009013 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009014$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009015
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009016 ;;
9017 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009018$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009019
9020 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009021 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009022$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009023
9024 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009025 esac
9026
Matthias Kloseb9621712010-04-24 17:59:49 +00009027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9028$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009029 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009030 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009033 ac_cv_pthread_system_supported=no
9034else
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009036/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009037#include <pthread.h>
9038 void *foo(void *parm) {
9039 return NULL;
9040 }
9041 main() {
9042 pthread_attr_t attr;
9043 pthread_t id;
9044 if (pthread_attr_init(&attr)) exit(-1);
9045 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9046 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9047 exit(0);
9048 }
9049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009050if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009051 ac_cv_pthread_system_supported=yes
9052else
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9056 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009057fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009059
Guido van Rossum627b2d71993-12-24 10:39:16 +00009060fi
9061
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9063$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009064 if test "$ac_cv_pthread_system_supported" = "yes"; then
9065
Matthias Kloseb9621712010-04-24 17:59:49 +00009066$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009067
9068 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009069 for ac_func in pthread_sigmask
9070do :
9071 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Gregory P. Smith69140482012-01-16 02:05:55 -08009072if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009073 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009074#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009075_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009076 case $ac_sys_system in
9077 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009078
Matthias Kloseb9621712010-04-24 17:59:49 +00009079$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009080
9081 ;;
9082 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009083fi
9084done
9085
9086fi
9087
9088
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009089# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009090
Matthias Kloseb9621712010-04-24 17:59:49 +00009091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9092$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009093# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009094if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009095 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009096 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9098$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099 ipv6=no
9100 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9102$as_echo "yes" >&6; }
9103 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104
9105 ipv6=yes
9106 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009107 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009108else
Martin v. Löwis11437992002-04-12 09:54:03 +00009109
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009111/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009112 /* AF_INET6 available check */
9113#include <sys/types.h>
9114#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009115int
9116main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009118int domain = AF_INET6;
9119 ;
9120 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009121}
Martin v. Löwis11437992002-04-12 09:54:03 +00009122_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009123if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9126$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009127 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009128
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009129else
Matthias Kloseb159a552010-04-25 21:00:44 +00009130
Matthias Kloseb9621712010-04-24 17:59:49 +00009131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9132$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009133 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009134
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009135fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009137
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009138if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9140$as_echo_n "checking if RFC2553 API is available... " >&6; }
9141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009142/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009143
9144 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009145#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009146int
9147main ()
9148{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009149struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009150 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009151 ;
9152 return 0;
9153}
Matthias Kloseb159a552010-04-25 21:00:44 +00009154
Martin v. Löwis11437992002-04-12 09:54:03 +00009155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009156if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009157
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009159$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009160 ipv6=yes
9161
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009162else
Matthias Kloseb159a552010-04-25 21:00:44 +00009163
9164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009165$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009166 ipv6=no
9167
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009170fi
9171
9172if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009173 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009174
9175fi
9176
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009177fi
9178
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009179
9180ipv6type=unknown
9181ipv6lib=none
9182ipv6trylibc=no
9183
9184if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9186$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009187 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9188 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009189 case $i in
9190 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009192/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009193
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009194#include <netinet/in.h>
9195#ifdef IPV6_INRIA_VERSION
9196yes
9197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009198_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009200 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009201 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009202fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009203rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009204
9205 ;;
9206 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009208/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009209
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009210#include <netinet/in.h>
9211#ifdef __KAME__
9212yes
9213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009214_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009216 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009217 ipv6type=$i;
9218 ipv6lib=inet6
9219 ipv6libdir=/usr/local/v6/lib
9220 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009221fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009222rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009223
9224 ;;
9225 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009227/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009228
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009229#include <features.h>
9230#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9231yes
9232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009233_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009235 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009236 ipv6type=$i;
9237 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009238fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009239rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009240
9241 ;;
9242 linux-inet6)
9243 if test -d /usr/inet6; then
9244 ipv6type=$i
9245 ipv6lib=inet6
9246 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009247 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009248 fi
9249 ;;
9250 solaris)
9251 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009252 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009253 ipv6type=$i
9254 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009255 fi
9256 fi
9257 ;;
9258 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009260/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009261
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009262#include <sys/param.h>
9263#ifdef _TOSHIBA_INET6
9264yes
9265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009266_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009267if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009268 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009269 ipv6type=$i;
9270 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009271 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009272fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009273rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009274
9275 ;;
9276 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009278/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009279
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009280#include </usr/local/v6/include/sys/v6config.h>
9281#ifdef __V6D__
9282yes
9283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009284_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009286 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009287 ipv6type=$i;
9288 ipv6lib=v6;
9289 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009290 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009291fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009292rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009293
9294 ;;
9295 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009297/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009298
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009299#include <sys/param.h>
9300#ifdef _ZETA_MINAMI_INET6
9301yes
9302#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009303_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009305 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009306 ipv6type=$i;
9307 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009308 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009309fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009310rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009311
9312 ;;
9313 esac
9314 if test "$ipv6type" != "unknown"; then
9315 break
9316 fi
9317 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9319$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009320fi
9321
9322if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9323 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9324 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9325 echo "using lib$ipv6lib"
9326 else
9327 if test $ipv6trylibc = "yes"; then
9328 echo "using libc"
9329 else
9330 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9331 echo "You need to fetch lib$ipv6lib.a from appropriate"
9332 echo 'ipv6 kit and compile beforehand.'
9333 exit 1
9334 fi
9335 fi
9336fi
9337
Matthias Kloseb9621712010-04-24 17:59:49 +00009338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9339$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009341/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009342
9343 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009344int
9345main ()
9346{
9347FSIORefNum fRef = 0
9348 ;
9349 return 0;
9350}
Matthias Kloseb159a552010-04-25 21:00:44 +00009351
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009353if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009354
Matthias Kloseb159a552010-04-25 21:00:44 +00009355
Matthias Kloseb9621712010-04-24 17:59:49 +00009356$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009357
Matthias Kloseb9621712010-04-24 17:59:49 +00009358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9359$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009360
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009361else
Matthias Kloseb159a552010-04-25 21:00:44 +00009362
Matthias Kloseb9621712010-04-24 17:59:49 +00009363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9364$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009365
9366fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9368
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009369# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9371$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009372
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009373# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009374if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009375 withval=$with_doc_strings;
9376fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009377
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009378
9379if test -z "$with_doc_strings"
9380then with_doc_strings="yes"
9381fi
9382if test "$with_doc_strings" != "no"
9383then
9384
Matthias Kloseb9621712010-04-24 17:59:49 +00009385$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009386
9387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9389$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009390
Antoine Pitrou042b1282010-08-13 21:15:58 +00009391# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9393$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009394
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009395# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009396if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009397 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009398if test "$withval" != no
9399then
9400
Matthias Kloseb9621712010-04-24 17:59:49 +00009401$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009402
Matthias Kloseb9621712010-04-24 17:59:49 +00009403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9404$as_echo "yes" >&6; }
9405else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009407fi
9408else
Matthias Kloseb9621712010-04-24 17:59:49 +00009409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9410$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009411fi
9412
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009413
9414# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9416$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009419if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420 withval=$with_pymalloc;
9421fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009422
Neil Schemenauera35c6882001-02-27 04:45:05 +00009423
Neil Schemenauer16c22972002-03-22 15:34:49 +00009424if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009425then
9426 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009427 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009428fi
9429if test "$with_pymalloc" != "no"
9430then
Martin v. Löwis11437992002-04-12 09:54:03 +00009431
Matthias Kloseb9621712010-04-24 17:59:49 +00009432$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009433
9434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9436$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009437
Benjamin Peterson05159c42009-12-03 03:01:27 +00009438# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9440$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009441
9442# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009443if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009444 withval=$with_valgrind;
9445else
9446 with_valgrind=no
9447fi
9448
Matthias Kloseb9621712010-04-24 17:59:49 +00009449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9450$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009451if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08009453if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009454
Matthias Kloseb9621712010-04-24 17:59:49 +00009455$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009456
9457else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009458 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009459
9460fi
9461
9462
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009463 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009464fi
9465
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009466# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009467
Guido van Rossum98935bf2001-09-05 19:13:16 +00009468DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009469
Guido van Rossume97ee181999-12-20 21:27:22 +00009470# the dlopen() function means we might want to use dynload_shlib.o. some
9471# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009472for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009473do :
9474 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Gregory P. Smith69140482012-01-16 02:05:55 -08009475if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009477#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009478_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009479
Guido van Rossume97ee181999-12-20 21:27:22 +00009480fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009481done
Guido van Rossume97ee181999-12-20 21:27:22 +00009482
Michael W. Hudson54241132001-12-07 15:38:26 +00009483
Guido van Rossume97ee181999-12-20 21:27:22 +00009484# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9485# loading of modules.
9486
Matthias Kloseb9621712010-04-24 17:59:49 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9488$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009489if test -z "$DYNLOADFILE"
9490then
9491 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009492 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9493 if test "$ac_cv_func_dlopen" = yes
9494 then DYNLOADFILE="dynload_shlib.o"
9495 else DYNLOADFILE="dynload_aix.o"
9496 fi
9497 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009498 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009499 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9500 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009501 *)
9502 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9503 # out any dynamic loading
9504 if test "$ac_cv_func_dlopen" = yes
9505 then DYNLOADFILE="dynload_shlib.o"
9506 else DYNLOADFILE="dynload_stub.o"
9507 fi
9508 ;;
9509 esac
9510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9512$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009513if test "$DYNLOADFILE" != "dynload_stub.o"
9514then
Martin v. Löwis11437992002-04-12 09:54:03 +00009515
Matthias Kloseb9621712010-04-24 17:59:49 +00009516$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009517
9518fi
9519
Neil Schemenauer4e425612001-06-19 15:44:15 +00009520# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9521
Michael W. Hudson54241132001-12-07 15:38:26 +00009522
Matthias Kloseb9621712010-04-24 17:59:49 +00009523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9524$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009525if test -z "$MACHDEP_OBJS"
9526then
Jack Jansene578a632001-08-15 01:27:14 +00009527 MACHDEP_OBJS=$extra_machdep_objs
9528else
9529 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9532$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009533
Guido van Rossum627b2d71993-12-24 10:39:16 +00009534# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009535for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009536 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009537 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009538 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009539 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009540 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009541 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009542 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9543 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009544 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009545 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009546 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009547 truncate uname unsetenv utimes waitpid wait3 wait4 \
9548 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009549do :
9550 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9551ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009552if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009554#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009555_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009556
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009557fi
9558done
9559
Michael W. Hudson54241132001-12-07 15:38:26 +00009560
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009561ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9562 #include <dirent.h>
9563"
9564if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9565
9566$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9567
9568fi
9569
9570
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009571# For some functions, having a definition is not sufficient, since
9572# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9574$as_echo_n "checking for chroot... " >&6; }
9575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009576/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009577#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009578int
9579main ()
9580{
9581void *x=chroot
9582 ;
9583 return 0;
9584}
9585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009587
Matthias Kloseb9621712010-04-24 17:59:49 +00009588$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009589
Matthias Kloseb159a552010-04-25 21:00:44 +00009590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009591$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009592else
Matthias Kloseb9621712010-04-24 17:59:49 +00009593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9594$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009595
9596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9599$as_echo_n "checking for link... " >&6; }
9600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009601/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009602#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009603int
9604main ()
9605{
9606void *x=link
9607 ;
9608 return 0;
9609}
9610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009611if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009612
Matthias Kloseb9621712010-04-24 17:59:49 +00009613$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009614
Matthias Kloseb159a552010-04-25 21:00:44 +00009615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009616$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009617else
Matthias Kloseb9621712010-04-24 17:59:49 +00009618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009620
9621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9624$as_echo_n "checking for symlink... " >&6; }
9625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009626/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009627#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009628int
9629main ()
9630{
9631void *x=symlink
9632 ;
9633 return 0;
9634}
9635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009636if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009637
Matthias Kloseb9621712010-04-24 17:59:49 +00009638$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009639
Matthias Kloseb159a552010-04-25 21:00:44 +00009640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009641$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009642else
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9644$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009645
9646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9649$as_echo_n "checking for fchdir... " >&6; }
9650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009651/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009652#include <unistd.h>
9653int
9654main ()
9655{
9656void *x=fchdir
9657 ;
9658 return 0;
9659}
9660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009661if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009662
Matthias Kloseb9621712010-04-24 17:59:49 +00009663$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009664
Matthias Kloseb159a552010-04-25 21:00:44 +00009665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009666$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009667else
Matthias Kloseb9621712010-04-24 17:59:49 +00009668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9669$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009670
9671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9674$as_echo_n "checking for fsync... " >&6; }
9675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009676/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009677#include <unistd.h>
9678int
9679main ()
9680{
9681void *x=fsync
9682 ;
9683 return 0;
9684}
9685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009686if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009687
Matthias Kloseb9621712010-04-24 17:59:49 +00009688$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009689
Matthias Kloseb159a552010-04-25 21:00:44 +00009690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009691$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009692else
Matthias Kloseb9621712010-04-24 17:59:49 +00009693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9694$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009695
9696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9699$as_echo_n "checking for fdatasync... " >&6; }
9700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009701/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009702#include <unistd.h>
9703int
9704main ()
9705{
9706void *x=fdatasync
9707 ;
9708 return 0;
9709}
9710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009712
Matthias Kloseb9621712010-04-24 17:59:49 +00009713$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009714
Matthias Kloseb159a552010-04-25 21:00:44 +00009715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009716$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009717else
Matthias Kloseb9621712010-04-24 17:59:49 +00009718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9719$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009720
9721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9724$as_echo_n "checking for epoll... " >&6; }
9725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009726/* end confdefs.h. */
9727#include <sys/epoll.h>
9728int
9729main ()
9730{
9731void *x=epoll_create
9732 ;
9733 return 0;
9734}
9735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009736if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009737
Matthias Kloseb9621712010-04-24 17:59:49 +00009738$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009739
Matthias Kloseb159a552010-04-25 21:00:44 +00009740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009741$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009742else
Matthias Kloseb9621712010-04-24 17:59:49 +00009743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009745
9746fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9749$as_echo_n "checking for kqueue... " >&6; }
9750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009751/* end confdefs.h. */
9752
9753#include <sys/types.h>
9754#include <sys/event.h>
9755
9756int
9757main ()
9758{
9759int x=kqueue()
9760 ;
9761 return 0;
9762}
9763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009764if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009765
Matthias Kloseb9621712010-04-24 17:59:49 +00009766$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009767
Matthias Kloseb159a552010-04-25 21:00:44 +00009768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009769$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009770else
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9772$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009773
9774fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009776# On some systems (eg. FreeBSD 5), we would find a definition of the
9777# functions ctermid_r, setgroups in the library, but no prototype
9778# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9779# address to avoid compiler warnings and potential miscompilations
9780# because of the missing prototypes.
9781
Matthias Kloseb9621712010-04-24 17:59:49 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9783$as_echo_n "checking for ctermid_r... " >&6; }
9784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009785/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009786
Martin v. Löwisd5843682002-11-21 20:41:28 +00009787#include <stdio.h>
9788
Martin v. Löwisd5843682002-11-21 20:41:28 +00009789int
9790main ()
9791{
9792void* p = ctermid_r
9793 ;
9794 return 0;
9795}
9796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009797if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009798
Matthias Kloseb9621712010-04-24 17:59:49 +00009799$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009800
Matthias Kloseb159a552010-04-25 21:00:44 +00009801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009802$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009803else
Matthias Kloseb9621712010-04-24 17:59:49 +00009804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9805$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009806
9807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9809
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9811$as_echo_n "checking for flock declaration... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009812if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009813 $as_echo_n "(cached) " >&6
9814else
9815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009816/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009817#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009818int
9819main ()
9820{
9821void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009822
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009823 ;
9824 return 0;
9825}
9826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009827if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009828 ac_cv_flock_decl=yes
9829else
9830 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009831
9832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009834
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009835fi
9836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9837$as_echo "$ac_cv_flock_decl" >&6; }
9838if test "x${ac_cv_flock_decl}" = xyes; then
9839 for ac_func in flock
9840do :
9841 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Gregory P. Smith69140482012-01-16 02:05:55 -08009842if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009843 cat >>confdefs.h <<_ACEOF
9844#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009845_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009846
Antoine Pitroua3000072010-09-07 14:52:42 +00009847else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009849$as_echo_n "checking for flock in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009850if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009851 $as_echo_n "(cached) " >&6
9852else
9853 ac_check_lib_save_LIBS=$LIBS
9854LIBS="-lbsd $LIBS"
9855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9856/* end confdefs.h. */
9857
9858/* Override any GCC internal prototype to avoid an error.
9859 Use char because int might match the return type of a GCC
9860 builtin and then its argument prototype would still apply. */
9861#ifdef __cplusplus
9862extern "C"
9863#endif
9864char flock ();
9865int
9866main ()
9867{
9868return flock ();
9869 ;
9870 return 0;
9871}
9872_ACEOF
9873if ac_fn_c_try_link "$LINENO"; then :
9874 ac_cv_lib_bsd_flock=yes
9875else
9876 ac_cv_lib_bsd_flock=no
9877fi
9878rm -f core conftest.err conftest.$ac_objext \
9879 conftest$ac_exeext conftest.$ac_ext
9880LIBS=$ac_check_lib_save_LIBS
9881fi
9882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9883$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009884if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009885 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009886
9887
9888$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9889
9890
9891fi
9892
9893
9894fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009895done
9896
Antoine Pitroua3000072010-09-07 14:52:42 +00009897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898
Matthias Kloseb9621712010-04-24 17:59:49 +00009899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9900$as_echo_n "checking for getpagesize... " >&6; }
9901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009902/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009903
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009904#include <unistd.h>
9905
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009906int
9907main ()
9908{
9909void* p = getpagesize
9910 ;
9911 return 0;
9912}
9913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009914if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009915
Matthias Kloseb9621712010-04-24 17:59:49 +00009916$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009917
Matthias Kloseb159a552010-04-25 21:00:44 +00009918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009919$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009920else
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009923
9924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009926
Charles-François Natali6613c182011-11-27 12:41:06 +01009927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9928$as_echo_n "checking for broken unsetenv... " >&6; }
9929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9930/* end confdefs.h. */
9931
9932#include <stdlib.h>
9933
9934int
9935main ()
9936{
9937int res = unsetenv("DUMMY")
9938 ;
9939 return 0;
9940}
9941_ACEOF
9942if ac_fn_c_try_compile "$LINENO"; then :
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9944$as_echo "no" >&6; }
9945else
9946
9947$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9948
9949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9950$as_echo "yes" >&6; }
9951
9952fi
9953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9954
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009955for ac_prog in true
9956do
9957 # Extract the first word of "$ac_prog", so it can be a program name with args.
9958set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9960$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009961if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009963else
9964 if test -n "$TRUE"; then
9965 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9966else
9967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9968for as_dir in $PATH
9969do
9970 IFS=$as_save_IFS
9971 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009972 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009973 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009974 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009975 $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 +00009976 break 2
9977 fi
9978done
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009980IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009981
9982fi
9983fi
9984TRUE=$ac_cv_prog_TRUE
9985if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9987$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009988else
Matthias Kloseb9621712010-04-24 17:59:49 +00009989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9990$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009991fi
9992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009993
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009994 test -n "$TRUE" && break
9995done
9996test -n "$TRUE" || TRUE="/bin/true"
9997
9998
Matthias Kloseb9621712010-04-24 17:59:49 +00009999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10000$as_echo_n "checking for inet_aton in -lc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010001if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010002 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010003else
10004 ac_check_lib_save_LIBS=$LIBS
10005LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010007/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010009/* Override any GCC internal prototype to avoid an error.
10010 Use char because int might match the return type of a GCC
10011 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010012#ifdef __cplusplus
10013extern "C"
10014#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010015char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010016int
10017main ()
10018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010019return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010020 ;
10021 return 0;
10022}
10023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010024if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010025 ac_cv_lib_c_inet_aton=yes
10026else
Matthias Kloseb9621712010-04-24 17:59:49 +000010027 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010029rm -f core conftest.err conftest.$ac_objext \
10030 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010031LIBS=$ac_check_lib_save_LIBS
10032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10034$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010035if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010036 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010037else
Matthias Kloseb9621712010-04-24 17:59:49 +000010038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10039$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010040if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010041 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010042else
10043 ac_check_lib_save_LIBS=$LIBS
10044LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010046/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048/* Override any GCC internal prototype to avoid an error.
10049 Use char because int might match the return type of a GCC
10050 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010051#ifdef __cplusplus
10052extern "C"
10053#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010054char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010055int
10056main ()
10057{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010059 ;
10060 return 0;
10061}
10062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010063if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010064 ac_cv_lib_resolv_inet_aton=yes
10065else
Matthias Kloseb9621712010-04-24 17:59:49 +000010066 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010068rm -f core conftest.err conftest.$ac_objext \
10069 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010070LIBS=$ac_check_lib_save_LIBS
10071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10073$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010074if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010075 cat >>confdefs.h <<_ACEOF
10076#define HAVE_LIBRESOLV 1
10077_ACEOF
10078
10079 LIBS="-lresolv $LIBS"
10080
10081fi
10082
10083
10084fi
10085
10086
Christian Heimesd0764e22007-12-04 15:00:33 +000010087# On Tru64, chflags seems to be present, but calling it will
10088# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10090$as_echo_n "checking for chflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010091if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010092 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010093else
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010095 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010096else
Matthias Kloseb9621712010-04-24 17:59:49 +000010097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010098/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010099
Christian Heimesd0764e22007-12-04 15:00:33 +000010100#include <sys/stat.h>
10101#include <unistd.h>
10102int main(int argc, char*argv[])
10103{
10104 if(chflags(argv[0], 0) != 0)
10105 return 1;
10106 return 0;
10107}
Ned Deily3eb67d52011-06-28 00:00:28 -070010108
Christian Heimesd0764e22007-12-04 15:00:33 +000010109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010110if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010111 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010112else
Matthias Kloseb9621712010-04-24 17:59:49 +000010113 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10116 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010117fi
10118
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010119
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10122$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010123if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010124 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010125if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010126 ac_cv_have_chflags="yes"
10127else
10128 ac_cv_have_chflags="no"
10129fi
10130
10131fi
10132if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010133
Matthias Kloseb9621712010-04-24 17:59:49 +000010134$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010135
10136fi
10137
Matthias Kloseb9621712010-04-24 17:59:49 +000010138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10139$as_echo_n "checking for lchflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010140if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010142else
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010144 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010145else
Matthias Kloseb9621712010-04-24 17:59:49 +000010146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010147/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010148
Christian Heimesd0764e22007-12-04 15:00:33 +000010149#include <sys/stat.h>
10150#include <unistd.h>
10151int main(int argc, char*argv[])
10152{
10153 if(lchflags(argv[0], 0) != 0)
10154 return 1;
10155 return 0;
10156}
Ned Deily3eb67d52011-06-28 00:00:28 -070010157
Christian Heimesd0764e22007-12-04 15:00:33 +000010158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010159if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010160 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010161else
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10165 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010166fi
10167
10168
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10171$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010172if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010173 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010174if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010175 ac_cv_have_lchflags="yes"
10176else
10177 ac_cv_have_lchflags="no"
10178fi
10179
10180fi
10181if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010182
Matthias Kloseb9621712010-04-24 17:59:49 +000010183$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010184
10185fi
10186
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010187case $ac_sys_system/$ac_sys_release in
10188Darwin/*)
10189 _CUR_CFLAGS="${CFLAGS}"
10190 _CUR_LDFLAGS="${LDFLAGS}"
10191 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10192 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10193 ;;
10194esac
10195
Matthias Kloseb9621712010-04-24 17:59:49 +000010196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10197$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010198if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010200else
10201 ac_check_lib_save_LIBS=$LIBS
10202LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010204/* end confdefs.h. */
10205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206/* Override any GCC internal prototype to avoid an error.
10207 Use char because int might match the return type of a GCC
10208 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010209#ifdef __cplusplus
10210extern "C"
10211#endif
10212char inflateCopy ();
10213int
10214main ()
10215{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010216return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010217 ;
10218 return 0;
10219}
10220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010221if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010222 ac_cv_lib_z_inflateCopy=yes
10223else
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010226rm -f core conftest.err conftest.$ac_objext \
10227 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010228LIBS=$ac_check_lib_save_LIBS
10229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10231$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010232if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010233
Matthias Kloseb9621712010-04-24 17:59:49 +000010234$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010235
10236fi
10237
10238
10239case $ac_sys_system/$ac_sys_release in
10240Darwin/*)
10241 CFLAGS="${_CUR_CFLAGS}"
10242 LDFLAGS="${_CUR_LDFLAGS}"
10243 ;;
10244esac
10245
Matthias Kloseb9621712010-04-24 17:59:49 +000010246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10247$as_echo_n "checking for hstrerror... " >&6; }
10248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010249/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010250
Martin v. Löwise9416172003-05-03 10:12:45 +000010251#include <netdb.h>
10252
Martin v. Löwise9416172003-05-03 10:12:45 +000010253int
10254main ()
10255{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010256void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010257 ;
10258 return 0;
10259}
10260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010261if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010262
Matthias Kloseb9621712010-04-24 17:59:49 +000010263$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010264
Matthias Kloseb159a552010-04-25 21:00:44 +000010265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010266$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010267else
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10269$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010270
10271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010272rm -f core conftest.err conftest.$ac_objext \
10273 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010274
Matthias Kloseb9621712010-04-24 17:59:49 +000010275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10276$as_echo_n "checking for inet_aton... " >&6; }
10277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010278/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010279
Martin v. Löwis86d66262006-02-17 08:40:11 +000010280#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010281#include <sys/socket.h>
10282#include <netinet/in.h>
10283#include <arpa/inet.h>
10284
Martin v. Löwise9416172003-05-03 10:12:45 +000010285int
10286main ()
10287{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010288void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010289 ;
10290 return 0;
10291}
10292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010293if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010294
Matthias Kloseb9621712010-04-24 17:59:49 +000010295$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010296
Matthias Kloseb159a552010-04-25 21:00:44 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010298$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010299else
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10301$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010302
10303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010304rm -f core conftest.err conftest.$ac_objext \
10305 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010306
Matthias Kloseb9621712010-04-24 17:59:49 +000010307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10308$as_echo_n "checking for inet_pton... " >&6; }
10309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010310/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010311
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010312#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010313#include <sys/socket.h>
10314#include <netinet/in.h>
10315#include <arpa/inet.h>
10316
Martin v. Löwise9416172003-05-03 10:12:45 +000010317int
10318main ()
10319{
10320void* p = inet_pton
10321 ;
10322 return 0;
10323}
10324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010325if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010326
Matthias Kloseb9621712010-04-24 17:59:49 +000010327$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010328
Matthias Kloseb159a552010-04-25 21:00:44 +000010329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010330$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010331else
Matthias Kloseb9621712010-04-24 17:59:49 +000010332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10333$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010334
10335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010337
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010338# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10340$as_echo_n "checking for setgroups... " >&6; }
10341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010342/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010343
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010344#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010345#ifdef HAVE_GRP_H
10346#include <grp.h>
10347#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010348
Martin v. Löwisd5843682002-11-21 20:41:28 +000010349int
10350main ()
10351{
10352void* p = setgroups
10353 ;
10354 return 0;
10355}
10356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010357if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010358
Matthias Kloseb9621712010-04-24 17:59:49 +000010359$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010360
Matthias Kloseb159a552010-04-25 21:00:44 +000010361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010362$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010363else
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010366
10367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010369
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010370# check for openpty and forkpty
10371
10372for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010373do :
10374 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010375if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010377#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010378_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010379
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010380else
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10382$as_echo_n "checking for openpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010383if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010385else
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010387LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010391/* Override any GCC internal prototype to avoid an error.
10392 Use char because int might match the return type of a GCC
10393 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010394#ifdef __cplusplus
10395extern "C"
10396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010397char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010398int
10399main ()
10400{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010401return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010402 ;
10403 return 0;
10404}
10405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010406if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010408else
Matthias Kloseb9621712010-04-24 17:59:49 +000010409 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010411rm -f core conftest.err conftest.$ac_objext \
10412 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010413LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10416$as_echo "$ac_cv_lib_util_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010417if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010418 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010419 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010420else
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10422$as_echo_n "checking for openpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010423if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010425else
10426 ac_check_lib_save_LIBS=$LIBS
10427LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010429/* end confdefs.h. */
10430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010431/* Override any GCC internal prototype to avoid an error.
10432 Use char because int might match the return type of a GCC
10433 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010434#ifdef __cplusplus
10435extern "C"
10436#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010437char openpty ();
10438int
10439main ()
10440{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010442 ;
10443 return 0;
10444}
10445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010446if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010447 ac_cv_lib_bsd_openpty=yes
10448else
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010451rm -f core conftest.err conftest.$ac_objext \
10452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010453LIBS=$ac_check_lib_save_LIBS
10454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10456$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010457if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010459 LIBS="$LIBS -lbsd"
10460fi
10461
10462
10463fi
10464
Fred Drake8cef4cf2000-06-28 16:40:38 +000010465
10466fi
10467done
10468
10469for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010470do :
10471 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010472if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010473 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010474#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010475_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010476
Fred Drake8cef4cf2000-06-28 16:40:38 +000010477else
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10479$as_echo_n "checking for forkpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010480if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010482else
Martin v. Löwis11437992002-04-12 09:54:03 +000010483 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010484LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010488/* Override any GCC internal prototype to avoid an error.
10489 Use char because int might match the return type of a GCC
10490 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010491#ifdef __cplusplus
10492extern "C"
10493#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010494char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010495int
10496main ()
10497{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010499 ;
10500 return 0;
10501}
10502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010503if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010504 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010505else
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010508rm -f core conftest.err conftest.$ac_objext \
10509 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010510LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10513$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010514if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010515 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010516 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010517else
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10519$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010520if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010521 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010522else
10523 ac_check_lib_save_LIBS=$LIBS
10524LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010526/* end confdefs.h. */
10527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528/* Override any GCC internal prototype to avoid an error.
10529 Use char because int might match the return type of a GCC
10530 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010531#ifdef __cplusplus
10532extern "C"
10533#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010534char forkpty ();
10535int
10536main ()
10537{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010539 ;
10540 return 0;
10541}
10542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010543if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010544 ac_cv_lib_bsd_forkpty=yes
10545else
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010547fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010548rm -f core conftest.err conftest.$ac_objext \
10549 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010550LIBS=$ac_check_lib_save_LIBS
10551fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10553$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010554if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010556 LIBS="$LIBS -lbsd"
10557fi
10558
10559
10560fi
10561
Fred Drake8cef4cf2000-06-28 16:40:38 +000010562
10563fi
10564done
10565
Jack Jansendd19cf82001-12-06 22:36:17 +000010566
Christian Heimesb186d002008-03-18 15:15:01 +000010567# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010568for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010569do :
10570 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Gregory P. Smith69140482012-01-16 02:05:55 -080010571if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010572 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010573#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010574_ACEOF
10575
10576fi
10577done
10578
10579
Michael W. Hudson54241132001-12-07 15:38:26 +000010580# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010581for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010582do :
10583 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10584ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010585if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010587#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010588_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010589
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010590fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010591done
10592
Michael W. Hudson54241132001-12-07 15:38:26 +000010593
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010594ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Gregory P. Smith69140482012-01-16 02:05:55 -080010595if test "x$ac_cv_func_dup2" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010596 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010597
Martin v. Löwis1142de32002-03-29 16:28:31 +000010598else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010599 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010600 *" dup2.$ac_objext "* ) ;;
10601 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010602 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010603esac
10604
Martin v. Löwis1142de32002-03-29 16:28:31 +000010605fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010606
10607ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Gregory P. Smith69140482012-01-16 02:05:55 -080010608if test "x$ac_cv_func_getcwd" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010609 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10610
10611else
10612 case " $LIBOBJS " in
10613 *" getcwd.$ac_objext "* ) ;;
10614 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10615 ;;
10616esac
10617
10618fi
10619
10620ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Gregory P. Smith69140482012-01-16 02:05:55 -080010621if test "x$ac_cv_func_strdup" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010622 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10623
10624else
10625 case " $LIBOBJS " in
10626 *" strdup.$ac_objext "* ) ;;
10627 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10628 ;;
10629esac
10630
10631fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010632
10633
10634for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010635do :
10636 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010637if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010638 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010639#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010642/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010643#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010644int
10645main ()
10646{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010647getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 ;
10649 return 0;
10650}
10651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010655
Guido van Rossum627b2d71993-12-24 10:39:16 +000010656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010658
Guido van Rossum627b2d71993-12-24 10:39:16 +000010659fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010660done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010661
Jack Jansen150753c2003-03-29 22:07:47 +000010662for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010663do :
10664 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010665if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010666 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010667#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010670/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010671#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010672int
10673main ()
10674{
10675setpgrp(0,0);
10676 ;
10677 return 0;
10678}
10679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010680if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010681
Matthias Kloseb9621712010-04-24 17:59:49 +000010682$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010683
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010686
10687fi
10688done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010689
Thomas Wouters3a584202000-08-05 23:28:51 +000010690for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010691do :
10692 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Gregory P. Smith69140482012-01-16 02:05:55 -080010693if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010695#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010698/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010699#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010700int
10701main ()
10702{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010703gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 ;
10705 return 0;
10706}
10707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010708if ac_fn_c_try_compile "$LINENO"; then :
10709
Guido van Rossum627b2d71993-12-24 10:39:16 +000010710else
Skip Montanaro6dead952003-09-25 14:50:04 +000010711
Matthias Kloseb9621712010-04-24 17:59:49 +000010712$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010713
Martin v. Löwis11437992002-04-12 09:54:03 +000010714
Guido van Rossum627b2d71993-12-24 10:39:16 +000010715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010717
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010718fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010719done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010720
Michael W. Hudson54241132001-12-07 15:38:26 +000010721
Matthias Kloseb9621712010-04-24 17:59:49 +000010722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10723$as_echo_n "checking for major... " >&6; }
10724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010725/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010726
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010727#if defined(MAJOR_IN_MKDEV)
10728#include <sys/mkdev.h>
10729#elif defined(MAJOR_IN_SYSMACROS)
10730#include <sys/sysmacros.h>
10731#else
10732#include <sys/types.h>
10733#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010734
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010735int
10736main ()
10737{
10738
10739 makedev(major(0),minor(0));
10740
10741 ;
10742 return 0;
10743}
10744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010745if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010746
10747
Matthias Kloseb9621712010-04-24 17:59:49 +000010748$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010749
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10751$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010752
10753else
Skip Montanaro6dead952003-09-25 14:50:04 +000010754
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10756$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010757
10758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010759rm -f core conftest.err conftest.$ac_objext \
10760 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010761
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010762# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010763# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10765$as_echo_n "checking for getaddrinfo... " >&6; }
10766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010767/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010768
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010769#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010770#include <sys/socket.h>
10771#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010772#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010773
Martin v. Löwis11437992002-04-12 09:54:03 +000010774int
10775main ()
10776{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010777getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 ;
10779 return 0;
10780}
10781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010782if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010783 have_getaddrinfo=yes
10784else
Matthias Kloseb9621712010-04-24 17:59:49 +000010785 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010786fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010787rm -f core conftest.err conftest.$ac_objext \
10788 conftest$ac_exeext conftest.$ac_ext
10789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10790$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010791if test $have_getaddrinfo = yes
10792then
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10794$as_echo_n "checking getaddrinfo bug... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010795 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010797else
Matthias Kloseb9621712010-04-24 17:59:49 +000010798 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010799 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010800else
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010802/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010803
10804#include <sys/types.h>
10805#include <netdb.h>
10806#include <string.h>
10807#include <sys/socket.h>
10808#include <netinet/in.h>
10809
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010810int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010811{
10812 int passive, gaierr, inet4 = 0, inet6 = 0;
10813 struct addrinfo hints, *ai, *aitop;
10814 char straddr[INET6_ADDRSTRLEN], strport[16];
10815
10816 for (passive = 0; passive <= 1; passive++) {
10817 memset(&hints, 0, sizeof(hints));
10818 hints.ai_family = AF_UNSPEC;
10819 hints.ai_flags = passive ? AI_PASSIVE : 0;
10820 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010821 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010822 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10823 (void)gai_strerror(gaierr);
10824 goto bad;
10825 }
10826 for (ai = aitop; ai; ai = ai->ai_next) {
10827 if (ai->ai_addr == NULL ||
10828 ai->ai_addrlen == 0 ||
10829 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10830 straddr, sizeof(straddr), strport, sizeof(strport),
10831 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10832 goto bad;
10833 }
10834 switch (ai->ai_family) {
10835 case AF_INET:
10836 if (strcmp(strport, "54321") != 0) {
10837 goto bad;
10838 }
10839 if (passive) {
10840 if (strcmp(straddr, "0.0.0.0") != 0) {
10841 goto bad;
10842 }
10843 } else {
10844 if (strcmp(straddr, "127.0.0.1") != 0) {
10845 goto bad;
10846 }
10847 }
10848 inet4++;
10849 break;
10850 case AF_INET6:
10851 if (strcmp(strport, "54321") != 0) {
10852 goto bad;
10853 }
10854 if (passive) {
10855 if (strcmp(straddr, "::") != 0) {
10856 goto bad;
10857 }
10858 } else {
10859 if (strcmp(straddr, "::1") != 0) {
10860 goto bad;
10861 }
10862 }
10863 inet6++;
10864 break;
10865 case AF_UNSPEC:
10866 goto bad;
10867 break;
10868 default:
10869 /* another family support? */
10870 break;
10871 }
10872 }
10873 }
10874
10875 if (!(inet4 == 0 || inet4 == 2))
10876 goto bad;
10877 if (!(inet6 == 0 || inet6 == 2))
10878 goto bad;
10879
10880 if (aitop)
10881 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010882 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010883
10884 bad:
10885 if (aitop)
10886 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010887 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010888}
10889
Martin v. Löwis11437992002-04-12 09:54:03 +000010890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010891if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010892 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010893else
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010899
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010900fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010901
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010903
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10905$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10906
Mark Dickinson2df5d282009-12-31 21:22:50 +000010907if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010908then
10909 if test $ipv6 = yes
10910 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010911 echo 'Fatal: You must get working getaddrinfo() function.'
10912 echo ' or you can specify "--disable-ipv6"'.
10913 exit 1
10914 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010915else
Martin v. Löwis11437992002-04-12 09:54:03 +000010916
Matthias Kloseb9621712010-04-24 17:59:49 +000010917$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010918
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010919fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010920
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010921for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010922do :
10923 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Gregory P. Smith69140482012-01-16 02:05:55 -080010924if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010925 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010926#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010927_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010928
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010929fi
10930done
10931
Michael W. Hudson54241132001-12-07 15:38:26 +000010932
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010933# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10935$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010936if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010938else
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010941#include <sys/types.h>
10942#include <sys/time.h>
10943#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010944
Martin v. Löwis11437992002-04-12 09:54:03 +000010945int
10946main ()
10947{
10948if ((struct tm *) 0)
10949return 0;
10950 ;
10951 return 0;
10952}
10953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010954if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010955 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010956else
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10962$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010963if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010966
10967fi
10968
Matthias Kloseb9621712010-04-24 17:59:49 +000010969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10970$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010971if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010973else
Matthias Kloseb9621712010-04-24 17:59:49 +000010974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010975/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010976#include <sys/types.h>
10977#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010978
Martin v. Löwis11437992002-04-12 09:54:03 +000010979int
10980main ()
10981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982struct tm tm;
10983 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010985 ;
10986 return 0;
10987}
10988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010989if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010990 ac_cv_struct_tm=time.h
10991else
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10997$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010998if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010999
Matthias Kloseb9621712010-04-24 17:59:49 +000011000$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011001
11002fi
11003
Matthias Kloseb9621712010-04-24 17:59:49 +000011004ac_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 +000011005#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011006
Matthias Kloseb9621712010-04-24 17:59:49 +000011007"
Gregory P. Smith69140482012-01-16 02:05:55 -080011008if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011009
11010cat >>confdefs.h <<_ACEOF
11011#define HAVE_STRUCT_TM_TM_ZONE 1
11012_ACEOF
11013
11014
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011015fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011016
Martin v. Löwis11437992002-04-12 09:54:03 +000011017if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11018
Matthias Kloseb9621712010-04-24 17:59:49 +000011019$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011020
11021else
Matthias Kloseb9621712010-04-24 17:59:49 +000011022 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11023"
Gregory P. Smith69140482012-01-16 02:05:55 -080011024if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011025 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011026else
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011028fi
11029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011030cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011031#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011032_ACEOF
11033
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11035$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011036if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011037 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011038else
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011040/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011041#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042#if !HAVE_DECL_TZNAME
11043extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011045
Martin v. Löwis11437992002-04-12 09:54:03 +000011046int
11047main ()
11048{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011049return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011050 ;
11051 return 0;
11052}
11053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011054if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011055 ac_cv_var_tzname=yes
11056else
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011059rm -f core conftest.err conftest.$ac_objext \
11060 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11063$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011064 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011065
Matthias Kloseb9621712010-04-24 17:59:49 +000011066$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011067
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011068 fi
11069fi
11070
Matthias Kloseb9621712010-04-24 17:59:49 +000011071ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080011072if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011073
11074cat >>confdefs.h <<_ACEOF
11075#define HAVE_STRUCT_STAT_ST_RDEV 1
11076_ACEOF
11077
11078
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011079fi
11080
Matthias Kloseb9621712010-04-24 17:59:49 +000011081ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080011082if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011083
Martin v. Löwis11437992002-04-12 09:54:03 +000011084cat >>confdefs.h <<_ACEOF
11085#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11086_ACEOF
11087
11088
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011089fi
11090
Matthias Kloseb9621712010-04-24 17:59:49 +000011091ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080011092if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011093
11094cat >>confdefs.h <<_ACEOF
11095#define HAVE_STRUCT_STAT_ST_FLAGS 1
11096_ACEOF
11097
11098
11099fi
11100
Matthias Kloseb9621712010-04-24 17:59:49 +000011101ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080011102if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011103
11104cat >>confdefs.h <<_ACEOF
11105#define HAVE_STRUCT_STAT_ST_GEN 1
11106_ACEOF
11107
11108
11109fi
11110
Matthias Kloseb9621712010-04-24 17:59:49 +000011111ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080011112if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011113
11114cat >>confdefs.h <<_ACEOF
11115#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11116_ACEOF
11117
11118
11119fi
11120
Matthias Kloseb9621712010-04-24 17:59:49 +000011121ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080011122if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011123
Martin v. Löwis11437992002-04-12 09:54:03 +000011124cat >>confdefs.h <<_ACEOF
11125#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11126_ACEOF
11127
11128
Matthias Kloseb9621712010-04-24 17:59:49 +000011129$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011130
11131else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011132 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011133 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011134 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11135 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011136esac
11137
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011138fi
11139
Michael W. Hudson54241132001-12-07 15:38:26 +000011140
Martin v. Löwis11437992002-04-12 09:54:03 +000011141
Matthias Kloseb9621712010-04-24 17:59:49 +000011142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11143$as_echo_n "checking for time.h that defines altzone... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011144if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011145 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011146else
Matthias Kloseb159a552010-04-25 21:00:44 +000011147
Matthias Kloseb9621712010-04-24 17:59:49 +000011148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011149/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011150#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011151int
11152main ()
11153{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011154return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 ;
11156 return 0;
11157}
11158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011159if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011160 ac_cv_header_time_altzone=yes
11161else
Matthias Kloseb9621712010-04-24 17:59:49 +000011162 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011166fi
11167
Matthias Kloseb9621712010-04-24 17:59:49 +000011168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11169$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011170if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011171
Matthias Kloseb9621712010-04-24 17:59:49 +000011172$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011173
11174fi
11175
Guido van Rossumda88dad1995-01-26 00:46:29 +000011176was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11178$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011180/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011181
11182#include <sys/types.h>
11183#include <sys/select.h>
11184#include <sys/time.h>
11185
Martin v. Löwis11437992002-04-12 09:54:03 +000011186int
11187main ()
11188{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011189;
Martin v. Löwis11437992002-04-12 09:54:03 +000011190 ;
11191 return 0;
11192}
11193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011194if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011195
11196
Matthias Kloseb9621712010-04-24 17:59:49 +000011197$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011198
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011199 was_it_defined=yes
11200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11204$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011205
Matthias Kloseb9621712010-04-24 17:59:49 +000011206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11207$as_echo_n "checking for addrinfo... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011208if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011209 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011210else
Matthias Kloseb9621712010-04-24 17:59:49 +000011211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011212/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011213#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011214int
11215main ()
11216{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011217struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 ;
11219 return 0;
11220}
11221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011222if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011223 ac_cv_struct_addrinfo=yes
11224else
Matthias Kloseb9621712010-04-24 17:59:49 +000011225 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11228fi
11229
Matthias Kloseb9621712010-04-24 17:59:49 +000011230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11231$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011232if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011233
Matthias Kloseb9621712010-04-24 17:59:49 +000011234$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011235
11236fi
11237
Matthias Kloseb9621712010-04-24 17:59:49 +000011238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11239$as_echo_n "checking for sockaddr_storage... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011240if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011242else
Matthias Kloseb9621712010-04-24 17:59:49 +000011243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011244/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011245
11246# include <sys/types.h>
11247# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011248int
11249main ()
11250{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011251struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 ;
11253 return 0;
11254}
11255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011256if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011257 ac_cv_struct_sockaddr_storage=yes
11258else
Matthias Kloseb9621712010-04-24 17:59:49 +000011259 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11262fi
11263
Matthias Kloseb9621712010-04-24 17:59:49 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11265$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011266if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011267
Matthias Kloseb9621712010-04-24 17:59:49 +000011268$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011269
11270fi
11271
Guido van Rossum627b2d71993-12-24 10:39:16 +000011272# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011273
Matthias Kloseb9621712010-04-24 17:59:49 +000011274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11275$as_echo_n "checking whether char is unsigned... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011276if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011277 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011278else
Matthias Kloseb9621712010-04-24 17:59:49 +000011279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011281$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011282int
11283main ()
11284{
11285static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011286test_array [0] = 0;
11287return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011288
11289 ;
11290 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011291}
Martin v. Löwis11437992002-04-12 09:54:03 +000011292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011293if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011294 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011295else
Matthias Kloseb9621712010-04-24 17:59:49 +000011296 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11301$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011302if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011303 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011304
11305fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011306
Matthias Kloseb9621712010-04-24 17:59:49 +000011307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11308$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011309if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011310 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011311else
Matthias Kloseb9621712010-04-24 17:59:49 +000011312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011313/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011314
Martin v. Löwis11437992002-04-12 09:54:03 +000011315int
11316main ()
11317{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011318
Martin v. Löwis11437992002-04-12 09:54:03 +000011319#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011320 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011321 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011322 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011324 char const *const *pcpcc;
11325 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011326 /* NEC SVR4.0.2 mips cc rejects this. */
11327 struct point {int x, y;};
11328 static struct point const zero = {0,0};
11329 /* AIX XL C 1.02.0.0 rejects this.
11330 It does not let you subtract one const X* pointer from another in
11331 an arm of an if-expression whose if-part is not a constant
11332 expression */
11333 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011334 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011336 ++pcpcc;
11337 ppc = (char**) pcpcc;
11338 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011339 { /* SCO 3.2v4 cc rejects this sort of thing. */
11340 char tx;
11341 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011343
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 }
11347 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11348 int x[] = {25, 17};
11349 const int *foo = &x[0];
11350 ++foo;
11351 }
11352 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11353 typedef const int *iptr;
11354 iptr p = 0;
11355 ++p;
11356 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011357 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011358 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011359 struct s { int j; const int *ap[3]; } bx;
11360 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 }
11362 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11363 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011364 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011367#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011368
Martin v. Löwis11437992002-04-12 09:54:03 +000011369 ;
11370 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011371}
Martin v. Löwis11437992002-04-12 09:54:03 +000011372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011373if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011374 ac_cv_c_const=yes
11375else
Matthias Kloseb9621712010-04-24 17:59:49 +000011376 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11381$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011382if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011383
Matthias Kloseb9621712010-04-24 17:59:49 +000011384$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011385
11386fi
11387
Michael W. Hudson54241132001-12-07 15:38:26 +000011388
Guido van Rossumda88dad1995-01-26 00:46:29 +000011389works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11391$as_echo_n "checking for working volatile... " >&6; }
11392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011393/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011394
Martin v. Löwis11437992002-04-12 09:54:03 +000011395int
11396main ()
11397{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011398volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 ;
11400 return 0;
11401}
11402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011403if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011404 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011405else
Skip Montanaro6dead952003-09-25 14:50:04 +000011406
Matthias Kloseb9621712010-04-24 17:59:49 +000011407$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011408
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011409
Guido van Rossum627b2d71993-12-24 10:39:16 +000011410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11413$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011414
Guido van Rossumda88dad1995-01-26 00:46:29 +000011415works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11417$as_echo_n "checking for working signed char... " >&6; }
11418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011419/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011420
Martin v. Löwis11437992002-04-12 09:54:03 +000011421int
11422main ()
11423{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011424signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 ;
11426 return 0;
11427}
11428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011429if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011430 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011431else
Skip Montanaro6dead952003-09-25 14:50:04 +000011432
Matthias Kloseb9621712010-04-24 17:59:49 +000011433$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011434
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011435
Guido van Rossum7f43da71994-08-01 12:15:30 +000011436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11439$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011440
Guido van Rossumda88dad1995-01-26 00:46:29 +000011441have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11443$as_echo_n "checking for prototypes... " >&6; }
11444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011445/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011446int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011447int
11448main ()
11449{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011450return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011451 ;
11452 return 0;
11453}
11454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011455if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011456
Matthias Kloseb9621712010-04-24 17:59:49 +000011457$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011458
Matthias Kloseb159a552010-04-25 21:00:44 +000011459 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11463$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011464
Guido van Rossumda88dad1995-01-26 00:46:29 +000011465works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11467$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011469/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011470
11471#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011472int foo(int x, ...) {
11473 va_list va;
11474 va_start(va, x);
11475 va_arg(va, int);
11476 va_arg(va, char *);
11477 va_arg(va, double);
11478 return 0;
11479}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011480
Martin v. Löwis11437992002-04-12 09:54:03 +000011481int
11482main ()
11483{
Guido van Rossum90eea071996-08-30 20:58:57 +000011484return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011485 ;
11486 return 0;
11487}
11488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011490
11491
Matthias Kloseb9621712010-04-24 17:59:49 +000011492$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011493
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011494 works=yes
11495
Guido van Rossum627b2d71993-12-24 10:39:16 +000011496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11499$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011500
Martin v. Löwisd6320502004-08-12 13:45:08 +000011501# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11503$as_echo_n "checking for socketpair... " >&6; }
11504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011505/* end confdefs.h. */
11506
11507#include <sys/types.h>
11508#include <sys/socket.h>
11509
11510int
11511main ()
11512{
11513void *x=socketpair
11514 ;
11515 return 0;
11516}
11517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011521
Matthias Kloseb159a552010-04-25 21:00:44 +000011522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011523$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011524else
Matthias Kloseb9621712010-04-24 17:59:49 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11526$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011527
11528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011530
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011531# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11533$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011535/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011536#include <sys/types.h>
11537#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011538int
11539main ()
11540{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011541struct sockaddr x;
11542x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 ;
11544 return 0;
11545}
11546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011547if ac_fn_c_try_compile "$LINENO"; then :
11548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11549$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011550
Matthias Kloseb9621712010-04-24 17:59:49 +000011551$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011552
11553else
Matthias Kloseb9621712010-04-24 17:59:49 +000011554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11555$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011556
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011559
Guido van Rossumda88dad1995-01-26 00:46:29 +000011560va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11562$as_echo_n "checking whether va_list is an array... " >&6; }
11563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011564/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011565
11566#ifdef HAVE_STDARG_PROTOTYPES
11567#include <stdarg.h>
11568#else
11569#include <varargs.h>
11570#endif
11571
Martin v. Löwis11437992002-04-12 09:54:03 +000011572int
11573main ()
11574{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011575va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011576 ;
11577 return 0;
11578}
11579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011580if ac_fn_c_try_compile "$LINENO"; then :
11581
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011582else
Skip Montanaro6dead952003-09-25 14:50:04 +000011583
Martin v. Löwis11437992002-04-12 09:54:03 +000011584
Matthias Kloseb9621712010-04-24 17:59:49 +000011585$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011586
Guido van Rossumda88dad1995-01-26 00:46:29 +000011587 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011588
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11592$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011593
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011594# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011595
11596
Matthias Kloseb9621712010-04-24 17:59:49 +000011597ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Gregory P. Smith69140482012-01-16 02:05:55 -080011598if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011599
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11603$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011604 OLD_CFLAGS=$CFLAGS
11605 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011607/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011608
11609# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011610
Martin v. Löwis11437992002-04-12 09:54:03 +000011611int
11612main ()
11613{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011614
11615 char *name;
11616 struct hostent *he, *res;
11617 char buffer[2048];
11618 int buflen = 2048;
11619 int h_errnop;
11620
11621 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011622
11623 ;
11624 return 0;
11625}
11626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011627if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011628
Matthias Kloseb9621712010-04-24 17:59:49 +000011629 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011630
Martin v. Löwis11437992002-04-12 09:54:03 +000011631
Matthias Kloseb9621712010-04-24 17:59:49 +000011632$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011633
Matthias Kloseb9621712010-04-24 17:59:49 +000011634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11635$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011636
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011637else
Skip Montanaro6dead952003-09-25 14:50:04 +000011638
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11640$as_echo "no" >&6; }
11641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11642$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011644/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011645
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011646# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011647
Martin v. Löwis11437992002-04-12 09:54:03 +000011648int
11649main ()
11650{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011651
11652 char *name;
11653 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011654 char buffer[2048];
11655 int buflen = 2048;
11656 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011657
Matthias Kloseb159a552010-04-25 21:00:44 +000011658 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011659
11660 ;
11661 return 0;
11662}
11663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011664if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011665
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011667
Martin v. Löwis11437992002-04-12 09:54:03 +000011668
Matthias Kloseb159a552010-04-25 21:00:44 +000011669$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011670
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11672$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011673
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011674else
Skip Montanaro6dead952003-09-25 14:50:04 +000011675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11677$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11679$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11681/* end confdefs.h. */
11682
11683# include <netdb.h>
11684
11685int
11686main ()
11687{
11688
11689 char *name;
11690 struct hostent *he;
11691 struct hostent_data data;
11692
11693 (void) gethostbyname_r(name, he, &data);
11694
11695 ;
11696 return 0;
11697}
11698_ACEOF
11699if ac_fn_c_try_compile "$LINENO"; then :
11700
11701 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11702
11703
11704$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11705
11706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11707$as_echo "yes" >&6; }
11708
11709else
11710
11711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11712$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011713
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011716
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011719
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011722 CFLAGS=$OLD_CFLAGS
11723
11724else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011725
Matthias Kloseb9621712010-04-24 17:59:49 +000011726 for ac_func in gethostbyname
11727do :
11728 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Gregory P. Smith69140482012-01-16 02:05:55 -080011729if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011730 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011732_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011733
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011734fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011735done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011736
Michael W. Hudson54241132001-12-07 15:38:26 +000011737
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011738fi
11739
Michael W. Hudson54241132001-12-07 15:38:26 +000011740
11741
11742
11743
11744
11745
Guido van Rossum627b2d71993-12-24 10:39:16 +000011746# checks for system services
11747# (none yet)
11748
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011749# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011750ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Gregory P. Smith69140482012-01-16 02:05:55 -080011751if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011752
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011753else
Matthias Kloseb9621712010-04-24 17:59:49 +000011754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11755$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011756if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011757 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011758else
Martin v. Löwis11437992002-04-12 09:54:03 +000011759 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011760LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011764/* Override any GCC internal prototype to avoid an error.
11765 Use char because int might match the return type of a GCC
11766 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011767#ifdef __cplusplus
11768extern "C"
11769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011770char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011771int
11772main ()
11773{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011774return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011775 ;
11776 return 0;
11777}
11778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011779if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011780 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011781else
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011784rm -f core conftest.err conftest.$ac_objext \
11785 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011786LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11789$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011790if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011791 cat >>confdefs.h <<_ACEOF
11792#define HAVE_LIBIEEE 1
11793_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011794
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011795 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011796
Guido van Rossum627b2d71993-12-24 10:39:16 +000011797fi
11798
Michael W. Hudson54241132001-12-07 15:38:26 +000011799
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011800fi
11801
Michael W. Hudson54241132001-12-07 15:38:26 +000011802
Guido van Rossum7f253911997-05-09 02:42:48 +000011803# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11805$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011806
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011807# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011808if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011809 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011810if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011811then
11812
Matthias Kloseb9621712010-04-24 17:59:49 +000011813$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011814
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11816$as_echo "yes" >&6; }
11817else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11818$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011819fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011820else
Matthias Kloseb9621712010-04-24 17:59:49 +000011821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11822$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011823fi
11824
Guido van Rossum7f253911997-05-09 02:42:48 +000011825
Guido van Rossum7f43da71994-08-01 12:15:30 +000011826# check for --with-libm=...
11827
Guido van Rossum563e7081996-09-10 18:20:48 +000011828case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011829Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011830*) LIBM=-lm
11831esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11833$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011835# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011836if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011837 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011838if test "$withval" = no
11839then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11841$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011842elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011843then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11845$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011846else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011847fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011848else
Matthias Kloseb9621712010-04-24 17:59:49 +000011849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11850$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011851fi
11852
Guido van Rossum7f43da71994-08-01 12:15:30 +000011853
11854# check for --with-libc=...
11855
Matthias Kloseb9621712010-04-24 17:59:49 +000011856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11857$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011859# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011860if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011861 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011862if test "$withval" = no
11863then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11865$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011866elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011867then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11869$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011870else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011871fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011872else
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11874$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011875fi
11876
Guido van Rossum7f43da71994-08-01 12:15:30 +000011877
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011878# **************************************************
11879# * Check for various properties of floating point *
11880# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011881
Matthias Kloseb9621712010-04-24 17:59:49 +000011882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11883$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011884if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011886else
11887
Matthias Kloseb9621712010-04-24 17:59:49 +000011888if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011889 ac_cv_little_endian_double=no
11890else
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011892/* end confdefs.h. */
11893
11894#include <string.h>
11895int main() {
11896 double x = 9006104071832581.0;
11897 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11898 return 0;
11899 else
11900 return 1;
11901}
11902
11903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011904if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011905 ac_cv_little_endian_double=yes
11906else
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011911fi
11912
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011913fi
11914
Matthias Kloseb9621712010-04-24 17:59:49 +000011915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11916$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011917if test "$ac_cv_little_endian_double" = yes
11918then
11919
Matthias Kloseb9621712010-04-24 17:59:49 +000011920$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011921
11922fi
11923
Matthias Kloseb9621712010-04-24 17:59:49 +000011924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11925$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011926if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011928else
11929
Matthias Kloseb9621712010-04-24 17:59:49 +000011930if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011931 ac_cv_big_endian_double=no
11932else
Matthias Kloseb9621712010-04-24 17:59:49 +000011933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011934/* end confdefs.h. */
11935
11936#include <string.h>
11937int main() {
11938 double x = 9006104071832581.0;
11939 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11940 return 0;
11941 else
11942 return 1;
11943}
11944
11945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011946if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011947 ac_cv_big_endian_double=yes
11948else
Matthias Kloseb9621712010-04-24 17:59:49 +000011949 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11952 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011953fi
11954
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011955fi
11956
Matthias Kloseb9621712010-04-24 17:59:49 +000011957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11958$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011959if test "$ac_cv_big_endian_double" = yes
11960then
11961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011963
11964fi
11965
11966# Some ARM platforms use a mixed-endian representation for doubles.
11967# While Python doesn't currently have full support for these platforms
11968# (see e.g., issue 1762561), we can at least make sure that float <-> string
11969# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11971$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011972if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011973 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011974else
11975
Matthias Kloseb9621712010-04-24 17:59:49 +000011976if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011977 ac_cv_mixed_endian_double=no
11978else
Matthias Kloseb9621712010-04-24 17:59:49 +000011979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011980/* end confdefs.h. */
11981
11982#include <string.h>
11983int main() {
11984 double x = 9006104071832581.0;
11985 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11986 return 0;
11987 else
11988 return 1;
11989}
11990
11991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011992if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011993 ac_cv_mixed_endian_double=yes
11994else
Matthias Kloseb9621712010-04-24 17:59:49 +000011995 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011999fi
12000
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012001fi
12002
Matthias Kloseb9621712010-04-24 17:59:49 +000012003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12004$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012005if test "$ac_cv_mixed_endian_double" = yes
12006then
12007
Matthias Kloseb9621712010-04-24 17:59:49 +000012008$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012009
12010fi
12011
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012012# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012013# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012014# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012015# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012016# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012017# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012018
12019# This inline assembler syntax may also work for suncc and icc,
12020# so we try it on all platforms.
12021
Matthias Kloseb9621712010-04-24 17:59:49 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12023$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012025/* end confdefs.h. */
12026
12027int
12028main ()
12029{
12030
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012031 unsigned short cw;
12032 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12033 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012034
12035 ;
12036 return 0;
12037}
12038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012039if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012040 have_gcc_asm_for_x87=yes
12041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012043fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12046$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012047if test "$have_gcc_asm_for_x87" = yes
12048then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012049
Matthias Kloseb9621712010-04-24 17:59:49 +000012050$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012051
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012052fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012053
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012054# Detect whether system arithmetic is subject to x87-style double
12055# rounding issues. The result of this test has little meaning on non
12056# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12057# mode is round-to-nearest and double rounding issues are present, and
12058# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12060$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012061# $BASECFLAGS may affect the result
12062ac_save_cc="$CC"
12063CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012064if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012065 ac_cv_x87_double_rounding=no
12066else
Matthias Kloseb9621712010-04-24 17:59:49 +000012067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012068/* end confdefs.h. */
12069
12070#include <stdlib.h>
12071#include <math.h>
12072int main() {
12073 volatile double x, y, z;
12074 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12075 x = 0.99999999999999989; /* 1-2**-53 */
12076 y = 1./x;
12077 if (y != 1.)
12078 exit(0);
12079 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12080 x = 1e16;
12081 y = 2.99999;
12082 z = x + y;
12083 if (z != 1e16+4.)
12084 exit(0);
12085 /* both tests show evidence of double rounding */
12086 exit(1);
12087}
12088
12089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012090if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012091 ac_cv_x87_double_rounding=no
12092else
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12096 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012097fi
12098
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012099CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12101$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012102if test "$ac_cv_x87_double_rounding" = yes
12103then
12104
Matthias Kloseb9621712010-04-24 17:59:49 +000012105$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012106
12107fi
12108
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012109# ************************************
12110# * Check for mathematical functions *
12111# ************************************
12112
12113LIBS_SAVE=$LIBS
12114LIBS="$LIBS $LIBM"
12115
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012116for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12117do :
12118 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12119ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012120if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012121 cat >>confdefs.h <<_ACEOF
12122#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12123_ACEOF
12124
12125fi
12126done
12127
12128for ac_func in hypot lgamma log1p round tgamma
12129do :
12130 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12131ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012132if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012133 cat >>confdefs.h <<_ACEOF
12134#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12135_ACEOF
12136
12137fi
12138done
12139
12140ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12141"
Gregory P. Smith69140482012-01-16 02:05:55 -080012142if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012143 ac_have_decl=1
12144else
12145 ac_have_decl=0
12146fi
12147
12148cat >>confdefs.h <<_ACEOF
12149#define HAVE_DECL_ISINF $ac_have_decl
12150_ACEOF
12151ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12152"
Gregory P. Smith69140482012-01-16 02:05:55 -080012153if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012154 ac_have_decl=1
12155else
12156 ac_have_decl=0
12157fi
12158
12159cat >>confdefs.h <<_ACEOF
12160#define HAVE_DECL_ISNAN $ac_have_decl
12161_ACEOF
12162ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12163"
Gregory P. Smith69140482012-01-16 02:05:55 -080012164if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012165 ac_have_decl=1
12166else
12167 ac_have_decl=0
12168fi
12169
12170cat >>confdefs.h <<_ACEOF
12171#define HAVE_DECL_ISFINITE $ac_have_decl
12172_ACEOF
12173
12174
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012175# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12176# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12178$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012179if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012181else
12182
Matthias Kloseb9621712010-04-24 17:59:49 +000012183if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012184 ac_cv_tanh_preserves_zero_sign=no
12185else
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012187/* end confdefs.h. */
12188
12189#include <math.h>
12190#include <stdlib.h>
12191int main() {
12192 /* return 0 if either negative zeros don't exist
12193 on this platform or if negative zeros exist
12194 and tanh(-0.) == -0. */
12195 if (atan2(0., -1.) == atan2(-0., -1.) ||
12196 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12197 else exit(1);
12198}
12199
12200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012201if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012202 ac_cv_tanh_preserves_zero_sign=yes
12203else
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12207 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012208fi
12209
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012210fi
12211
Matthias Kloseb9621712010-04-24 17:59:49 +000012212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12213$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012214if test "$ac_cv_tanh_preserves_zero_sign" = yes
12215then
12216
Matthias Kloseb9621712010-04-24 17:59:49 +000012217$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012218
12219fi
12220
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012221if test "$ac_cv_func_log1p" = yes
12222then
12223 # On some versions of AIX, log1p(-0.) returns 0. instead of
12224 # -0. See issue #9920.
12225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12226$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012227 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012228 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012229else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012230
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012231 if test "$cross_compiling" = yes; then :
12232 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012233else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12235/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012236
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012237 #include <math.h>
12238 #include <stdlib.h>
12239 int main() {
12240 /* Fail if the signs of log1p(-0.) and -0. can be
12241 distinguished. */
12242 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12243 return 0;
12244 else
12245 return 1;
12246 }
12247
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012248_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012249if ac_fn_c_try_run "$LINENO"; then :
12250 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012251else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012252 ac_cv_log1p_drops_zero_sign=yes
12253fi
12254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12255 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012256fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012257
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012258fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012259
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12261$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12262fi
12263if test "$ac_cv_log1p_drops_zero_sign" = yes
12264then
12265
12266$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12267
12268fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012269
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012270LIBS=$LIBS_SAVE
12271
Mark Dickinsona614f042009-11-28 12:48:43 +000012272# For multiprocessing module, check that sem_open
12273# actually works. For FreeBSD versions <= 7.2,
12274# the kernel module that provides POSIX semaphores
12275# isn't loaded by default, so an attempt to call
12276# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12278$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012279if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012281else
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012283 ac_cv_posix_semaphores_enabled=yes
12284else
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012286/* end confdefs.h. */
12287
12288#include <unistd.h>
12289#include <fcntl.h>
12290#include <stdio.h>
12291#include <semaphore.h>
12292#include <sys/stat.h>
12293
12294int main(void) {
12295 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12296 if (a == SEM_FAILED) {
12297 perror("sem_open");
12298 return 1;
12299 }
12300 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012301 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012302 return 0;
12303}
12304
12305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012306if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012307 ac_cv_posix_semaphores_enabled=yes
12308else
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12312 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012313fi
12314
12315
Mark Dickinsona614f042009-11-28 12:48:43 +000012316fi
12317
Matthias Kloseb9621712010-04-24 17:59:49 +000012318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12319$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012320if test $ac_cv_posix_semaphores_enabled = no
12321then
12322
Matthias Kloseb9621712010-04-24 17:59:49 +000012323$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012324
12325fi
12326
Mark Dickinson10683072009-04-18 21:18:19 +000012327# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12329$as_echo_n "checking for broken sem_getvalue... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012330if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012332else
Matthias Kloseb9621712010-04-24 17:59:49 +000012333 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012334 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012335else
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012337/* end confdefs.h. */
12338
12339#include <unistd.h>
12340#include <fcntl.h>
12341#include <stdio.h>
12342#include <semaphore.h>
12343#include <sys/stat.h>
12344
12345int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012346 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012347 int count;
12348 int res;
12349 if(a==SEM_FAILED){
12350 perror("sem_open");
12351 return 1;
12352
12353 }
12354 res = sem_getvalue(a, &count);
12355 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012356 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012357 return res==-1 ? 1 : 0;
12358}
12359
Mark Dickinson10683072009-04-18 21:18:19 +000012360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012361if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012362 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012363else
Matthias Kloseb9621712010-04-24 17:59:49 +000012364 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12367 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012368fi
12369
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012370
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012371fi
12372
Matthias Kloseb9621712010-04-24 17:59:49 +000012373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12374$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012375if test $ac_cv_broken_sem_getvalue = yes
12376then
12377
Matthias Kloseb9621712010-04-24 17:59:49 +000012378$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012379
12380fi
12381
Mark Dickinsonbd792642009-03-18 20:06:12 +000012382# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12384$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012385# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012386if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012387 enableval=$enable_big_digits; case $enable_big_digits in
12388yes)
12389 enable_big_digits=30 ;;
12390no)
12391 enable_big_digits=15 ;;
1239215|30)
12393 ;;
12394*)
Gregory P. Smith69140482012-01-16 02:05:55 -080012395 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 +000012396esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12398$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012399
12400cat >>confdefs.h <<_ACEOF
12401#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12402_ACEOF
12403
12404
12405else
Matthias Kloseb9621712010-04-24 17:59:49 +000012406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12407$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012408fi
12409
12410
Guido van Rossumef2255b2000-03-10 22:30:29 +000012411# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012412ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080012413if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012414
12415
Matthias Kloseb9621712010-04-24 17:59:49 +000012416$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012417
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012418 wchar_h="yes"
12419
Guido van Rossumef2255b2000-03-10 22:30:29 +000012420else
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012422
12423fi
12424
Michael W. Hudson54241132001-12-07 15:38:26 +000012425
Martin v. Löwis11437992002-04-12 09:54:03 +000012426
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012427# determine wchar_t size
12428if test "$wchar_h" = yes
12429then
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012431# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12432# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12433# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12435$as_echo_n "checking size of wchar_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012436if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012437 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012438else
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12440"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012441
Martin v. Löwis11437992002-04-12 09:54:03 +000012442else
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 if test "$ac_cv_type_wchar_t" = yes; then
12444 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12445$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012446as_fn_error 77 "cannot compute sizeof (wchar_t)
Gregory P. Smith69140482012-01-16 02:05:55 -080012447See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448 else
12449 ac_cv_sizeof_wchar_t=0
12450 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012452
Martin v. Löwis11437992002-04-12 09:54:03 +000012453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12455$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456
12457
12458
Martin v. Löwis11437992002-04-12 09:54:03 +000012459cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012460#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012461_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012462
Michael W. Hudson54241132001-12-07 15:38:26 +000012463
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012464fi
12465
Matthias Kloseb9621712010-04-24 17:59:49 +000012466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12467$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012468have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012470/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012471
12472#include <tcl.h>
12473#if TCL_UTF_MAX != 6
12474# error "NOT UCS4_TCL"
12475#endif
12476int
12477main ()
12478{
12479
12480 ;
12481 return 0;
12482}
12483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012485
12486
Matthias Kloseb9621712010-04-24 17:59:49 +000012487$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012488
12489 have_ucs4_tcl=yes
12490
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12494$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012495
Skip Montanaro6dead952003-09-25 14:50:04 +000012496# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012497if test "$wchar_h" = yes
12498then
12499 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12501$as_echo_n "checking whether wchar_t is signed... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012502 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012504else
12505
Matthias Kloseb9621712010-04-24 17:59:49 +000012506 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012507 ac_cv_wchar_t_signed=yes
12508else
Matthias Kloseb9621712010-04-24 17:59:49 +000012509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012510/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012511
12512 #include <wchar.h>
12513 int main()
12514 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012515 /* Success: exit code 0 */
12516 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012517 }
12518
12519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012520if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012521 ac_cv_wchar_t_signed=yes
12522else
Matthias Kloseb9621712010-04-24 17:59:49 +000012523 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12526 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012527fi
12528
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012529fi
12530
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12532$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533fi
12534
Matthias Kloseb9621712010-04-24 17:59:49 +000012535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12536$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012537
12538# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012539if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012540 withval=$with_wide_unicode;
12541if test "$withval" != no
12542then unicode_size="4"
12543else unicode_size="2"
12544fi
12545
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012546else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012547
Georg Brandl52d168a2008-01-07 18:10:24 +000012548case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012549 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012550 *) unicode_size="2" ;;
12551esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012552
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012553fi
12554
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012555
12556
Georg Brandl52d168a2008-01-07 18:10:24 +000012557case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012558 4)
12559 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12560
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012561 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012562 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012563 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012564 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012565esac
12566
Michael W. Hudson54241132001-12-07 15:38:26 +000012567
Martin v. Löwis11437992002-04-12 09:54:03 +000012568
Georg Brandl52d168a2008-01-07 18:10:24 +000012569# wchar_t is only usable if it maps to an unsigned type
12570if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012571 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012572then
12573 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012574
Matthias Kloseb9621712010-04-24 17:59:49 +000012575$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012576
Matthias Kloseb9621712010-04-24 17:59:49 +000012577 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012578
Georg Brandl52d168a2008-01-07 18:10:24 +000012579elif test "$ac_cv_sizeof_short" = "$unicode_size"
12580then
12581 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012583
Georg Brandl52d168a2008-01-07 18:10:24 +000012584elif test "$ac_cv_sizeof_long" = "$unicode_size"
12585then
12586 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012588
Georg Brandl52d168a2008-01-07 18:10:24 +000012589else
12590 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12593$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012594
12595# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12597$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012598if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012599 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012600else
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 ac_cv_c_bigendian=unknown
12602 # See if we're dealing with a universal compiler.
12603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12604/* end confdefs.h. */
12605#ifndef __APPLE_CC__
12606 not a universal capable compiler
12607 #endif
12608 typedef int dummy;
12609
Skip Montanaro6dead952003-09-25 14:50:04 +000012610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012611if ac_fn_c_try_compile "$LINENO"; then :
12612
12613 # Check for potential -arch flags. It is not universal unless
12614 # there are at least two -arch flags with different values.
12615 ac_arch=
12616 ac_prev=
12617 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12618 if test -n "$ac_prev"; then
12619 case $ac_word in
12620 i?86 | x86_64 | ppc | ppc64)
12621 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12622 ac_arch=$ac_word
12623 else
12624 ac_cv_c_bigendian=universal
12625 break
12626 fi
12627 ;;
12628 esac
12629 ac_prev=
12630 elif test "x$ac_word" = "x-arch"; then
12631 ac_prev=arch
12632 fi
12633 done
12634fi
12635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12636 if test $ac_cv_c_bigendian = unknown; then
12637 # See if sys/param.h defines the BYTE_ORDER macro.
12638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012639/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012640#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012641 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012642
Martin v. Löwis11437992002-04-12 09:54:03 +000012643int
12644main ()
12645{
Matthias Kloseb9621712010-04-24 17:59:49 +000012646#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12647 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12648 && LITTLE_ENDIAN)
12649 bogus endian macros
12650 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012651
12652 ;
12653 return 0;
12654}
12655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012656if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012657 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012659/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012660#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012662
Martin v. Löwis11437992002-04-12 09:54:03 +000012663int
12664main ()
12665{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012666#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012667 not big endian
12668 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012669
12670 ;
12671 return 0;
12672}
12673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012674if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012675 ac_cv_c_bigendian=yes
12676else
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012680fi
12681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12682 fi
12683 if test $ac_cv_c_bigendian = unknown; then
12684 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012686/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012687#include <limits.h>
12688
Martin v. Löwis11437992002-04-12 09:54:03 +000012689int
12690main ()
12691{
Matthias Kloseb9621712010-04-24 17:59:49 +000012692#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12693 bogus endian macros
12694 #endif
12695
Martin v. Löwis11437992002-04-12 09:54:03 +000012696 ;
12697 return 0;
12698}
12699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700if ac_fn_c_try_compile "$LINENO"; then :
12701 # It does; now see whether it defined to _BIG_ENDIAN or not.
12702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12703/* end confdefs.h. */
12704#include <limits.h>
12705
12706int
12707main ()
12708{
12709#ifndef _BIG_ENDIAN
12710 not big endian
12711 #endif
12712
12713 ;
12714 return 0;
12715}
12716_ACEOF
12717if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012718 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012719else
Matthias Kloseb9621712010-04-24 17:59:49 +000012720 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12723fi
12724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12725 fi
12726 if test $ac_cv_c_bigendian = unknown; then
12727 # Compile a test program.
12728 if test "$cross_compiling" = yes; then :
12729 # Try to guess by grepping values from an object file.
12730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12731/* end confdefs.h. */
12732short int ascii_mm[] =
12733 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12734 short int ascii_ii[] =
12735 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12736 int use_ascii (int i) {
12737 return ascii_mm[i] + ascii_ii[i];
12738 }
12739 short int ebcdic_ii[] =
12740 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12741 short int ebcdic_mm[] =
12742 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12743 int use_ebcdic (int i) {
12744 return ebcdic_mm[i] + ebcdic_ii[i];
12745 }
12746 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747
Matthias Kloseb9621712010-04-24 17:59:49 +000012748int
12749main ()
12750{
12751return use_ascii (foo) == use_ebcdic (foo);
12752 ;
12753 return 0;
12754}
12755_ACEOF
12756if ac_fn_c_try_compile "$LINENO"; then :
12757 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12758 ac_cv_c_bigendian=yes
12759 fi
12760 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12761 if test "$ac_cv_c_bigendian" = unknown; then
12762 ac_cv_c_bigendian=no
12763 else
12764 # finding both strings is unlikely to happen, but who knows?
12765 ac_cv_c_bigendian=unknown
12766 fi
12767 fi
12768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012770else
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012772/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012773$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012774int
12775main ()
12776{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 /* Are we little or big endian? From Harbison&Steele. */
12779 union
12780 {
12781 long int l;
12782 char c[sizeof (long int)];
12783 } u;
12784 u.l = 1;
12785 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012786
12787 ;
12788 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012789}
Martin v. Löwis11437992002-04-12 09:54:03 +000012790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012791if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012792 ac_cv_c_bigendian=no
12793else
Matthias Kloseb9621712010-04-24 17:59:49 +000012794 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12797 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12803$as_echo "$ac_cv_c_bigendian" >&6; }
12804 case $ac_cv_c_bigendian in #(
12805 yes)
12806 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12807;; #(
12808 no)
12809 ;; #(
12810 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012811
Matthias Kloseb9621712010-04-24 17:59:49 +000012812$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 ;; #(
12815 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012816 as_fn_error $? "unknown endianness
Gregory P. Smith69140482012-01-16 02:05:55 -080012817 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012819
Michael W. Hudson54241132001-12-07 15:38:26 +000012820
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012821# ABI version string for Python extension modules. This appears between the
12822# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12823# from the following attributes which affect the ABI of this Python build (in
12824# this order):
12825#
12826# * The Python implementation (always 'cpython-' for us)
12827# * The major and minor version numbers
12828# * --with-pydebug (adds a 'd')
12829# * --with-pymalloc (adds a 'm')
12830# * --with-wide-unicode (adds a 'u')
12831#
12832# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012833# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12834# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012835
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12837$as_echo_n "checking ABIFLAGS... " >&6; }
12838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12839$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12841$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012842SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12844$as_echo "$SOABI" >&6; }
12845
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12847$as_echo_n "checking LDVERSION... " >&6; }
12848LDVERSION='$(VERSION)$(ABIFLAGS)'
12849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12850$as_echo "$LDVERSION" >&6; }
12851
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012852# SO is the extension of shared libraries `(including the dot!)
12853# -- usually .so, .sl on HP-UX, .dll on Cygwin
12854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12855$as_echo_n "checking SO... " >&6; }
12856if test -z "$SO"
12857then
12858 case $ac_sys_system in
12859 hp*|HP*)
12860 case `uname -m` in
12861 ia64) SO=.so;;
12862 *) SO=.sl;;
12863 esac
12864 ;;
12865 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012866 Linux*|GNU*)
12867 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012868 *) SO=.so;;
12869 esac
12870else
12871 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012872 echo
12873 echo '====================================================================='
12874 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012875 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012876 echo '+ Do you really mean to change the extension for shared libraries? +'
12877 echo '+ Continuing in 10 seconds to let you to ponder. +'
12878 echo '+ +'
12879 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012880 sleep 10
12881fi
12882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12883$as_echo "$SO" >&6; }
12884
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012885# Check whether right shifting a negative integer extends the sign bit
12886# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12888$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012889if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012890 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012891else
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
Matthias Kloseb9621712010-04-24 17:59:49 +000012893if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012894 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012895else
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012897/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012898
12899int main()
12900{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012901 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012902}
12903
Martin v. Löwis11437992002-04-12 09:54:03 +000012904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012905if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012906 ac_cv_rshift_extends_sign=yes
12907else
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012912fi
12913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914fi
12915
Matthias Kloseb9621712010-04-24 17:59:49 +000012916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12917$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012918if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012919then
Martin v. Löwis11437992002-04-12 09:54:03 +000012920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012922
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012923fi
12924
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012925# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12927$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012928if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012930else
Martin v. Löwis11437992002-04-12 09:54:03 +000012931
Matthias Kloseb9621712010-04-24 17:59:49 +000012932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012933/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012934#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012935int
12936main ()
12937{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012938
12939 FILE *f = fopen("/dev/null", "r");
12940 flockfile(f);
12941 getc_unlocked(f);
12942 funlockfile(f);
12943
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 ;
12945 return 0;
12946}
12947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012948if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012949 ac_cv_have_getc_unlocked=yes
12950else
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 ac_cv_have_getc_unlocked=no
12952fi
12953rm -f core conftest.err conftest.$ac_objext \
12954 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12958$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012959if test "$ac_cv_have_getc_unlocked" = yes
12960then
Martin v. Löwis11437992002-04-12 09:54:03 +000012961
Matthias Kloseb9621712010-04-24 17:59:49 +000012962$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012963
12964fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012965
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012966# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012967# save the value of LIBS so we don't actually link Python with readline
12968LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012969
Gregory P. Smith18820942008-09-07 06:24:49 +000012970# On some systems we need to link readline to a termcap compatible
12971# library. NOTE: Keep the precedence of listed libraries synchronised
12972# with setup.py.
12973py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12975$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012976for py_libtermcap in "" ncursesw ncurses curses termcap; do
12977 if test -z "$py_libtermcap"; then
12978 READLINE_LIBS="-lreadline"
12979 else
12980 READLINE_LIBS="-lreadline -l$py_libtermcap"
12981 fi
12982 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012984/* end confdefs.h. */
12985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986/* Override any GCC internal prototype to avoid an error.
12987 Use char because int might match the return type of a GCC
12988 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012989#ifdef __cplusplus
12990extern "C"
12991#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012992char readline ();
12993int
12994main ()
12995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012997 ;
12998 return 0;
12999}
13000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013001if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013002 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013004rm -f core conftest.err conftest.$ac_objext \
13005 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013006 if test $py_cv_lib_readline = yes; then
13007 break
13008 fi
13009done
13010# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13011#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013012if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13014$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013015else
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13017$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013018
Matthias Kloseb9621712010-04-24 17:59:49 +000013019$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013020
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013021fi
13022
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013023# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13025$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013026if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013027 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013028else
13029 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013030LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013032/* end confdefs.h. */
13033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034/* Override any GCC internal prototype to avoid an error.
13035 Use char because int might match the return type of a GCC
13036 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013037#ifdef __cplusplus
13038extern "C"
13039#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013040char rl_callback_handler_install ();
13041int
13042main ()
13043{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013045 ;
13046 return 0;
13047}
13048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013049if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013050 ac_cv_lib_readline_rl_callback_handler_install=yes
13051else
Matthias Kloseb9621712010-04-24 17:59:49 +000013052 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013054rm -f core conftest.err conftest.$ac_objext \
13055 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013056LIBS=$ac_check_lib_save_LIBS
13057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13059$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013060if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013063
13064fi
13065
13066
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013067# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013069/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013070#include <readline/readline.h>
13071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013072if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013073 have_readline=yes
13074else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013075 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013076
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013077fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013078rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013079if test $have_readline = yes
13080then
Matthias Kloseb9621712010-04-24 17:59:49 +000013081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013082/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013083#include <readline/readline.h>
13084
13085_ACEOF
13086if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013087 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013088
Matthias Kloseb9621712010-04-24 17:59:49 +000013089$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013090
13091fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013092rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013095/* end confdefs.h. */
13096#include <readline/readline.h>
13097
13098_ACEOF
13099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013103
13104fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013105rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013106
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013107fi
13108
Martin v. Löwis0daad592001-09-30 21:09:59 +000013109# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13111$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013112if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013113 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013114else
Martin v. Löwis11437992002-04-12 09:54:03 +000013115 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013116LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013120/* Override any GCC internal prototype to avoid an error.
13121 Use char because int might match the return type of a GCC
13122 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013123#ifdef __cplusplus
13124extern "C"
13125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013126char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013127int
13128main ()
13129{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013130return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013131 ;
13132 return 0;
13133}
13134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013135if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013136 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013137else
Matthias Kloseb9621712010-04-24 17:59:49 +000013138 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013140rm -f core conftest.err conftest.$ac_objext \
13141 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013142LIBS=$ac_check_lib_save_LIBS
13143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13145$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013146if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013149
Martin v. Löwis0daad592001-09-30 21:09:59 +000013150fi
13151
Michael W. Hudson54241132001-12-07 15:38:26 +000013152
Thomas Wouters89d996e2007-09-08 17:39:28 +000013153# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13155$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013156if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013158else
13159 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013160LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013162/* end confdefs.h. */
13163
13164/* Override any GCC internal prototype to avoid an error.
13165 Use char because int might match the return type of a GCC
13166 builtin and then its argument prototype would still apply. */
13167#ifdef __cplusplus
13168extern "C"
13169#endif
13170char rl_completion_display_matches_hook ();
13171int
13172main ()
13173{
13174return rl_completion_display_matches_hook ();
13175 ;
13176 return 0;
13177}
13178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013179if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013180 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13181else
Matthias Kloseb9621712010-04-24 17:59:49 +000013182 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013184rm -f core conftest.err conftest.$ac_objext \
13185 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013186LIBS=$ac_check_lib_save_LIBS
13187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13189$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013190if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013191
Matthias Kloseb9621712010-04-24 17:59:49 +000013192$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013193
13194fi
13195
13196
Martin v. Löwis0daad592001-09-30 21:09:59 +000013197# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13199$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013200if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013201 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013202else
Martin v. Löwis11437992002-04-12 09:54:03 +000013203 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013204LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013208/* Override any GCC internal prototype to avoid an error.
13209 Use char because int might match the return type of a GCC
13210 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013211#ifdef __cplusplus
13212extern "C"
13213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013214char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013215int
13216main ()
13217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013219 ;
13220 return 0;
13221}
13222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013223if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013224 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013225else
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013228rm -f core conftest.err conftest.$ac_objext \
13229 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013230LIBS=$ac_check_lib_save_LIBS
13231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13233$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013234if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013235
Matthias Kloseb9621712010-04-24 17:59:49 +000013236$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013237
Guido van Rossum353ae582001-07-10 16:45:32 +000013238fi
13239
Jack Jansendd19cf82001-12-06 22:36:17 +000013240
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013241# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013243/* end confdefs.h. */
13244#include <readline/readline.h>
13245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013246if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013247 have_readline=yes
13248else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013249 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013250
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013251fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013252rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013253if test $have_readline = yes
13254then
Matthias Kloseb9621712010-04-24 17:59:49 +000013255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013256/* end confdefs.h. */
13257#include <readline/readline.h>
13258
13259_ACEOF
13260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013264
13265fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013266rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013267
13268fi
13269
Martin v. Löwis82bca632006-02-10 20:49:30 +000013270# End of readline checks: restore LIBS
13271LIBS=$LIBS_no_readline
13272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13274$as_echo_n "checking for broken nice()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013275if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013277else
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
Matthias Kloseb9621712010-04-24 17:59:49 +000013279if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013280 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013281else
Matthias Kloseb9621712010-04-24 17:59:49 +000013282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013283/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013284
13285int main()
13286{
13287 int val1 = nice(1);
13288 if (val1 != -1 && val1 == nice(2))
13289 exit(0);
13290 exit(1);
13291}
13292
Martin v. Löwis11437992002-04-12 09:54:03 +000013293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013294if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013295 ac_cv_broken_nice=yes
13296else
Matthias Kloseb9621712010-04-24 17:59:49 +000013297 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013299rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13300 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013301fi
13302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013303fi
13304
Matthias Kloseb9621712010-04-24 17:59:49 +000013305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13306$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013307if test "$ac_cv_broken_nice" = yes
13308then
Martin v. Löwis11437992002-04-12 09:54:03 +000013309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013311
13312fi
13313
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13315$as_echo_n "checking for broken poll()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013316if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013318else
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013320 ac_cv_broken_poll=no
13321else
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013323/* end confdefs.h. */
13324
13325#include <poll.h>
13326
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013327int main()
13328{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013329 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013330 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013331
13332 close (42);
13333
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013334 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013335 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013336 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013337 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013338 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013339 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013340 return 1;
13341}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013342
13343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013344if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013345 ac_cv_broken_poll=yes
13346else
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013348fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13350 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013353fi
13354
Matthias Kloseb9621712010-04-24 17:59:49 +000013355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13356$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013357if test "$ac_cv_broken_poll" = yes
13358then
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013361
13362fi
13363
Brett Cannon43802422005-02-10 20:48:03 +000013364# 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 +000013365# (which is not required by ISO C or UNIX spec) and/or if we support
13366# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013367ac_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 +000013368#include <$ac_cv_struct_tm>
13369
Matthias Kloseb9621712010-04-24 17:59:49 +000013370"
Gregory P. Smith69140482012-01-16 02:05:55 -080013371if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013372
13373cat >>confdefs.h <<_ACEOF
13374#define HAVE_STRUCT_TM_TM_ZONE 1
13375_ACEOF
13376
13377
13378fi
13379
13380if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13381
Matthias Kloseb9621712010-04-24 17:59:49 +000013382$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013383
13384else
Matthias Kloseb9621712010-04-24 17:59:49 +000013385 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13386"
Gregory P. Smith69140482012-01-16 02:05:55 -080013387if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013389else
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391fi
13392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013393cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013394#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013395_ACEOF
13396
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13398$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013399if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013401else
Matthias Kloseb9621712010-04-24 17:59:49 +000013402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013403/* end confdefs.h. */
13404#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405#if !HAVE_DECL_TZNAME
13406extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013407#endif
13408
13409int
13410main ()
13411{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013412return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013413 ;
13414 return 0;
13415}
13416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013417if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013418 ac_cv_var_tzname=yes
13419else
Matthias Kloseb9621712010-04-24 17:59:49 +000013420 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013422rm -f core conftest.err conftest.$ac_objext \
13423 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13426$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013427 if test $ac_cv_var_tzname = yes; then
13428
Matthias Kloseb9621712010-04-24 17:59:49 +000013429$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013430
13431 fi
13432fi
13433
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013434
Martin v. Löwis1d459062005-03-14 21:23:33 +000013435# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13437$as_echo_n "checking for working tzset()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013438if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013440else
13441
Matthias Kloseb9621712010-04-24 17:59:49 +000013442if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013443 ac_cv_working_tzset=no
13444else
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013446/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013447
13448#include <stdlib.h>
13449#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013450#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013451
13452#if HAVE_TZNAME
13453extern char *tzname[];
13454#endif
13455
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013456int main()
13457{
Brett Cannon18367812003-09-19 00:59:16 +000013458 /* Note that we need to ensure that not only does tzset(3)
13459 do 'something' with localtime, but it works as documented
13460 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013461 This includes making sure that tzname is set properly if
13462 tm->tm_zone does not exist since it is the alternative way
13463 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013464
13465 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013466 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013467 */
13468
Martin v. Löwis1d459062005-03-14 21:23:33 +000013469 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013470 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13471
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013472 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013473 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013474 if (localtime(&groundhogday)->tm_hour != 0)
13475 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013476#if HAVE_TZNAME
13477 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13478 if (strcmp(tzname[0], "UTC") ||
13479 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13480 exit(1);
13481#endif
Brett Cannon18367812003-09-19 00:59:16 +000013482
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013483 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013484 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013485 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013486 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013487#if HAVE_TZNAME
13488 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13489 exit(1);
13490#endif
Brett Cannon18367812003-09-19 00:59:16 +000013491
13492 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13493 tzset();
13494 if (localtime(&groundhogday)->tm_hour != 11)
13495 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013496#if HAVE_TZNAME
13497 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13498 exit(1);
13499#endif
13500
13501#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013502 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13503 exit(1);
13504 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13505 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013506#endif
Brett Cannon18367812003-09-19 00:59:16 +000013507
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013508 exit(0);
13509}
13510
13511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013512if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013513 ac_cv_working_tzset=yes
13514else
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13518 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013519fi
13520
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013521fi
13522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13524$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013525if test "$ac_cv_working_tzset" = yes
13526then
13527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013529
13530fi
13531
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013532# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13534$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013535if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013537else
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013539/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013540#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013541int
13542main ()
13543{
13544
13545struct stat st;
13546st.st_mtim.tv_nsec = 1;
13547
13548 ;
13549 return 0;
13550}
13551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013553 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013554else
Matthias Kloseb9621712010-04-24 17:59:49 +000013555 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13558fi
13559
Matthias Kloseb9621712010-04-24 17:59:49 +000013560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13561$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013562if test "$ac_cv_stat_tv_nsec" = yes
13563then
13564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013566
13567fi
13568
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013569# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13571$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013572if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013574else
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013576/* end confdefs.h. */
13577#include <sys/stat.h>
13578int
13579main ()
13580{
13581
13582struct stat st;
13583st.st_mtimespec.tv_nsec = 1;
13584
13585 ;
13586 return 0;
13587}
13588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013590 ac_cv_stat_tv_nsec2=yes
13591else
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13595fi
13596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13598$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013599if test "$ac_cv_stat_tv_nsec2" = yes
13600then
13601
Matthias Kloseb9621712010-04-24 17:59:49 +000013602$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013603
13604fi
13605
Jack Jansen666b1e72001-10-31 12:11:48 +000013606# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13608$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013609if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013611else
Matthias Kloseb9621712010-04-24 17:59:49 +000013612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013613/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013614#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013615int
13616main ()
13617{
Jack Jansen666b1e72001-10-31 12:11:48 +000013618
13619 int rtn;
13620 rtn = mvwdelch(0,0,0);
13621
Martin v. Löwis11437992002-04-12 09:54:03 +000013622 ;
13623 return 0;
13624}
13625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013626if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013627 ac_cv_mvwdelch_is_expression=yes
13628else
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13632fi
13633
Matthias Kloseb9621712010-04-24 17:59:49 +000013634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13635$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013636
13637if test "$ac_cv_mvwdelch_is_expression" = yes
13638then
Martin v. Löwis11437992002-04-12 09:54:03 +000013639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013641
13642fi
13643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13645$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013646if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013648else
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013650/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013651#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013652int
13653main ()
13654{
Jack Jansen666b1e72001-10-31 12:11:48 +000013655
13656 WINDOW *w;
13657 w->_flags = 0;
13658
Martin v. Löwis11437992002-04-12 09:54:03 +000013659 ;
13660 return 0;
13661}
13662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013663if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013664 ac_cv_window_has_flags=yes
13665else
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13669fi
13670
Matthias Kloseb9621712010-04-24 17:59:49 +000013671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13672$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013673
Jack Jansen666b1e72001-10-31 12:11:48 +000013674
13675if test "$ac_cv_window_has_flags" = yes
13676then
Martin v. Löwis11437992002-04-12 09:54:03 +000013677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013679
13680fi
13681
Matthias Kloseb9621712010-04-24 17:59:49 +000013682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13683$as_echo_n "checking for is_term_resized... " >&6; }
13684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013685/* end confdefs.h. */
13686#include <curses.h>
13687int
13688main ()
13689{
13690void *x=is_term_resized
13691 ;
13692 return 0;
13693}
13694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013695if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013696
Matthias Kloseb9621712010-04-24 17:59:49 +000013697$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013698
Matthias Kloseb159a552010-04-25 21:00:44 +000013699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013700$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013701else
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13703$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013704
13705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13707
Matthias Kloseb9621712010-04-24 17:59:49 +000013708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13709$as_echo_n "checking for resize_term... " >&6; }
13710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013711/* end confdefs.h. */
13712#include <curses.h>
13713int
13714main ()
13715{
13716void *x=resize_term
13717 ;
13718 return 0;
13719}
13720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013721if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013724
Matthias Kloseb159a552010-04-25 21:00:44 +000013725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013726$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013727else
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13729$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013730
13731fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13733
Matthias Kloseb9621712010-04-24 17:59:49 +000013734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13735$as_echo_n "checking for resizeterm... " >&6; }
13736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013737/* end confdefs.h. */
13738#include <curses.h>
13739int
13740main ()
13741{
13742void *x=resizeterm
13743 ;
13744 return 0;
13745}
13746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013747if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013748
Matthias Kloseb9621712010-04-24 17:59:49 +000013749$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013750
Matthias Kloseb159a552010-04-25 21:00:44 +000013751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013752$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013753else
Matthias Kloseb9621712010-04-24 17:59:49 +000013754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13755$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013756
13757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13759
Matthias Kloseb9621712010-04-24 17:59:49 +000013760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13761$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013762
13763if test -r /dev/ptmx
13764then
Matthias Kloseb9621712010-04-24 17:59:49 +000013765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13766$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013767
Matthias Kloseb9621712010-04-24 17:59:49 +000013768$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013769
Thomas Wouters89f507f2006-12-13 04:49:30 +000013770else
Matthias Kloseb9621712010-04-24 17:59:49 +000013771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13772$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013773fi
13774
Matthias Kloseb9621712010-04-24 17:59:49 +000013775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13776$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013777
13778if test -r /dev/ptc
13779then
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13781$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013782
Matthias Kloseb9621712010-04-24 17:59:49 +000013783$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013784
Thomas Wouters89f507f2006-12-13 04:49:30 +000013785else
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13787$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013788fi
13789
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013790if test "$have_long_long" = yes
13791then
Matthias Kloseb9621712010-04-24 17:59:49 +000013792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13793$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013794 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013795 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013796else
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013798 ac_cv_have_long_long_format=no
13799else
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013801/* end confdefs.h. */
13802
13803 #include <stdio.h>
13804 #include <stddef.h>
13805 #include <string.h>
13806
13807 #ifdef HAVE_SYS_TYPES_H
13808 #include <sys/types.h>
13809 #endif
13810
13811 int main()
13812 {
13813 char buffer[256];
13814
13815 if (sprintf(buffer, "%lld", (long long)123) < 0)
13816 return 1;
13817 if (strcmp(buffer, "123"))
13818 return 1;
13819
13820 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13821 return 1;
13822 if (strcmp(buffer, "-123"))
13823 return 1;
13824
13825 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13826 return 1;
13827 if (strcmp(buffer, "123"))
13828 return 1;
13829
13830 return 0;
13831 }
13832
13833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013834if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013835 ac_cv_have_long_long_format=yes
13836else
Matthias Kloseb9621712010-04-24 17:59:49 +000013837 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013838fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013839rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13840 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013841fi
13842
13843
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013844fi
13845
Matthias Kloseb9621712010-04-24 17:59:49 +000013846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13847$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013848fi
13849
Mark Dickinson89d7d412009-12-31 20:50:59 +000013850if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013851then
13852
Matthias Kloseb9621712010-04-24 17:59:49 +000013853$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013854
13855fi
13856
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013857if test $ac_sys_system = Darwin
13858then
13859 LIBS="$LIBS -framework CoreFoundation"
13860fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013861
Matthias Kloseb9621712010-04-24 17:59:49 +000013862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13863$as_echo_n "checking for %zd printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013864if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013865 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013866else
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013868 ac_cv_have_size_t_format="cross -- assuming yes"
13869
Thomas Wouters477c8d52006-05-27 19:21:47 +000013870else
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013872/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013873
Thomas Wouters477c8d52006-05-27 19:21:47 +000013874#include <stdio.h>
13875#include <stddef.h>
13876#include <string.h>
13877
Christian Heimes2c181612007-12-17 20:04:13 +000013878#ifdef HAVE_SYS_TYPES_H
13879#include <sys/types.h>
13880#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013881
13882#ifdef HAVE_SSIZE_T
13883typedef ssize_t Py_ssize_t;
13884#elif SIZEOF_VOID_P == SIZEOF_LONG
13885typedef long Py_ssize_t;
13886#else
13887typedef int Py_ssize_t;
13888#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013889
Christian Heimes2c181612007-12-17 20:04:13 +000013890int main()
13891{
13892 char buffer[256];
13893
Thomas Wouters477c8d52006-05-27 19:21:47 +000013894 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13895 return 1;
13896
Thomas Wouters89f507f2006-12-13 04:49:30 +000013897 if (strcmp(buffer, "123"))
13898 return 1;
13899
13900 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13901 return 1;
13902
13903 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013904 return 1;
13905
13906 return 0;
13907}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013908
Thomas Wouters477c8d52006-05-27 19:21:47 +000013909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013910if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013911 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013912else
Matthias Kloseb9621712010-04-24 17:59:49 +000013913 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013915rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13916 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013917fi
13918
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13921$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013922if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013923
Matthias Kloseb9621712010-04-24 17:59:49 +000013924$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013925
13926fi
13927
Matthias Kloseb9621712010-04-24 17:59:49 +000013928ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013929#ifdef HAVE_SYS_TYPES_H
13930#include <sys/types.h>
13931#endif
13932#ifdef HAVE_SYS_SOCKET_H
13933#include <sys/socket.h>
13934#endif
13935
Matthias Kloseb9621712010-04-24 17:59:49 +000013936"
Gregory P. Smith69140482012-01-16 02:05:55 -080013937if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013938
Martin v. Löwis11437992002-04-12 09:54:03 +000013939else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013940
Matthias Kloseb9621712010-04-24 17:59:49 +000013941$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013942
13943fi
13944
Michael W. Hudson54241132001-12-07 15:38:26 +000013945
Matthias Kloseb9621712010-04-24 17:59:49 +000013946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13947$as_echo_n "checking for broken mbstowcs... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013948if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013950else
Matthias Kloseb9621712010-04-24 17:59:49 +000013951 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013952 ac_cv_broken_mbstowcs=no
13953else
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013955/* end confdefs.h. */
13956
13957#include<stdlib.h>
13958int main() {
13959 size_t len = -1;
13960 const char *str = "text";
13961 len = mbstowcs(NULL, str, 0);
13962 return (len != 4);
13963}
13964
13965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013966if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013967 ac_cv_broken_mbstowcs=no
13968else
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13972 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013973fi
13974
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013975fi
13976
Matthias Kloseb9621712010-04-24 17:59:49 +000013977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13978$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013979if test "$ac_cv_broken_mbstowcs" = yes
13980then
13981
Matthias Kloseb9621712010-04-24 17:59:49 +000013982$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013983
13984fi
13985
Antoine Pitrou042b1282010-08-13 21:15:58 +000013986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13987$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013988if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013989 $as_echo_n "(cached) " >&6
13990else
13991 if test "$cross_compiling" = yes; then :
13992 ac_cv_computed_gotos=no
13993else
13994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13995/* end confdefs.h. */
13996
13997int main(int argc, char **argv)
13998{
13999 static void *targets[1] = { &&LABEL1 };
14000 goto LABEL2;
14001LABEL1:
14002 return 0;
14003LABEL2:
14004 goto *targets[0];
14005 return 1;
14006}
14007
14008_ACEOF
14009if ac_fn_c_try_run "$LINENO"; then :
14010 ac_cv_computed_gotos=yes
14011else
14012 ac_cv_computed_gotos=no
14013fi
14014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14015 conftest.$ac_objext conftest.beam conftest.$ac_ext
14016fi
14017
14018fi
14019
14020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14021$as_echo "$ac_cv_computed_gotos" >&6; }
14022if test "$ac_cv_computed_gotos" = yes
14023then
14024
14025$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14026
14027fi
14028
Antoine Pitroub52ec782009-01-25 16:34:23 +000014029# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14031$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014032
14033# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014034if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014035 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014036if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014037then
14038
Matthias Kloseb9621712010-04-24 17:59:49 +000014039$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014040
Matthias Kloseb9621712010-04-24 17:59:49 +000014041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14042$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014043fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014044if test "$withval" = no
14045then
14046
14047$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14048
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14050$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014051fi
14052
Antoine Pitrou042b1282010-08-13 21:15:58 +000014053else
14054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14055$as_echo "no value specified" >&6; }
14056fi
14057
Antoine Pitroub52ec782009-01-25 16:34:23 +000014058
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014059case $ac_sys_system in
14060AIX*)
14061
14062$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14063 ;;
14064esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014065
Michael W. Hudson54241132001-12-07 15:38:26 +000014066
Jesus Cea6a792292010-05-03 21:18:48 +000014067case $ac_sys_system in
Gregory P. Smith69140482012-01-16 02:05:55 -080014068 OSF*) as_fn_error $? "OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606" "$LINENO" 5 ;;
Jesus Cea6a792292010-05-03 21:18:48 +000014069esac
14070
Gregory P. Smith138fa432010-12-13 08:00:52 +000014071ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Gregory P. Smith69140482012-01-16 02:05:55 -080014072if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000014073
14074$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
14075
14076fi
Jesus Cea6a792292010-05-03 21:18:48 +000014077
14078
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014079
14080
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014081for h in `(cd $srcdir;echo Python/thread_*.h)`
14082do
14083 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14084done
14085
Michael W. Hudson54241132001-12-07 15:38:26 +000014086
Neal Norwitzd24499d2005-12-18 21:36:39 +000014087SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14089$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014090for dir in $SRCDIRS; do
14091 if test ! -d $dir; then
14092 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014093 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014094done
Matthias Kloseb9621712010-04-24 17:59:49 +000014095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14096$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014097
Guido van Rossum627b2d71993-12-24 10:39:16 +000014098# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014099ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014100
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014101ac_config_files="$ac_config_files Modules/ld_so_aix"
14102
Martin v. Löwis11437992002-04-12 09:54:03 +000014103cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014104# This file is a shell script that caches the results of configure
14105# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014106# scripts and configure runs, see configure's option --config-cache.
14107# It is not useful on other systems. If it contains results you don't
14108# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014109#
Martin v. Löwis11437992002-04-12 09:54:03 +000014110# config.status only pays attention to the cache file if you give it
14111# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014112#
Skip Montanaro6dead952003-09-25 14:50:04 +000014113# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014114# loading this file, other *unset* `ac_cv_foo' will be assigned the
14115# following values.
14116
14117_ACEOF
14118
Guido van Rossumf78abae1997-01-21 22:02:36 +000014119# The following way of writing the cache mishandles newlines in values,
14120# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014122# Ultrix sh set writes to stderr and can't be redirected directly,
14123# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014124(
14125 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14126 eval ac_val=\$$ac_var
14127 case $ac_val in #(
14128 *${as_nl}*)
14129 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14131$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014132 esac
14133 case $ac_var in #(
14134 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14136 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014137 esac ;;
14138 esac
14139 done
14140
Martin v. Löwis11437992002-04-12 09:54:03 +000014141 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014142 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14143 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 # `set' does not quote correctly, so add quotes: double-quote
14145 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014146 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014147 "s/'/'\\\\''/g;
14148 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014150 *)
14151 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014152 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014153 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014154 esac |
14155 sort
14156) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014157 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014158 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014160 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014161 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14162 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14164 :end' >>confcache
14165if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14166 if test -w "$cache_file"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014167 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14169$as_echo "$as_me: updating cache $cache_file" >&6;}
Gregory P. Smith69140482012-01-16 02:05:55 -080014170 if test ! -f "$cache_file" || test -h "$cache_file"; then
14171 cat confcache >"$cache_file"
14172 else
14173 case $cache_file in #(
14174 */* | ?:*)
14175 mv -f confcache "$cache_file"$$ &&
14176 mv -f "$cache_file"$$ "$cache_file" ;; #(
14177 *)
14178 mv -f confcache "$cache_file" ;;
14179 esac
14180 fi
14181 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014182 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14184$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014185 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014186fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014187rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014188
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014189test "x$prefix" = xNONE && prefix=$ac_default_prefix
14190# Let make expand exec_prefix.
14191test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014192
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014193DEFS=-DHAVE_CONFIG_H
14194
Skip Montanaro6dead952003-09-25 14:50:04 +000014195ac_libobjs=
14196ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014197U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014198for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14199 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014201 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14203 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014204 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14205 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014206done
14207LIBOBJS=$ac_libobjs
14208
14209LTLIBOBJS=$ac_ltlibobjs
14210
14211
Martin v. Löwis11437992002-04-12 09:54:03 +000014212
Matthias Kloseb9621712010-04-24 17:59:49 +000014213
Gregory P. Smith69140482012-01-16 02:05:55 -080014214: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014215ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014216ac_clean_files_save=$ac_clean_files
14217ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014218{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14219$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14220as_write_fail=0
14221cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014222#! $SHELL
14223# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014224# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014225# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014226# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014227
Martin v. Löwis11437992002-04-12 09:54:03 +000014228debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014229ac_cs_recheck=false
14230ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014231
Matthias Kloseb9621712010-04-24 17:59:49 +000014232SHELL=\${CONFIG_SHELL-$SHELL}
14233export SHELL
14234_ASEOF
14235cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14236## -------------------- ##
14237## M4sh Initialization. ##
14238## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014240# Be more Bourne compatible
14241DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014242if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014243 emulate sh
14244 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014246 # is contrary to our usage. Disable this feature.
14247 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014249else
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 case `(set -o) 2>/dev/null` in #(
14251 *posix*) :
14252 set -o posix ;; #(
14253 *) :
14254 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014256fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014257
14258
Matthias Kloseb9621712010-04-24 17:59:49 +000014259as_nl='
14260'
14261export as_nl
14262# Printing a long string crashes Solaris 7 /usr/bin/printf.
14263as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14264as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14265as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14266# Prefer a ksh shell builtin over an external printf program on Solaris,
14267# but without wasting forks for bash or zsh.
14268if test -z "$BASH_VERSION$ZSH_VERSION" \
14269 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14270 as_echo='print -r --'
14271 as_echo_n='print -rn --'
14272elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14273 as_echo='printf %s\n'
14274 as_echo_n='printf %s'
14275else
14276 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14277 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14278 as_echo_n='/usr/ucb/echo -n'
14279 else
14280 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14281 as_echo_n_body='eval
14282 arg=$1;
14283 case $arg in #(
14284 *"$as_nl"*)
14285 expr "X$arg" : "X\\(.*\\)$as_nl";
14286 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14287 esac;
14288 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14289 '
14290 export as_echo_n_body
14291 as_echo_n='sh -c $as_echo_n_body as_echo'
14292 fi
14293 export as_echo_body
14294 as_echo='sh -c $as_echo_body as_echo'
14295fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014296
14297# The user is always right.
14298if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014299 PATH_SEPARATOR=:
14300 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14301 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14302 PATH_SEPARATOR=';'
14303 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014304fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014306
14307# IFS
14308# We need space, tab and new line, in precisely that order. Quoting is
14309# there to prevent editors from complaining about space-tab.
14310# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14311# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312IFS=" "" $as_nl"
14313
14314# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080014315as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014316case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014317 *[\\/]* ) as_myself=$0 ;;
14318 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014319for as_dir in $PATH
14320do
14321 IFS=$as_save_IFS
14322 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14324 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014327 ;;
14328esac
14329# We did not find ourselves, most probably we were run as `sh COMMAND'
14330# in which case we are not to be found in the path.
14331if test "x$as_myself" = x; then
14332 as_myself=$0
14333fi
14334if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14336 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014337fi
14338
Matthias Kloseb9621712010-04-24 17:59:49 +000014339# Unset variables that we do not need and which cause bugs (e.g. in
14340# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14341# suppresses any "Segmentation fault" message there. '((' could
14342# trigger a bug in pdksh 5.2.14.
14343for as_var in BASH_ENV ENV MAIL MAILPATH
14344do eval test x\${$as_var+set} = xset \
14345 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014346done
14347PS1='$ '
14348PS2='> '
14349PS4='+ '
14350
14351# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014352LC_ALL=C
14353export LC_ALL
14354LANGUAGE=C
14355export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014356
Matthias Kloseb9621712010-04-24 17:59:49 +000014357# CDPATH.
14358(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14359
14360
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014361# as_fn_error STATUS ERROR [LINENO LOG_FD]
14362# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014363# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14364# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014365# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014366as_fn_error ()
14367{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014368 as_status=$1; test $as_status -eq 0 && as_status=1
14369 if test "$4"; then
14370 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14371 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014373 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 as_fn_exit $as_status
14375} # as_fn_error
14376
14377
14378# as_fn_set_status STATUS
14379# -----------------------
14380# Set $? to STATUS, without forking.
14381as_fn_set_status ()
14382{
14383 return $1
14384} # as_fn_set_status
14385
14386# as_fn_exit STATUS
14387# -----------------
14388# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14389as_fn_exit ()
14390{
14391 set +e
14392 as_fn_set_status $1
14393 exit $1
14394} # as_fn_exit
14395
14396# as_fn_unset VAR
14397# ---------------
14398# Portably unset VAR.
14399as_fn_unset ()
14400{
14401 { eval $1=; unset $1;}
14402}
14403as_unset=as_fn_unset
14404# as_fn_append VAR VALUE
14405# ----------------------
14406# Append the text in VALUE to the end of the definition contained in VAR. Take
14407# advantage of any shell optimizations that allow amortized linear growth over
14408# repeated appends, instead of the typical quadratic growth present in naive
14409# implementations.
14410if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14411 eval 'as_fn_append ()
14412 {
14413 eval $1+=\$2
14414 }'
14415else
14416 as_fn_append ()
14417 {
14418 eval $1=\$$1\$2
14419 }
14420fi # as_fn_append
14421
14422# as_fn_arith ARG...
14423# ------------------
14424# Perform arithmetic evaluation on the ARGs, and store the result in the
14425# global $as_val. Take advantage of shells that can avoid forks. The arguments
14426# must be portable across $(()) and expr.
14427if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14428 eval 'as_fn_arith ()
14429 {
14430 as_val=$(( $* ))
14431 }'
14432else
14433 as_fn_arith ()
14434 {
14435 as_val=`expr "$@" || test $? -eq 1`
14436 }
14437fi # as_fn_arith
14438
14439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014440if expr a : '\(a\)' >/dev/null 2>&1 &&
14441 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14442 as_expr=expr
14443else
14444 as_expr=false
14445fi
14446
14447if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14448 as_basename=basename
14449else
14450 as_basename=false
14451fi
14452
Matthias Kloseb9621712010-04-24 17:59:49 +000014453if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14454 as_dirname=dirname
14455else
14456 as_dirname=false
14457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459as_me=`$as_basename -- "$0" ||
14460$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14461 X"$0" : 'X\(//\)$' \| \
14462 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014463$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464 sed '/^.*\/\([^/][^/]*\)\/*$/{
14465 s//\1/
14466 q
14467 }
14468 /^X\/\(\/\/\)$/{
14469 s//\1/
14470 q
14471 }
14472 /^X\/\(\/\).*/{
14473 s//\1/
14474 q
14475 }
14476 s/.*/./; q'`
14477
Matthias Kloseb9621712010-04-24 17:59:49 +000014478# Avoid depending upon Character Ranges.
14479as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14480as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14481as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14482as_cr_digits='0123456789'
14483as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014484
14485ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014486case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 xy) ECHO_C='\c';;
14491 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14492 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493 esac;;
14494*)
14495 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014496esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014497
Martin v. Löwis11437992002-04-12 09:54:03 +000014498rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499if test -d conf$$.dir; then
14500 rm -f conf$$.dir/conf$$.file
14501else
14502 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014503 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014505if (echo >conf$$.file) 2>/dev/null; then
14506 if ln -s conf$$.file conf$$ 2>/dev/null; then
14507 as_ln_s='ln -s'
14508 # ... but there are two gotchas:
14509 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14510 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014511 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014513 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 elif ln conf$$.file conf$$ 2>/dev/null; then
14515 as_ln_s=ln
14516 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014517 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014519else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014520 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000014521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014522rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14523rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014524
Matthias Kloseb9621712010-04-24 17:59:49 +000014525
14526# as_fn_mkdir_p
14527# -------------
14528# Create "$as_dir" as a directory, including parents if necessary.
14529as_fn_mkdir_p ()
14530{
14531
14532 case $as_dir in #(
14533 -*) as_dir=./$as_dir;;
14534 esac
14535 test -d "$as_dir" || eval $as_mkdir_p || {
14536 as_dirs=
14537 while :; do
14538 case $as_dir in #(
14539 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14540 *) as_qdir=$as_dir;;
14541 esac
14542 as_dirs="'$as_qdir' $as_dirs"
14543 as_dir=`$as_dirname -- "$as_dir" ||
14544$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14545 X"$as_dir" : 'X\(//\)[^/]' \| \
14546 X"$as_dir" : 'X\(//\)$' \| \
14547 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14548$as_echo X"$as_dir" |
14549 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14550 s//\1/
14551 q
14552 }
14553 /^X\(\/\/\)[^/].*/{
14554 s//\1/
14555 q
14556 }
14557 /^X\(\/\/\)$/{
14558 s//\1/
14559 q
14560 }
14561 /^X\(\/\).*/{
14562 s//\1/
14563 q
14564 }
14565 s/.*/./; q'`
14566 test -d "$as_dir" && break
14567 done
14568 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014569 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014570
14571
14572} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014573if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014575else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014576 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014577 as_mkdir_p=false
14578fi
14579
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014580
14581# as_fn_executable_p FILE
14582# -----------------------
14583# Test if FILE is an executable regular file.
14584as_fn_executable_p ()
14585{
14586 test -f "$1" && test -x "$1"
14587} # as_fn_executable_p
14588as_test_x='test -x'
14589as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014590
14591# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014592as_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 +000014593
14594# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014595as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014596
14597
Martin v. Löwis11437992002-04-12 09:54:03 +000014598exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014599## ----------------------------------- ##
14600## Main body of $CONFIG_STATUS script. ##
14601## ----------------------------------- ##
14602_ASEOF
14603test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014604
Matthias Kloseb9621712010-04-24 17:59:49 +000014605cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14606# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014607# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608# values after options handling.
14609ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014610This file was extended by python $as_me 3.2, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014611generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014612
14613 CONFIG_FILES = $CONFIG_FILES
14614 CONFIG_HEADERS = $CONFIG_HEADERS
14615 CONFIG_LINKS = $CONFIG_LINKS
14616 CONFIG_COMMANDS = $CONFIG_COMMANDS
14617 $ $0 $@
14618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014619on `(hostname || uname -n) 2>/dev/null | sed 1q`
14620"
14621
Martin v. Löwis11437992002-04-12 09:54:03 +000014622_ACEOF
14623
Matthias Kloseb9621712010-04-24 17:59:49 +000014624case $ac_config_files in *"
14625"*) set x $ac_config_files; shift; ac_config_files=$*;;
14626esac
14627
14628case $ac_config_headers in *"
14629"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14630esac
14631
14632
14633cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014634# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014635config_files="$ac_config_files"
14636config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014638_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014639
Matthias Kloseb9621712010-04-24 17:59:49 +000014640cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014641ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014642\`$as_me' instantiates files and other configuration actions
14643from templates according to the current configuration. Unless the files
14644and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014645
Matthias Kloseb9621712010-04-24 17:59:49 +000014646Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014647
14648 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014650 --config print configuration, then exit
14651 -q, --quiet, --silent
14652 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014653 -d, --debug don't remove temporary files
14654 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014655 --file=FILE[:TEMPLATE]
14656 instantiate the configuration file FILE
14657 --header=FILE[:TEMPLATE]
14658 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014659
14660Configuration files:
14661$config_files
14662
14663Configuration headers:
14664$config_headers
14665
Matthias Kloseb9621712010-04-24 17:59:49 +000014666Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014669cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14670ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014671ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014672python config.status 3.2
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014673configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000014674 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014675
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014676Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014677This config.status script is free software; the Free Software Foundation
14678gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014679
14680ac_pwd='$ac_pwd'
14681srcdir='$srcdir'
14682INSTALL='$INSTALL'
Trent Nelsona45afca2012-08-30 14:32:02 +000014683MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000014684test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014685_ACEOF
14686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14688# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014689ac_need_defaults=:
14690while test $# != 0
14691do
14692 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014693 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014694 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14695 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014696 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014697 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014698 --*=)
14699 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14700 ac_optarg=
14701 ac_shift=:
14702 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014703 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014704 ac_option=$1
14705 ac_optarg=$2
14706 ac_shift=shift
14707 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014708 esac
14709
Skip Montanaro6dead952003-09-25 14:50:04 +000014710 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014711 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014712 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14713 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014714 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 $as_echo "$ac_cs_version"; exit ;;
14716 --config | --confi | --conf | --con | --co | --c )
14717 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014718 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014719 debug=: ;;
14720 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014721 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 case $ac_optarg in
14723 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014724 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014725 esac
14726 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014727 ac_need_defaults=false;;
14728 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014729 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 case $ac_optarg in
14731 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14732 esac
14733 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014734 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735 --he | --h)
14736 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014737 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014738Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014739 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014741 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14742 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14743 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014744
14745 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014746 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014747Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014748
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014751
14752 esac
14753 shift
14754done
14755
Skip Montanaro6dead952003-09-25 14:50:04 +000014756ac_configure_extra_args=
14757
14758if $ac_cs_silent; then
14759 exec 6>/dev/null
14760 ac_configure_extra_args="$ac_configure_extra_args --silent"
14761fi
14762
14763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014764cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014765if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014766 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000014767 shift
14768 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14769 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014772fi
14773
Martin v. Löwis11437992002-04-12 09:54:03 +000014774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014775cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014776exec 5>>config.log
14777{
14778 echo
14779 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14780## Running $as_me. ##
14781_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014782 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014786cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014787_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014788
Matthias Kloseb9621712010-04-24 17:59:49 +000014789cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790
14791# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014792for ac_config_target in $ac_config_targets
14793do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014794 case $ac_config_target in
14795 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14796 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14797 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014798 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14799 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014800 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14801 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014802 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014803 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014804
Gregory P. Smith69140482012-01-16 02:05:55 -080014805 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 esac
14807done
14808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809
Martin v. Löwis11437992002-04-12 09:54:03 +000014810# If the user did not use the arguments to specify the items to instantiate,
14811# then the envvar interface is used. Set only those that are not.
14812# We use the long form for the default assignment because of an extremely
14813# bizarre bug on SunOS 4.1.3.
14814if $ac_need_defaults; then
14815 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14816 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14817fi
14818
Skip Montanaro6dead952003-09-25 14:50:04 +000014819# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014820# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014821# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822# Hook for its removal unless debugging.
14823# Note that there is a small window in which the directory will not be cleaned:
14824# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014825$debug ||
14826{
Gregory P. Smith69140482012-01-16 02:05:55 -080014827 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014828 trap 'exit_status=$?
Gregory P. Smith69140482012-01-16 02:05:55 -080014829 : "${ac_tmp:=$tmp}"
14830 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014831' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014832 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014833}
Martin v. Löwis11437992002-04-12 09:54:03 +000014834# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014835
Martin v. Löwis11437992002-04-12 09:54:03 +000014836{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Gregory P. Smith69140482012-01-16 02:05:55 -080014838 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014839} ||
14840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841 tmp=./conf$$-$RANDOM
14842 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014843} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080014844ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014845
Matthias Kloseb9621712010-04-24 17:59:49 +000014846# Set up the scripts for CONFIG_FILES section.
14847# No need to generate them if there are no CONFIG_FILES.
14848# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014849if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014850
Matthias Kloseb9621712010-04-24 17:59:49 +000014851
14852ac_cr=`echo X | tr X '\015'`
14853# On cygwin, bash can eat \r inside `` if the user requested igncr.
14854# But we know of no other shell where ac_cr would be empty at this
14855# point, so we can use a bashism as a fallback.
14856if test "x$ac_cr" = x; then
14857 eval ac_cr=\$\'\\r\'
14858fi
14859ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14860if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014861 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014862else
14863 ac_cs_awk_cr=$ac_cr
14864fi
14865
Gregory P. Smith69140482012-01-16 02:05:55 -080014866echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014867_ACEOF
14868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869
Matthias Kloseb9621712010-04-24 17:59:49 +000014870{
14871 echo "cat >conf$$subs.awk <<_ACEOF" &&
14872 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14873 echo "_ACEOF"
14874} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014875 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14876ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014877ac_delim='%!_!# '
14878for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014879 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014880 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881
Matthias Kloseb9621712010-04-24 17:59:49 +000014882 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14883 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014884 break
14885 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014886 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887 else
14888 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014889 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014890done
Matthias Kloseb9621712010-04-24 17:59:49 +000014891rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014892
Matthias Kloseb9621712010-04-24 17:59:49 +000014893cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Gregory P. Smith69140482012-01-16 02:05:55 -080014894cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014896sed -n '
14897h
14898s/^/S["/; s/!.*/"]=/
14899p
14900g
14901s/^[^!]*!//
14902:repl
14903t repl
14904s/'"$ac_delim"'$//
14905t delim
14906:nl
14907h
14908s/\(.\{148\}\)..*/\1/
14909t more1
14910s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14911p
14912n
14913b repl
14914:more1
14915s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14916p
14917g
14918s/.\{148\}//
14919t nl
14920:delim
14921h
14922s/\(.\{148\}\)..*/\1/
14923t more2
14924s/["\\]/\\&/g; s/^/"/; s/$/"/
14925p
14926b
14927:more2
14928s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14929p
14930g
14931s/.\{148\}//
14932t delim
14933' <conf$$subs.awk | sed '
14934/^[^""]/{
14935 N
14936 s/\n//
14937}
14938' >>$CONFIG_STATUS || ac_write_fail=1
14939rm -f conf$$subs.awk
14940cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14941_ACAWK
Gregory P. Smith69140482012-01-16 02:05:55 -080014942cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014943 for (key in S) S_is_set[key] = 1
14944 FS = ""
14945
14946}
14947{
14948 line = $ 0
14949 nfields = split(line, field, "@")
14950 substed = 0
14951 len = length(field[1])
14952 for (i = 2; i < nfields; i++) {
14953 key = field[i]
14954 keylen = length(key)
14955 if (S_is_set[key]) {
14956 value = S[key]
14957 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14958 len += length(value) + length(field[++i])
14959 substed = 1
14960 } else
14961 len += 1 + keylen
14962 }
14963
14964 print line
14965}
14966
14967_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014969cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14970if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14971 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14972else
14973 cat
Gregory P. Smith69140482012-01-16 02:05:55 -080014974fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014975 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014976_ACEOF
14977
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014978# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14979# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980# trailing colons and then remove the whole line if VPATH becomes empty
14981# (actually we leave an empty line to preserve line numbers).
14982if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014983 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14984h
14985s///
14986s/^/:/
14987s/[ ]*$/:/
14988s/:\$(srcdir):/:/g
14989s/:\${srcdir}:/:/g
14990s/:@srcdir@:/:/g
14991s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014992s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014993x
14994s/\(=[ ]*\).*/\1/
14995G
14996s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997s/^[^=]*=[ ]*$//
14998}'
14999fi
15000
Matthias Kloseb9621712010-04-24 17:59:49 +000015001cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015002fi # test -n "$CONFIG_FILES"
15003
Matthias Kloseb9621712010-04-24 17:59:49 +000015004# Set up the scripts for CONFIG_HEADERS section.
15005# No need to generate them if there are no CONFIG_HEADERS.
15006# This happens for instance with `./config.status Makefile'.
15007if test -n "$CONFIG_HEADERS"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080015008cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015009BEGIN {
15010_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011
Matthias Kloseb9621712010-04-24 17:59:49 +000015012# Transform confdefs.h into an awk script `defines.awk', embedded as
15013# here-document in config.status, that substitutes the proper values into
15014# config.h.in to produce config.h.
15015
15016# Create a delimiter string that does not exist in confdefs.h, to ease
15017# handling of long lines.
15018ac_delim='%!_!# '
15019for ac_last_try in false false :; do
Gregory P. Smith69140482012-01-16 02:05:55 -080015020 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15021 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 break
15023 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015024 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015025 else
15026 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15027 fi
15028done
15029
15030# For the awk script, D is an array of macro values keyed by name,
15031# likewise P contains macro parameters if any. Preserve backslash
15032# newline sequences.
15033
15034ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15035sed -n '
15036s/.\{148\}/&'"$ac_delim"'/g
15037t rset
15038:rset
15039s/^[ ]*#[ ]*define[ ][ ]*/ /
15040t def
15041d
15042:def
15043s/\\$//
15044t bsnl
15045s/["\\]/\\&/g
15046s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15047D["\1"]=" \3"/p
15048s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15049d
15050:bsnl
15051s/["\\]/\\&/g
15052s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15053D["\1"]=" \3\\\\\\n"\\/p
15054t cont
15055s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15056t cont
15057d
15058:cont
15059n
15060s/.\{148\}/&'"$ac_delim"'/g
15061t clear
15062:clear
15063s/\\$//
15064t bsnlc
15065s/["\\]/\\&/g; s/^/"/; s/$/"/p
15066d
15067:bsnlc
15068s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15069b cont
15070' <confdefs.h | sed '
15071s/'"$ac_delim"'/"\\\
15072"/g' >>$CONFIG_STATUS || ac_write_fail=1
15073
15074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15075 for (key in D) D_is_set[key] = 1
15076 FS = ""
15077}
15078/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15079 line = \$ 0
15080 split(line, arg, " ")
15081 if (arg[1] == "#") {
15082 defundef = arg[2]
15083 mac1 = arg[3]
15084 } else {
15085 defundef = substr(arg[1], 2)
15086 mac1 = arg[2]
15087 }
15088 split(mac1, mac2, "(") #)
15089 macro = mac2[1]
15090 prefix = substr(line, 1, index(line, defundef) - 1)
15091 if (D_is_set[macro]) {
15092 # Preserve the white space surrounding the "#".
15093 print prefix "define", macro P[macro] D[macro]
15094 next
15095 } else {
15096 # Replace #undef with comments. This is necessary, for example,
15097 # in the case of _POSIX_SOURCE, which is predefined and required
15098 # on some systems where configure will not decide to define it.
15099 if (defundef == "undef") {
15100 print "/*", prefix defundef, macro, "*/"
15101 next
15102 }
15103 }
15104}
15105{ print }
15106_ACAWK
15107_ACEOF
15108cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015109 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015110fi # test -n "$CONFIG_HEADERS"
15111
15112
15113eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15114shift
15115for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116do
15117 case $ac_tag in
15118 :[FHLC]) ac_mode=$ac_tag; continue;;
15119 esac
15120 case $ac_mode$ac_tag in
15121 :[FHL]*:*);;
Gregory P. Smith69140482012-01-16 02:05:55 -080015122 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123 :[FH]-) ac_tag=-:-;;
15124 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15125 esac
15126 ac_save_IFS=$IFS
15127 IFS=:
15128 set x $ac_tag
15129 IFS=$ac_save_IFS
15130 shift
15131 ac_file=$1
15132 shift
15133
15134 case $ac_mode in
15135 :L) ac_source=$1;;
15136 :[FH])
15137 ac_file_inputs=
15138 for ac_f
15139 do
15140 case $ac_f in
Gregory P. Smith69140482012-01-16 02:05:55 -080015141 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142 *) # Look for the file first in the build tree, then in the source tree
15143 # (if the path is not absolute). The absolute path cannot be DOS-style,
15144 # because $ac_f cannot contain `:'.
15145 test -f "$ac_f" ||
15146 case $ac_f in
15147 [\\/$]*) false;;
15148 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15149 esac ||
Gregory P. Smith69140482012-01-16 02:05:55 -080015150 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015151 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015152 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15153 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154 done
15155
15156 # Let's still pretend it is `configure' which instantiates (i.e., don't
15157 # use $as_me), people would be surprised to read:
15158 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 configure_input='Generated from '`
15160 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15161 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162 if test x"$ac_file" != x-; then
15163 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15165$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 # Neutralize special characters interpreted by sed in replacement strings.
15168 case $configure_input in #(
15169 *\&* | *\|* | *\\* )
15170 ac_sed_conf_input=`$as_echo "$configure_input" |
15171 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15172 *) ac_sed_conf_input=$configure_input;;
15173 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174
15175 case $ac_tag in
Gregory P. Smith69140482012-01-16 02:05:55 -080015176 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15177 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178 esac
15179 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015180 esac
15181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015183$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015184 X"$ac_file" : 'X\(//\)[^/]' \| \
15185 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015186 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015187$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15189 s//\1/
15190 q
15191 }
15192 /^X\(\/\/\)[^/].*/{
15193 s//\1/
15194 q
15195 }
15196 /^X\(\/\/\)$/{
15197 s//\1/
15198 q
15199 }
15200 /^X\(\/\).*/{
15201 s//\1/
15202 q
15203 }
15204 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015205 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 ac_builddir=.
15207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208case "$ac_dir" in
15209.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15210*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015211 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015212 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015214 case $ac_top_builddir_sub in
15215 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15216 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15217 esac ;;
15218esac
15219ac_abs_top_builddir=$ac_pwd
15220ac_abs_builddir=$ac_pwd$ac_dir_suffix
15221# for backward compatibility:
15222ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015223
15224case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227 ac_top_srcdir=$ac_top_builddir_sub
15228 ac_abs_top_srcdir=$ac_pwd ;;
15229 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015230 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231 ac_top_srcdir=$srcdir
15232 ac_abs_top_srcdir=$srcdir ;;
15233 *) # Relative name.
15234 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15235 ac_top_srcdir=$ac_top_build_prefix$srcdir
15236 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015237esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015239
Martin v. Löwis11437992002-04-12 09:54:03 +000015240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015241 case $ac_mode in
15242 :F)
15243 #
15244 # CONFIG_FILE
15245 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015246
15247 case $INSTALL in
15248 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015249 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015250 esac
Trent Nelsona45afca2012-08-30 14:32:02 +000015251 ac_MKDIR_P=$MKDIR_P
15252 case $MKDIR_P in
15253 [\\/$]* | ?:[\\/]* ) ;;
15254 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15255 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015256_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015257
Matthias Kloseb9621712010-04-24 17:59:49 +000015258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259# If the template does not know about datarootdir, expand it.
15260# FIXME: This hack should be removed a few years after 2.60.
15261ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015262ac_sed_dataroot='
15263/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015264 p
15265 q
15266}
15267/@datadir@/p
15268/@docdir@/p
15269/@infodir@/p
15270/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015271/@mandir@/p'
15272case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015273*datarootdir*) ac_datarootdir_seen=yes;;
15274*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015275 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15276$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015278cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015279 ac_datarootdir_hack='
15280 s&@datadir@&$datadir&g
15281 s&@docdir@&$docdir&g
15282 s&@infodir@&$infodir&g
15283 s&@localedir@&$localedir&g
15284 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015286esac
15287_ACEOF
15288
15289# Neutralize VPATH when `$srcdir' = `.'.
15290# Shell code in configure.ac might set extrasub.
15291# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015292cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15293ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015294$extrasub
15295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015296cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015297:t
15298/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015299s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015300s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015301s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302s&@srcdir@&$ac_srcdir&;t t
15303s&@abs_srcdir@&$ac_abs_srcdir&;t t
15304s&@top_srcdir@&$ac_top_srcdir&;t t
15305s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15306s&@builddir@&$ac_builddir&;t t
15307s&@abs_builddir@&$ac_abs_builddir&;t t
15308s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15309s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsona45afca2012-08-30 14:32:02 +000015310s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015311$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015312"
Gregory P. Smith69140482012-01-16 02:05:55 -080015313eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15314 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015316test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Gregory P. Smith69140482012-01-16 02:05:55 -080015317 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15318 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15319 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015320 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015321which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015322$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015323which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015324
Gregory P. Smith69140482012-01-16 02:05:55 -080015325 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 case $ac_file in
Gregory P. Smith69140482012-01-16 02:05:55 -080015327 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15328 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015329 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015330 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015331 ;;
15332 :H)
15333 #
15334 # CONFIG_HEADER
15335 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015336 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015337 {
15338 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015339 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15340 } >"$ac_tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015341 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080015342 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015343 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15344$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015345 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015346 rm -f "$ac_file"
Gregory P. Smith69140482012-01-16 02:05:55 -080015347 mv "$ac_tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015348 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 fi
15350 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015351 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015352 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015353 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015354 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015357
15358 esac
15359
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015360
15361 case $ac_file$ac_mode in
15362 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15363
15364 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015365done # for ac_tag
15366
Guido van Rossum627b2d71993-12-24 10:39:16 +000015367
Matthias Kloseb9621712010-04-24 17:59:49 +000015368as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015369_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015370ac_clean_files=$ac_clean_files_save
15371
Matthias Kloseb9621712010-04-24 17:59:49 +000015372test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015373 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015374
Martin v. Löwis11437992002-04-12 09:54:03 +000015375
15376# configure is writing to config.log, and then calls config.status.
15377# config.status does its own redirection, appending to config.log.
15378# Unfortunately, on DOS this fails, as config.log is still kept open
15379# by configure, so config.status won't be able to write to it; its
15380# output is simply discarded. So we exec the FD to /dev/null,
15381# effectively closing config.log, so it can be properly (re)opened and
15382# appended to by config.status. When coming back to configure, we
15383# need to make the FD available again.
15384if test "$no_create" != yes; then
15385 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015386 ac_config_status_args=
15387 test "$silent" = yes &&
15388 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015389 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015390 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 exec 5>>config.log
15392 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15393 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015394 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015395fi
15396if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15397 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15398$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015399fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015400
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015401
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015402echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015403if test ! -f Modules/Setup
15404then
15405 cp $srcdir/Modules/Setup.dist Modules/Setup
15406fi
15407
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015408echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015409if test ! -f Modules/Setup.local
15410then
15411 echo "# Edit this file for local setup changes" >Modules/Setup.local
15412fi
15413
15414echo "creating Makefile"
15415$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15416 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015417 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015418mv config.c Modules