blob: c4ff7242f000e5a9213e6f2416ca4f7492482b81 [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
691BUILDEXEEXT
692EGREP
693GREP
694CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200695NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000696MAINCC
697CXX
698OBJEXT
699EXEEXT
700ac_ct_CC
701CPPFLAGS
702LDFLAGS
703CFLAGS
704CC
705EXPORT_MACOSX_DEPLOYMENT_TARGET
706CONFIGURE_MACOSX_DEPLOYMENT_TARGET
707SGI_ABI
708MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000709FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000710FRAMEWORKUNIXTOOLSPREFIX
711FRAMEWORKALTINSTALLLAST
712FRAMEWORKALTINSTALLFIRST
713FRAMEWORKINSTALLLAST
714FRAMEWORKINSTALLFIRST
715PYTHONFRAMEWORKINSTALLDIR
716PYTHONFRAMEWORKPREFIX
717PYTHONFRAMEWORKDIR
718PYTHONFRAMEWORKIDENTIFIER
719PYTHONFRAMEWORK
720LIPO_32BIT_FLAGS
721ARCH_RUN_32BIT
722UNIVERSALSDK
723CONFIG_ARGS
724SOVERSION
725VERSION
726target_alias
727host_alias
728build_alias
729LIBS
730ECHO_T
731ECHO_N
732ECHO_C
733DEFS
734mandir
735localedir
736libdir
737psdir
738pdfdir
739dvidir
740htmldir
741infodir
742docdir
743oldincludedir
744includedir
745localstatedir
746sharedstatedir
747sysconfdir
748datadir
749datarootdir
750libexecdir
751sbindir
752bindir
753program_transform_name
754prefix
755exec_prefix
756PACKAGE_URL
757PACKAGE_BUGREPORT
758PACKAGE_STRING
759PACKAGE_VERSION
760PACKAGE_TARNAME
761PACKAGE_NAME
762PATH_SEPARATOR
763SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000764ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000765ac_user_opts='
766enable_option_checking
767enable_universalsdk
768with_universal_archs
769with_framework_name
770enable_framework
771with_gcc
772with_cxx_main
773with_suffix
774enable_shared
775enable_profiling
776with_pydebug
777with_libs
778with_system_expat
779with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000780enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000781with_dbmliborder
782with_signal_module
783with_dec_threads
784with_threads
785with_thread
786enable_ipv6
787with_doc_strings
788with_tsc
789with_pymalloc
790with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000791with_fpectl
792with_libm
793with_libc
794enable_big_digits
795with_wide_unicode
796with_computed_gotos
797'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798 ac_precious_vars='build_alias
799host_alias
800target_alias
801CC
802CFLAGS
803LDFLAGS
804LIBS
805CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000806CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000807
Guido van Rossum627b2d71993-12-24 10:39:16 +0000808
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000810ac_init_help=
811ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000812ac_unrecognized_opts=
813ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814# The variables have the same names as the options, with
815# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000816cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000817exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819no_recursion=
820prefix=NONE
821program_prefix=NONE
822program_suffix=NONE
823program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828x_includes=NONE
829x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000830
831# Installation directory options.
832# These are left unexpanded so users can "make install exec_prefix=/foo"
833# and all the variables that are supposed to be based on exec_prefix
834# by default will actually change.
835# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000836# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837bindir='${exec_prefix}/bin'
838sbindir='${exec_prefix}/sbin'
839libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840datarootdir='${prefix}/share'
841datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842sysconfdir='${prefix}/etc'
843sharedstatedir='${prefix}/com'
844localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845includedir='${prefix}/include'
846oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
848infodir='${datarootdir}/info'
849htmldir='${docdir}'
850dvidir='${docdir}'
851pdfdir='${docdir}'
852psdir='${docdir}'
853libdir='${exec_prefix}/lib'
854localedir='${datarootdir}/locale'
855mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861 # If the previous option needs an argument, assign it.
862 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864 ac_prev=
865 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000866 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000868 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000869 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
870 *=) ac_optarg= ;;
871 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874 # Accept the important Cygnus configure options, so we can diagnose typos.
875
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000876 case $ac_dashdash$ac_option in
877 --)
878 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880 -bindir | --bindir | --bindi | --bind | --bin | --bi)
881 ac_prev=bindir ;;
882 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000883 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884
885 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000886 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 -cache-file | --cache-file | --cache-fil | --cache-fi \
891 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
892 ac_prev=cache_file ;;
893 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
894 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000895 cache_file=$ac_optarg ;;
896
897 --config-cache | -C)
898 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
906 | --dataroo | --dataro | --datar)
907 ac_prev=datarootdir ;;
908 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
909 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
910 datarootdir=$ac_optarg ;;
911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000913 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000915 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000916 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000917 ac_useropt_orig=$ac_useropt
918 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
919 case $ac_user_opts in
920 *"
921"enable_$ac_useropt"
922"*) ;;
923 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
924 ac_unrecognized_sep=', ';;
925 esac
926 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927
928 -docdir | --docdir | --docdi | --doc | --do)
929 ac_prev=docdir ;;
930 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
931 docdir=$ac_optarg ;;
932
933 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
934 ac_prev=dvidir ;;
935 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
936 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
938 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000939 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000941 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000942 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000943 ac_useropt_orig=$ac_useropt
944 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
945 case $ac_user_opts in
946 *"
947"enable_$ac_useropt"
948"*) ;;
949 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
950 ac_unrecognized_sep=', ';;
951 esac
952 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
955 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
956 | --exec | --exe | --ex)
957 ac_prev=exec_prefix ;;
958 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
959 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
960 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
963 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 # Obsolete; use --with-gas.
965 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 -help | --help | --hel | --he | -h)
968 ac_init_help=long ;;
969 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
970 ac_init_help=recursive ;;
971 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
972 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
974 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
980 ac_prev=htmldir ;;
981 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
982 | --ht=*)
983 htmldir=$ac_optarg ;;
984
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000985 -includedir | --includedir | --includedi | --included | --include \
986 | --includ | --inclu | --incl | --inc)
987 ac_prev=includedir ;;
988 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
989 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
992 -infodir | --infodir | --infodi | --infod | --info | --inf)
993 ac_prev=infodir ;;
994 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996
997 -libdir | --libdir | --libdi | --libd)
998 ac_prev=libdir ;;
999 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001000 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001001
1002 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1003 | --libexe | --libex | --libe)
1004 ac_prev=libexecdir ;;
1005 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1006 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 -localedir | --localedir | --localedi | --localed | --locale)
1010 ac_prev=localedir ;;
1011 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1012 localedir=$ac_optarg ;;
1013
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001014 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001015 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016 ac_prev=localstatedir ;;
1017 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001018 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
1021 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1022 ac_prev=mandir ;;
1023 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001027 # Obsolete; use --without-fp.
1028 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032 no_create=yes ;;
1033
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001034 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1035 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1036 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1039 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1040 | --oldin | --oldi | --old | --ol | --o)
1041 ac_prev=oldincludedir ;;
1042 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1043 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1044 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1048 ac_prev=prefix ;;
1049 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051
1052 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1053 | --program-pre | --program-pr | --program-p)
1054 ac_prev=program_prefix ;;
1055 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1056 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1060 | --program-suf | --program-su | --program-s)
1061 ac_prev=program_suffix ;;
1062 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1063 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -program-transform-name | --program-transform-name \
1067 | --program-transform-nam | --program-transform-na \
1068 | --program-transform-n | --program-transform- \
1069 | --program-transform | --program-transfor \
1070 | --program-transfo | --program-transf \
1071 | --program-trans | --program-tran \
1072 | --progr-tra | --program-tr | --program-t)
1073 ac_prev=program_transform_name ;;
1074 -program-transform-name=* | --program-transform-name=* \
1075 | --program-transform-nam=* | --program-transform-na=* \
1076 | --program-transform-n=* | --program-transform-=* \
1077 | --program-transform=* | --program-transfor=* \
1078 | --program-transfo=* | --program-transf=* \
1079 | --program-trans=* | --program-tran=* \
1080 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001083 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1084 ac_prev=pdfdir ;;
1085 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1086 pdfdir=$ac_optarg ;;
1087
1088 -psdir | --psdir | --psdi | --psd | --ps)
1089 ac_prev=psdir ;;
1090 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1091 psdir=$ac_optarg ;;
1092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1094 | -silent | --silent | --silen | --sile | --sil)
1095 silent=yes ;;
1096
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1098 ac_prev=sbindir ;;
1099 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1100 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001102
1103 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1104 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1105 | --sharedst | --shareds | --shared | --share | --shar \
1106 | --sha | --sh)
1107 ac_prev=sharedstatedir ;;
1108 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1109 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1110 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1111 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114 -site | --site | --sit)
1115 ac_prev=site ;;
1116 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1120 ac_prev=srcdir ;;
1121 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001124 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1125 | --syscon | --sysco | --sysc | --sys | --sy)
1126 ac_prev=sysconfdir ;;
1127 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1128 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001130
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
1136 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1137 verbose=yes ;;
1138
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 -version | --version | --versio | --versi | --vers | -V)
1140 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141
1142 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001143 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001145 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001146 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001147 ac_useropt_orig=$ac_useropt
1148 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1149 case $ac_user_opts in
1150 *"
1151"with_$ac_useropt"
1152"*) ;;
1153 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1154 ac_unrecognized_sep=', ';;
1155 esac
1156 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
1158 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001159 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001160 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001162 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 ac_useropt_orig=$ac_useropt
1164 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1165 case $ac_user_opts in
1166 *"
1167"with_$ac_useropt"
1168"*) ;;
1169 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1170 ac_unrecognized_sep=', ';;
1171 esac
1172 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174 --x)
1175 # Obsolete; use --with-x.
1176 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
1178 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1179 | --x-incl | --x-inc | --x-in | --x-i)
1180 ac_prev=x_includes ;;
1181 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1182 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
1185 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1186 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1187 ac_prev=x_libraries ;;
1188 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1189 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001192 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1193Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 ;;
1195
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 *=*)
1197 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1198 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 case $ac_envvar in #(
1200 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001201 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001203 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 export $ac_envvar ;;
1205
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001206 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Gregory P. Smith69140482012-01-16 02:05:55 -08001211 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212 ;;
1213
1214 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215done
1216
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001219 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220fi
1221
Matthias Kloseb9621712010-04-24 17:59:49 +00001222if test -n "$ac_unrecognized_opts"; then
1223 case $enable_option_checking in
1224 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001225 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1227 esac
1228fi
1229
1230# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001231for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1232 datadir sysconfdir sharedstatedir localstatedir includedir \
1233 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1234 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 # Remove trailing slashes.
1238 case $ac_val in
1239 */ )
1240 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1241 eval $ac_var=\$ac_val;;
1242 esac
1243 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245 [\\/$]* | ?:[\\/]* ) continue;;
1246 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001248 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001249done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001250
Martin v. Löwis11437992002-04-12 09:54:03 +00001251# There might be people who depend on the old broken behavior: `$host'
1252# used to hold the argument of --host etc.
1253# FIXME: To remove some day.
1254build=$build_alias
1255host=$host_alias
1256target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257
Martin v. Löwis11437992002-04-12 09:54:03 +00001258# FIXME: To remove some day.
1259if test "x$host_alias" != x; then
1260 if test "x$build_alias" = x; then
1261 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 elif test "x$build_alias" != "x$host_alias"; then
1263 cross_compiling=yes
1264 fi
1265fi
1266
1267ac_tool_prefix=
1268test -n "$host_alias" && ac_tool_prefix=$host_alias-
1269
1270test "$silent" = yes && exec 6>/dev/null
1271
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001273ac_pwd=`pwd` && test -n "$ac_pwd" &&
1274ac_ls_di=`ls -di .` &&
1275ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001276 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001278 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279
1280
Guido van Rossum627b2d71993-12-24 10:39:16 +00001281# Find the source files, if location was not specified.
1282if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001285 ac_confdir=`$as_dirname -- "$as_myself" ||
1286$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1287 X"$as_myself" : 'X\(//\)[^/]' \| \
1288 X"$as_myself" : 'X\(//\)$' \| \
1289 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1290$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1292 s//\1/
1293 q
1294 }
1295 /^X\(\/\/\)[^/].*/{
1296 s//\1/
1297 q
1298 }
1299 /^X\(\/\/\)$/{
1300 s//\1/
1301 q
1302 }
1303 /^X\(\/\).*/{
1304 s//\1/
1305 q
1306 }
1307 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001308 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310 srcdir=..
1311 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312else
1313 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001315if test ! -r "$srcdir/$ac_unique_file"; then
1316 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001317 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001319ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1320ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001321 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001322 pwd)`
1323# When building in place, set srcdir=.
1324if test "$ac_abs_confdir" = "$ac_pwd"; then
1325 srcdir=.
1326fi
1327# Remove unnecessary trailing slashes from srcdir.
1328# Double slashes in file names in object file debugging info
1329# mess up M-x gdb in Emacs.
1330case $srcdir in
1331*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1332esac
1333for ac_var in $ac_precious_vars; do
1334 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1335 eval ac_env_${ac_var}_value=\$${ac_var}
1336 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1337 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1338done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339
Martin v. Löwis11437992002-04-12 09:54:03 +00001340#
1341# Report the --help message.
1342#
1343if test "$ac_init_help" = "long"; then
1344 # Omit some internal or obsolete options to make the list less imposing.
1345 # This message is too long to be a string in the A/UX 3.1 sh.
1346 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001347\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001348
1349Usage: $0 [OPTION]... [VAR=VALUE]...
1350
1351To assign environment variables (e.g., CC, CFLAGS...), specify them as
1352VAR=VALUE. See below for descriptions of some of the useful variables.
1353
1354Defaults for the options are specified in brackets.
1355
1356Configuration:
1357 -h, --help display this help and exit
1358 --help=short display options specific to this package
1359 --help=recursive display the short help of all the included packages
1360 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001361 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001362 --cache-file=FILE cache test results in FILE [disabled]
1363 -C, --config-cache alias for \`--cache-file=config.cache'
1364 -n, --no-create do not create output files
1365 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1366
Martin v. Löwis11437992002-04-12 09:54:03 +00001367Installation directories:
1368 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001369 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001370 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001371 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001372
1373By default, \`make install' will install all the files in
1374\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1375an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1376for instance \`--prefix=\$HOME'.
1377
1378For better control, use the options below.
1379
1380Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001381 --bindir=DIR user executables [EPREFIX/bin]
1382 --sbindir=DIR system admin executables [EPREFIX/sbin]
1383 --libexecdir=DIR program executables [EPREFIX/libexec]
1384 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1385 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1386 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1387 --libdir=DIR object code libraries [EPREFIX/lib]
1388 --includedir=DIR C header files [PREFIX/include]
1389 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1390 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1391 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1392 --infodir=DIR info documentation [DATAROOTDIR/info]
1393 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1394 --mandir=DIR man documentation [DATAROOTDIR/man]
1395 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1396 --htmldir=DIR html documentation [DOCDIR]
1397 --dvidir=DIR dvi documentation [DOCDIR]
1398 --pdfdir=DIR pdf documentation [DOCDIR]
1399 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001400_ACEOF
1401
1402 cat <<\_ACEOF
1403_ACEOF
1404fi
1405
1406if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001407 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001408 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001409 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001410 cat <<\_ACEOF
1411
1412Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001413 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1415 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001416 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001417 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --enable-framework[=INSTALLDIR]
1419 Build (MacOSX|Darwin) framework
1420 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001421 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001422 --enable-loadable-sqlite-extensions
1423 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --enable-ipv6 Enable ipv6 (with ipv4) support
1425 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001426 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428
1429Optional Packages:
1430 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1431 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001432 --with-universal-archs=ARCH
1433 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001434 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001435 --with-framework-name=FRAMEWORK
1436 specify an alternate name of the framework built
1437 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001439 --with-cxx-main=<compiler>
1440 compile main() and link python executable with C++
1441 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --with-suffix=.exe set executable suffix
1443 --with-pydebug build with Py_DEBUG defined
1444 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001445 --with-system-expat build pyexpat module using an installed expat
1446 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001447 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001448 --with-dbmliborder=db1:db2:...
1449 order to check db backends for dbm. Valid value is a
1450 colon separated string with the backend names
1451 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --with-signal-module disable/enable signal module
1453 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1454 --with(out)-threads[=DIRECTORY]
1455 disable/enable thread support
1456 --with(out)-thread[=DIRECTORY]
1457 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001458 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001459 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001461 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --with-fpectl enable SIGFPE catching
1463 --with-libm=STRING math library
1464 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001465 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001466 --with(out)-computed-gotos
1467 Use computed gotos in evaluation loop (enabled by
1468 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001469
1470Some influential environment variables:
1471 CC C compiler command
1472 CFLAGS C compiler flags
1473 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1474 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001476 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 CPP C preprocessor
1479
1480Use these variables to override the choices made by `configure' or to help
1481it to find libraries and programs with nonstandard names/locations.
1482
Georg Brandle2e15612009-05-20 18:25:10 +00001483Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001484_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001486fi
1487
1488if test "$ac_init_help" = "recursive"; then
1489 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 test -d "$ac_dir" ||
1492 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1493 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 ac_builddir=.
1495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496case "$ac_dir" in
1497.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1498*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001499 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001501 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 case $ac_top_builddir_sub in
1503 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1504 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1505 esac ;;
1506esac
1507ac_abs_top_builddir=$ac_pwd
1508ac_abs_builddir=$ac_pwd$ac_dir_suffix
1509# for backward compatibility:
1510ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001511
1512case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001513 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 ac_top_srcdir=$ac_top_builddir_sub
1516 ac_abs_top_srcdir=$ac_pwd ;;
1517 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519 ac_top_srcdir=$srcdir
1520 ac_abs_top_srcdir=$srcdir ;;
1521 *) # Relative name.
1522 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1523 ac_top_srcdir=$ac_top_build_prefix$srcdir
1524 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001525esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528 cd "$ac_dir" || { ac_status=$?; continue; }
1529 # Check for guested configure.
1530 if test -f "$ac_srcdir/configure.gnu"; then
1531 echo &&
1532 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1533 elif test -f "$ac_srcdir/configure"; then
1534 echo &&
1535 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001537 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538 fi || ac_status=$?
1539 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001540 done
1541fi
1542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001543test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001544if $ac_init_version; then
1545 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001546python configure 3.2
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001547generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001549Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001550This configure script is free software; the Free Software Foundation
1551gives unlimited permission to copy, distribute and modify it.
1552_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001555
1556## ------------------------ ##
1557## Autoconf initialization. ##
1558## ------------------------ ##
1559
1560# ac_fn_c_try_compile LINENO
1561# --------------------------
1562# Try to compile conftest.$ac_ext, and return whether this succeeded.
1563ac_fn_c_try_compile ()
1564{
1565 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1566 rm -f conftest.$ac_objext
1567 if { { ac_try="$ac_compile"
1568case "(($ac_try" in
1569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1570 *) ac_try_echo=$ac_try;;
1571esac
1572eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1573$as_echo "$ac_try_echo"; } >&5
1574 (eval "$ac_compile") 2>conftest.err
1575 ac_status=$?
1576 if test -s conftest.err; then
1577 grep -v '^ *+' conftest.err >conftest.er1
1578 cat conftest.er1 >&5
1579 mv -f conftest.er1 conftest.err
1580 fi
1581 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1582 test $ac_status = 0; } && {
1583 test -z "$ac_c_werror_flag" ||
1584 test ! -s conftest.err
1585 } && test -s conftest.$ac_objext; then :
1586 ac_retval=0
1587else
1588 $as_echo "$as_me: failed program was:" >&5
1589sed 's/^/| /' conftest.$ac_ext >&5
1590
1591 ac_retval=1
1592fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001593 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001594 as_fn_set_status $ac_retval
1595
1596} # ac_fn_c_try_compile
1597
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001598# ac_fn_c_try_link LINENO
1599# -----------------------
1600# Try to link conftest.$ac_ext, and return whether this succeeded.
1601ac_fn_c_try_link ()
1602{
1603 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1604 rm -f conftest.$ac_objext conftest$ac_exeext
1605 if { { ac_try="$ac_link"
1606case "(($ac_try" in
1607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1608 *) ac_try_echo=$ac_try;;
1609esac
1610eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1611$as_echo "$ac_try_echo"; } >&5
1612 (eval "$ac_link") 2>conftest.err
1613 ac_status=$?
1614 if test -s conftest.err; then
1615 grep -v '^ *+' conftest.err >conftest.er1
1616 cat conftest.er1 >&5
1617 mv -f conftest.er1 conftest.err
1618 fi
1619 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1620 test $ac_status = 0; } && {
1621 test -z "$ac_c_werror_flag" ||
1622 test ! -s conftest.err
1623 } && test -s conftest$ac_exeext && {
1624 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001625 test -x conftest$ac_exeext
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001626 }; then :
1627 ac_retval=0
1628else
1629 $as_echo "$as_me: failed program was:" >&5
1630sed 's/^/| /' conftest.$ac_ext >&5
1631
1632 ac_retval=1
1633fi
1634 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1635 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1636 # interfere with the next link command; also delete a directory that is
1637 # left behind by Apple's compiler. We do this before executing the actions.
1638 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001639 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001640 as_fn_set_status $ac_retval
1641
1642} # ac_fn_c_try_link
1643
Matthias Kloseb9621712010-04-24 17:59:49 +00001644# ac_fn_c_try_cpp LINENO
1645# ----------------------
1646# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1647ac_fn_c_try_cpp ()
1648{
1649 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1650 if { { ac_try="$ac_cpp conftest.$ac_ext"
1651case "(($ac_try" in
1652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1653 *) ac_try_echo=$ac_try;;
1654esac
1655eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1656$as_echo "$ac_try_echo"; } >&5
1657 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1658 ac_status=$?
1659 if test -s conftest.err; then
1660 grep -v '^ *+' conftest.err >conftest.er1
1661 cat conftest.er1 >&5
1662 mv -f conftest.er1 conftest.err
1663 fi
1664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001665 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001666 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1667 test ! -s conftest.err
1668 }; then :
1669 ac_retval=0
1670else
1671 $as_echo "$as_me: failed program was:" >&5
1672sed 's/^/| /' conftest.$ac_ext >&5
1673
1674 ac_retval=1
1675fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001676 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001677 as_fn_set_status $ac_retval
1678
1679} # ac_fn_c_try_cpp
1680
1681# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1682# -------------------------------------------------------
1683# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1684# the include files in INCLUDES and setting the cache variable VAR
1685# accordingly.
1686ac_fn_c_check_header_mongrel ()
1687{
1688 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Gregory P. Smith69140482012-01-16 02:05:55 -08001689 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1691$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001692if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001693 $as_echo_n "(cached) " >&6
1694fi
1695eval ac_res=\$$3
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1697$as_echo "$ac_res" >&6; }
1698else
1699 # Is the header compilable?
1700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1701$as_echo_n "checking $2 usability... " >&6; }
1702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1703/* end confdefs.h. */
1704$4
1705#include <$2>
1706_ACEOF
1707if ac_fn_c_try_compile "$LINENO"; then :
1708 ac_header_compiler=yes
1709else
1710 ac_header_compiler=no
1711fi
1712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1714$as_echo "$ac_header_compiler" >&6; }
1715
1716# Is the header present?
1717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1718$as_echo_n "checking $2 presence... " >&6; }
1719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1720/* end confdefs.h. */
1721#include <$2>
1722_ACEOF
1723if ac_fn_c_try_cpp "$LINENO"; then :
1724 ac_header_preproc=yes
1725else
1726 ac_header_preproc=no
1727fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001728rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1730$as_echo "$ac_header_preproc" >&6; }
1731
1732# So? What about this header?
1733case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1734 yes:no: )
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1736$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1738$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1739 ;;
1740 no:yes:* )
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1742$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1744$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1746$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1747 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1748$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1750$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001751( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001752## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001753## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001754 ) | sed "s/^/$as_me: WARNING: /" >&2
1755 ;;
1756esac
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1758$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001759if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 $as_echo_n "(cached) " >&6
1761else
1762 eval "$3=\$ac_header_compiler"
1763fi
1764eval ac_res=\$$3
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1766$as_echo "$ac_res" >&6; }
1767fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001768 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001769
1770} # ac_fn_c_check_header_mongrel
1771
1772# ac_fn_c_try_run LINENO
1773# ----------------------
1774# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1775# that executables *can* be run.
1776ac_fn_c_try_run ()
1777{
1778 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1779 if { { ac_try="$ac_link"
1780case "(($ac_try" in
1781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1782 *) ac_try_echo=$ac_try;;
1783esac
1784eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1785$as_echo "$ac_try_echo"; } >&5
1786 (eval "$ac_link") 2>&5
1787 ac_status=$?
1788 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1789 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1790 { { case "(($ac_try" in
1791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1792 *) ac_try_echo=$ac_try;;
1793esac
1794eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1795$as_echo "$ac_try_echo"; } >&5
1796 (eval "$ac_try") 2>&5
1797 ac_status=$?
1798 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1799 test $ac_status = 0; }; }; then :
1800 ac_retval=0
1801else
1802 $as_echo "$as_me: program exited with status $ac_status" >&5
1803 $as_echo "$as_me: failed program was:" >&5
1804sed 's/^/| /' conftest.$ac_ext >&5
1805
1806 ac_retval=$ac_status
1807fi
1808 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001809 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001810 as_fn_set_status $ac_retval
1811
1812} # ac_fn_c_try_run
1813
1814# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1815# -------------------------------------------------------
1816# Tests whether HEADER exists and can be compiled using the include files in
1817# INCLUDES, setting the cache variable VAR accordingly.
1818ac_fn_c_check_header_compile ()
1819{
1820 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1822$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001823if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001824 $as_echo_n "(cached) " >&6
1825else
1826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1827/* end confdefs.h. */
1828$4
1829#include <$2>
1830_ACEOF
1831if ac_fn_c_try_compile "$LINENO"; then :
1832 eval "$3=yes"
1833else
1834 eval "$3=no"
1835fi
1836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1837fi
1838eval ac_res=\$$3
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1840$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001841 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001842
1843} # ac_fn_c_check_header_compile
1844
Matthias Kloseb9621712010-04-24 17:59:49 +00001845# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1846# -------------------------------------------
1847# Tests whether TYPE exists after having included INCLUDES, setting cache
1848# variable VAR accordingly.
1849ac_fn_c_check_type ()
1850{
1851 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1853$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001854if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001855 $as_echo_n "(cached) " >&6
1856else
1857 eval "$3=no"
1858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1859/* end confdefs.h. */
1860$4
1861int
1862main ()
1863{
1864if (sizeof ($2))
1865 return 0;
1866 ;
1867 return 0;
1868}
1869_ACEOF
1870if ac_fn_c_try_compile "$LINENO"; then :
1871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1872/* end confdefs.h. */
1873$4
1874int
1875main ()
1876{
1877if (sizeof (($2)))
1878 return 0;
1879 ;
1880 return 0;
1881}
1882_ACEOF
1883if ac_fn_c_try_compile "$LINENO"; then :
1884
1885else
1886 eval "$3=yes"
1887fi
1888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1889fi
1890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1891fi
1892eval ac_res=\$$3
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1894$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001896
1897} # ac_fn_c_check_type
1898
1899# ac_fn_c_find_uintX_t LINENO BITS VAR
1900# ------------------------------------
1901# Finds an unsigned integer type with width BITS, setting cache variable VAR
1902# accordingly.
1903ac_fn_c_find_uintX_t ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1907$as_echo_n "checking for uint$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001908if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 $as_echo_n "(cached) " >&6
1910else
1911 eval "$3=no"
1912 # Order is important - never check a type that is potentially smaller
1913 # than half of the expected target width.
1914 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1915 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1917/* end confdefs.h. */
1918$ac_includes_default
1919int
1920main ()
1921{
1922static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001923test_array [0] = 0;
1924return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926 ;
1927 return 0;
1928}
1929_ACEOF
1930if ac_fn_c_try_compile "$LINENO"; then :
1931 case $ac_type in #(
1932 uint$2_t) :
1933 eval "$3=yes" ;; #(
1934 *) :
1935 eval "$3=\$ac_type" ;;
1936esac
1937fi
1938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001939 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001940
1941else
1942 break
1943fi
1944 done
1945fi
1946eval ac_res=\$$3
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001949 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001950
1951} # ac_fn_c_find_uintX_t
1952
1953# ac_fn_c_find_intX_t LINENO BITS VAR
1954# -----------------------------------
1955# Finds a signed integer type with width BITS, setting cache variable VAR
1956# accordingly.
1957ac_fn_c_find_intX_t ()
1958{
1959 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1961$as_echo_n "checking for int$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001962if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001963 $as_echo_n "(cached) " >&6
1964else
1965 eval "$3=no"
1966 # Order is important - never check a type that is potentially smaller
1967 # than half of the expected target width.
1968 for ac_type in int$2_t 'int' 'long int' \
1969 'long long int' 'short int' 'signed char'; do
1970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h. */
1972$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001973 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001974int
1975main ()
1976{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001977static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001978test_array [0] = 0;
1979return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001980
1981 ;
1982 return 0;
1983}
1984_ACEOF
1985if ac_fn_c_try_compile "$LINENO"; then :
1986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987/* end confdefs.h. */
1988$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001989 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001990int
1991main ()
1992{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001993static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001994 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001995test_array [0] = 0;
1996return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001997
1998 ;
1999 return 0;
2000}
2001_ACEOF
2002if ac_fn_c_try_compile "$LINENO"; then :
2003
2004else
2005 case $ac_type in #(
2006 int$2_t) :
2007 eval "$3=yes" ;; #(
2008 *) :
2009 eval "$3=\$ac_type" ;;
2010esac
2011fi
2012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2013fi
2014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002015 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002016
2017else
2018 break
2019fi
2020 done
2021fi
2022eval ac_res=\$$3
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2024$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002025 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002026
2027} # ac_fn_c_find_intX_t
2028
2029# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2030# --------------------------------------------
2031# Tries to find the compile-time value of EXPR in a program that includes
2032# INCLUDES, setting VAR accordingly. Returns whether the value could be
2033# computed
2034ac_fn_c_compute_int ()
2035{
2036 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2037 if test "$cross_compiling" = yes; then
2038 # Depending upon the size, compute the lo and hi bounds.
2039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002046test_array [0] = 0;
2047return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002048
2049 ;
2050 return 0;
2051}
2052_ACEOF
2053if ac_fn_c_try_compile "$LINENO"; then :
2054 ac_lo=0 ac_mid=0
2055 while :; do
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002063test_array [0] = 0;
2064return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002065
2066 ;
2067 return 0;
2068}
2069_ACEOF
2070if ac_fn_c_try_compile "$LINENO"; then :
2071 ac_hi=$ac_mid; break
2072else
2073 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2074 if test $ac_lo -le $ac_mid; then
2075 ac_lo= ac_hi=
2076 break
2077 fi
2078 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081 done
2082else
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002090test_array [0] = 0;
2091return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_hi=-1 ac_mid=-1
2099 while :; do
2100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101/* end confdefs.h. */
2102$4
2103int
2104main ()
2105{
2106static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002107test_array [0] = 0;
2108return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002109
2110 ;
2111 return 0;
2112}
2113_ACEOF
2114if ac_fn_c_try_compile "$LINENO"; then :
2115 ac_lo=$ac_mid; break
2116else
2117 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2118 if test $ac_mid -le $ac_hi; then
2119 ac_lo= ac_hi=
2120 break
2121 fi
2122 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125 done
2126else
2127 ac_lo= ac_hi=
2128fi
2129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2130fi
2131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132# Binary search between lo and hi bounds.
2133while test "x$ac_lo" != "x$ac_hi"; do
2134 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136/* end confdefs.h. */
2137$4
2138int
2139main ()
2140{
2141static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002142test_array [0] = 0;
2143return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002144
2145 ;
2146 return 0;
2147}
2148_ACEOF
2149if ac_fn_c_try_compile "$LINENO"; then :
2150 ac_hi=$ac_mid
2151else
2152 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2153fi
2154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2155done
2156case $ac_lo in #((
2157?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2158'') ac_retval=1 ;;
2159esac
2160 else
2161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162/* end confdefs.h. */
2163$4
2164static long int longval () { return $2; }
2165static unsigned long int ulongval () { return $2; }
2166#include <stdio.h>
2167#include <stdlib.h>
2168int
2169main ()
2170{
2171
2172 FILE *f = fopen ("conftest.val", "w");
2173 if (! f)
2174 return 1;
2175 if (($2) < 0)
2176 {
2177 long int i = longval ();
2178 if (i != ($2))
2179 return 1;
2180 fprintf (f, "%ld", i);
2181 }
2182 else
2183 {
2184 unsigned long int i = ulongval ();
2185 if (i != ($2))
2186 return 1;
2187 fprintf (f, "%lu", i);
2188 }
2189 /* Do not output a trailing newline, as this causes \r\n confusion
2190 on some platforms. */
2191 return ferror (f) || fclose (f) != 0;
2192
2193 ;
2194 return 0;
2195}
2196_ACEOF
2197if ac_fn_c_try_run "$LINENO"; then :
2198 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2199else
2200 ac_retval=1
2201fi
2202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2203 conftest.$ac_objext conftest.beam conftest.$ac_ext
2204rm -f conftest.val
2205
2206 fi
Gregory P. Smith69140482012-01-16 02:05:55 -08002207 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002208 as_fn_set_status $ac_retval
2209
2210} # ac_fn_c_compute_int
2211
2212# ac_fn_c_check_func LINENO FUNC VAR
2213# ----------------------------------
2214# Tests whether FUNC exists, setting the cache variable VAR accordingly
2215ac_fn_c_check_func ()
2216{
2217 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2219$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002220if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002221 $as_echo_n "(cached) " >&6
2222else
2223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224/* end confdefs.h. */
2225/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2226 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2227#define $2 innocuous_$2
2228
2229/* System header to define __stub macros and hopefully few prototypes,
2230 which can conflict with char $2 (); below.
2231 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2232 <limits.h> exists even on freestanding compilers. */
2233
2234#ifdef __STDC__
2235# include <limits.h>
2236#else
2237# include <assert.h>
2238#endif
2239
2240#undef $2
2241
2242/* Override any GCC internal prototype to avoid an error.
2243 Use char because int might match the return type of a GCC
2244 builtin and then its argument prototype would still apply. */
2245#ifdef __cplusplus
2246extern "C"
2247#endif
2248char $2 ();
2249/* The GNU C library defines this for functions which it implements
2250 to always fail with ENOSYS. Some functions are actually named
2251 something starting with __ and the normal name is an alias. */
2252#if defined __stub_$2 || defined __stub___$2
2253choke me
2254#endif
2255
2256int
2257main ()
2258{
2259return $2 ();
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_link "$LINENO"; then :
2265 eval "$3=yes"
2266else
2267 eval "$3=no"
2268fi
2269rm -f core conftest.err conftest.$ac_objext \
2270 conftest$ac_exeext conftest.$ac_ext
2271fi
2272eval ac_res=\$$3
2273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2274$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002275 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002276
2277} # ac_fn_c_check_func
2278
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002279# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2280# ---------------------------------------------
2281# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2282# accordingly.
2283ac_fn_c_check_decl ()
2284{
2285 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2286 as_decl_name=`echo $2|sed 's/ *(.*//'`
2287 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2289$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2290if eval \${$3+:} false; then :
2291 $as_echo_n "(cached) " >&6
2292else
2293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294/* end confdefs.h. */
2295$4
2296int
2297main ()
2298{
2299#ifndef $as_decl_name
2300#ifdef __cplusplus
2301 (void) $as_decl_use;
2302#else
2303 (void) $as_decl_name;
2304#endif
2305#endif
2306
2307 ;
2308 return 0;
2309}
2310_ACEOF
2311if ac_fn_c_try_compile "$LINENO"; then :
2312 eval "$3=yes"
2313else
2314 eval "$3=no"
2315fi
2316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2317fi
2318eval ac_res=\$$3
2319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2320$as_echo "$ac_res" >&6; }
2321 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2322
2323} # ac_fn_c_check_decl
2324
Matthias Kloseb9621712010-04-24 17:59:49 +00002325# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2326# ----------------------------------------------------
2327# Tries to find if the field MEMBER exists in type AGGR, after including
2328# INCLUDES, setting cache variable VAR accordingly.
2329ac_fn_c_check_member ()
2330{
2331 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2333$as_echo_n "checking for $2.$3... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002334if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002335 $as_echo_n "(cached) " >&6
2336else
2337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2338/* end confdefs.h. */
2339$5
2340int
2341main ()
2342{
2343static $2 ac_aggr;
2344if (ac_aggr.$3)
2345return 0;
2346 ;
2347 return 0;
2348}
2349_ACEOF
2350if ac_fn_c_try_compile "$LINENO"; then :
2351 eval "$4=yes"
2352else
2353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h. */
2355$5
2356int
2357main ()
2358{
2359static $2 ac_aggr;
2360if (sizeof ac_aggr.$3)
2361return 0;
2362 ;
2363 return 0;
2364}
2365_ACEOF
2366if ac_fn_c_try_compile "$LINENO"; then :
2367 eval "$4=yes"
2368else
2369 eval "$4=no"
2370fi
2371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2372fi
2373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2374fi
2375eval ac_res=\$$4
2376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2377$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002378 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002379
2380} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002382This file contains any messages produced by compilers while
2383running configure, to aid debugging if configure makes a mistake.
2384
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002385It was created by python $as_me 3.2, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002386generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002387
2388 $ $0 $@
2389
2390_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002391exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002392{
2393cat <<_ASUNAME
2394## --------- ##
2395## Platform. ##
2396## --------- ##
2397
2398hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2399uname -m = `(uname -m) 2>/dev/null || echo unknown`
2400uname -r = `(uname -r) 2>/dev/null || echo unknown`
2401uname -s = `(uname -s) 2>/dev/null || echo unknown`
2402uname -v = `(uname -v) 2>/dev/null || echo unknown`
2403
2404/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2405/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2406
2407/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2408/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2409/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002411/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2412/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2413/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2414
2415_ASUNAME
2416
2417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2418for as_dir in $PATH
2419do
2420 IFS=$as_save_IFS
2421 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002422 $as_echo "PATH: $as_dir"
2423 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002425
2426} >&5
2427
2428cat >&5 <<_ACEOF
2429
2430
2431## ----------- ##
2432## Core tests. ##
2433## ----------- ##
2434
2435_ACEOF
2436
2437
2438# Keep a trace of the command line.
2439# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002440# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002441# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002442# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002443ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002444ac_configure_args0=
2445ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002446ac_must_keep_next=false
2447for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002448do
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 for ac_arg
2450 do
2451 case $ac_arg in
2452 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2453 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2454 | -silent | --silent | --silen | --sile | --sil)
2455 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002457 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 esac
2459 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002461 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002463 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002464 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002465 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002466 case $ac_arg in
2467 *=* | --config-cache | -C | -disable-* | --disable-* \
2468 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2469 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2470 | -with-* | --with-* | -without-* | --without-* | --x)
2471 case "$ac_configure_args0 " in
2472 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2473 esac
2474 ;;
2475 -* ) ac_must_keep_next=true ;;
2476 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002477 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002479 ;;
2480 esac
2481 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002482done
Matthias Kloseb9621712010-04-24 17:59:49 +00002483{ ac_configure_args0=; unset ac_configure_args0;}
2484{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002485
2486# When interrupted or exit'd, cleanup temporary files, and complete
2487# config.log. We remove comments because anyway the quotes in there
2488# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489# WARNING: Use '\'' to represent an apostrophe within the trap.
2490# 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 +00002491trap 'exit_status=$?
2492 # Save into config.log some information that might help in debugging.
2493 {
2494 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002495
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002496 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002497## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002498## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 echo
2500 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501(
2502 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2503 eval ac_val=\$$ac_var
2504 case $ac_val in #(
2505 *${as_nl}*)
2506 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2508$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
2510 case $ac_var in #(
2511 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2513 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac ;;
2515 esac
2516 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2519 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 "s/'\''/'\''\\\\'\'''\''/g;
2522 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2523 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002524 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002526 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 esac |
2528 sort
2529)
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002531
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002532 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002533## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002534## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002535 echo
2536 for ac_var in $ac_subst_vars
2537 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 eval ac_val=\$$ac_var
2539 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002542 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 done | sort
2544 echo
2545
2546 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002547 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002549## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002550 echo
2551 for ac_var in $ac_subst_files
2552 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 eval ac_val=\$$ac_var
2554 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002555 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002557 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002558 done | sort
2559 echo
2560 fi
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002563 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002564## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002565## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 echo
2569 fi
2570 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002571 $as_echo "$as_me: caught signal $ac_signal"
2572 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002573 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574 rm -f core *.core core.conftest.* &&
2575 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002578for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002580done
2581ac_signal=0
2582
2583# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002585
Matthias Kloseb9621712010-04-24 17:59:49 +00002586$as_echo "/* confdefs.h */" > confdefs.h
2587
Martin v. Löwis11437992002-04-12 09:54:03 +00002588# Predefined preprocessor variables.
2589
2590cat >>confdefs.h <<_ACEOF
2591#define PACKAGE_NAME "$PACKAGE_NAME"
2592_ACEOF
2593
Martin v. Löwis11437992002-04-12 09:54:03 +00002594cat >>confdefs.h <<_ACEOF
2595#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2596_ACEOF
2597
Martin v. Löwis11437992002-04-12 09:54:03 +00002598cat >>confdefs.h <<_ACEOF
2599#define PACKAGE_VERSION "$PACKAGE_VERSION"
2600_ACEOF
2601
Martin v. Löwis11437992002-04-12 09:54:03 +00002602cat >>confdefs.h <<_ACEOF
2603#define PACKAGE_STRING "$PACKAGE_STRING"
2604_ACEOF
2605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606cat >>confdefs.h <<_ACEOF
2607#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2608_ACEOF
2609
Matthias Kloseb9621712010-04-24 17:59:49 +00002610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_URL "$PACKAGE_URL"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614
2615# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002616# Prefer an explicitly selected file to automatically selected ones.
2617ac_site_file1=NONE
2618ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002620 # We do not want a PATH search for config.site.
2621 case $CONFIG_SITE in #((
2622 -*) ac_site_file1=./$CONFIG_SITE;;
2623 */*) ac_site_file1=$CONFIG_SITE;;
2624 *) ac_site_file1=./$CONFIG_SITE;;
2625 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 ac_site_file1=$prefix/share/config.site
2628 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629else
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 ac_site_file1=$ac_default_prefix/share/config.site
2631 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002633for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634do
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 test "x$ac_site_file" = xNONE && continue
2636 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2638$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002640 . "$ac_site_file" \
2641 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2643as_fn_error $? "failed to load site script $ac_site_file
Gregory P. Smith69140482012-01-16 02:05:55 -08002644See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002645 fi
2646done
2647
2648if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 # Some versions of bash will fail to source /dev/null (special files
2650 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2651 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2653$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2656 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 esac
2658 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002659else
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2661$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 >$cache_file
2663fi
2664
2665# Check that the precious variables saved in the cache have kept the same
2666# value.
2667ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2670 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2672 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 case $ac_old_set,$ac_new_set in
2674 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2676$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 +00002677 ac_cache_corrupted=: ;;
2678 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2680$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 ac_cache_corrupted=: ;;
2682 ,);;
2683 *)
2684 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 # differences in whitespace do not lead to failure.
2686 ac_old_val_w=`echo x $ac_old_val`
2687 ac_new_val_w=`echo x $ac_new_val`
2688 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2690$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2691 ac_cache_corrupted=:
2692 else
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2694$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2695 eval $ac_var=\$ac_old_val
2696 fi
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2698$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2700$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 fi;;
2702 esac
2703 # Pass precious variables to config.status.
2704 if test "$ac_new_set" = set; then
2705 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002706 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 *) ac_arg=$ac_var=$ac_new_val ;;
2708 esac
2709 case " $ac_configure_args " in
2710 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002711 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 esac
2713 fi
2714done
2715if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2719$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002720 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002722## -------------------- ##
2723## Main body of script. ##
2724## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725
Guido van Rossum7f43da71994-08-01 12:15:30 +00002726ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002727ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002728ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2729ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2730ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002731
Guido van Rossum627b2d71993-12-24 10:39:16 +00002732
Michael W. Hudson54241132001-12-07 15:38:26 +00002733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002734ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002735
2736
Martin v. Löwis11437992002-04-12 09:54:03 +00002737
Benjamin Petersond23f8222009-04-05 19:13:16 +00002738if test "$prefix" != "/"; then
2739 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2740fi
2741
2742
Martin v. Löwis11437992002-04-12 09:54:03 +00002743
2744
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002745# We don't use PACKAGE_ variables, and they cause conflicts
2746# with other autoconf-based packages that include Python.h
2747grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2748rm confdefs.h
2749mv confdefs.h.new confdefs.h
2750
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002751
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002752VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002753
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002754# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002755
2756SOVERSION=1.0
2757
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002758# The later defininition of _XOPEN_SOURCE disables certain features
2759# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2760
Matthias Kloseb9621712010-04-24 17:59:49 +00002761$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002762
2763
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002764# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2765# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2766# them.
2767
Matthias Kloseb9621712010-04-24 17:59:49 +00002768$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002769
2770
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002771# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2772# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2773# them.
2774
Matthias Kloseb9621712010-04-24 17:59:49 +00002775$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002776
2777
Martin v. Löwisd6320502004-08-12 13:45:08 +00002778# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2779# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2780
Matthias Kloseb9621712010-04-24 17:59:49 +00002781$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002782
2783
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002784# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2785# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2786# them.
2787
Matthias Kloseb9621712010-04-24 17:59:49 +00002788$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002789
2790
2791
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002792define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002793
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002794# Arguments passed to configure.
2795
2796CONFIG_ARGS="$ac_configure_args"
2797
Matthias Kloseb9621712010-04-24 17:59:49 +00002798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2799$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002800# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002801if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002802 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002803 case $enableval in
2804 yes)
2805 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002806 if test ! -d "${enableval}"
2807 then
2808 enableval=/
2809 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002810 ;;
2811 esac
2812 case $enableval in
2813 no)
2814 UNIVERSALSDK=
2815 enable_universalsdk=
2816 ;;
2817 *)
2818 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002819 if test ! -d "${UNIVERSALSDK}"
2820 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002821 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002822 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002823 ;;
2824 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002825
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002826
Thomas Wouters477c8d52006-05-27 19:21:47 +00002827else
2828
2829 UNIVERSALSDK=
2830 enable_universalsdk=
2831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002832fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002833
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002834if test -n "${UNIVERSALSDK}"
2835then
Matthias Kloseb9621712010-04-24 17:59:49 +00002836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2837$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002838else
Matthias Kloseb9621712010-04-24 17:59:49 +00002839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2840$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002841fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002843
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002844
2845
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002846UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002847
Matthias Kloseb9621712010-04-24 17:59:49 +00002848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2849$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002850
2851# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002852if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002853 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2855$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002856 UNIVERSAL_ARCHS="$withval"
2857
2858else
2859
Matthias Kloseb9621712010-04-24 17:59:49 +00002860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2861$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002862
2863fi
2864
2865
2866
2867
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002868
2869# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002870if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002871 withval=$with_framework_name;
2872 PYTHONFRAMEWORK=${withval}
2873 PYTHONFRAMEWORKDIR=${withval}.framework
2874 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2875
2876else
2877
2878 PYTHONFRAMEWORK=Python
2879 PYTHONFRAMEWORKDIR=Python.framework
2880 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2881
2882fi
2883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002884# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002885if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002886 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002887 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002888 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002889 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002890 esac
2891 case $enableval in
2892 no)
2893 PYTHONFRAMEWORK=
2894 PYTHONFRAMEWORKDIR=no-framework
2895 PYTHONFRAMEWORKPREFIX=
2896 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002897 FRAMEWORKINSTALLFIRST=
2898 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002899 FRAMEWORKALTINSTALLFIRST=
2900 FRAMEWORKALTINSTALLLAST=
2901 if test "x${prefix}" = "xNONE"; then
2902 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2903 else
2904 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2905 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002906 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002907 ;;
2908 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002909 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002910 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002911 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002912 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002913 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2914 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002915 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002916
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002917 if test "x${prefix}" = "xNONE" ; then
2918 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002919
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002920 else
2921 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2922 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002923
2924 case "${enableval}" in
2925 /System*)
2926 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2927 if test "${prefix}" = "NONE" ; then
2928 # See below
2929 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2930 fi
2931 ;;
2932
2933 /Library*)
2934 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2935 ;;
2936
2937 */Library/Frameworks)
2938 MDIR="`dirname "${enableval}"`"
2939 MDIR="`dirname "${MDIR}"`"
2940 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2941
2942 if test "${prefix}" = "NONE"; then
2943 # User hasn't specified the
2944 # --prefix option, but wants to install
2945 # the framework in a non-default location,
2946 # ensure that the compatibility links get
2947 # installed relative to that prefix as well
2948 # instead of in /usr/local.
2949 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2950 fi
2951 ;;
2952
2953 *)
2954 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2955 ;;
2956 esac
2957
Jack Jansen127e56e2001-09-11 14:41:54 +00002958 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002959
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002960 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002961 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002962 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002964 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002965
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002966 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2967
2968 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2969
Jack Jansene578a632001-08-15 01:27:14 +00002970 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002971
Guido van Rossum563e7081996-09-10 18:20:48 +00002972else
Martin v. Löwis11437992002-04-12 09:54:03 +00002973
Jack Jansene578a632001-08-15 01:27:14 +00002974 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002975 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002976 PYTHONFRAMEWORKPREFIX=
2977 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002978 FRAMEWORKINSTALLFIRST=
2979 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002980 FRAMEWORKALTINSTALLFIRST=
2981 FRAMEWORKALTINSTALLLAST=
2982 if test "x${prefix}" = "xNONE" ; then
2983 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2984 else
2985 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2986 fi
Jack Jansene578a632001-08-15 01:27:14 +00002987 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002988
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002990fi
2991
Thomas Wouters477c8d52006-05-27 19:21:47 +00002992
2993
Michael W. Hudson54241132001-12-07 15:38:26 +00002994
2995
2996
2997
Jack Jansene578a632001-08-15 01:27:14 +00002998
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002999
3000
3001
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003002
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003003
Jack Jansene578a632001-08-15 01:27:14 +00003004##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003005## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003006## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003007##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003008# Set name for machine-dependent library files
3009
Matthias Kloseb9621712010-04-24 17:59:49 +00003010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3011$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003012if test -z "$MACHDEP"
3013then
Guido van Rossum563e7081996-09-10 18:20:48 +00003014 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003015 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003016 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003017 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003018 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003019 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003020 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003021 ac_md_system=`echo $ac_sys_system |
3022 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3023 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003024 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003025 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003026
Guido van Rossum07397971997-04-29 21:49:50 +00003027 case $MACHDEP in
Victor Stinner0c17d0d2011-08-20 14:01:05 +02003028 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003029 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003030 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003031 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003032 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003033 esac
3034fi
Guido van Rossum91922671997-10-09 20:24:13 +00003035
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003036# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3037# disable features if it is defined, without any means to access these
3038# features as extensions. For these systems, we skip the definition of
3039# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3040# some feature, make sure there is no alternative way to access this
3041# feature. Also, when using wildcards, make sure you have verified the
3042# need for not defining _XOPEN_SOURCE on all systems matching the
3043# wildcard, and that the wildcard does not include future systems
3044# (which may remove their limitations).
3045case $ac_sys_system/$ac_sys_release in
3046 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3047 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003048 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003049 # In addition, Stefan Krah confirms that issue #1244610 exists through
3050 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003051 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003052 define_xopen_source=no
3053 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3054 # also defined. This can be overridden by defining _BSD_SOURCE
3055 # As this has a different meaning on Linux, only define it on OpenBSD
3056
Matthias Kloseb9621712010-04-24 17:59:49 +00003057$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003058
3059 ;;
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003060 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003061 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3062 # also defined. This can be overridden by defining _BSD_SOURCE
3063 # As this has a different meaning on Linux, only define it on OpenBSD
3064
Matthias Kloseb9621712010-04-24 17:59:49 +00003065$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003066
3067 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003068 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3069 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3070 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003071 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 +00003072 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003073 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3074 # request to enable features supported by the standard as a request
3075 # to disable features not supported by the standard. The best way
3076 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3077 # entirely and define __EXTENSIONS__ instead.
3078 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003079 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003080 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3081 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003082 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003083 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003084 define_xopen_source=no;;
3085 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003086 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003087 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003088 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003089 # On FreeBSD 4, the math functions C89 does not cover are never defined
3090 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3091 FreeBSD/4.*)
3092 define_xopen_source=no;;
3093 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3094 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3095 # identifies itself as Darwin/7.*
3096 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3097 # disables platform specific features beyond repair.
3098 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3099 # has no effect, don't bother defining them
3100 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003101 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003102 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003103 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003104 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3105 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3106 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003107 AIX/4)
3108 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003109 AIX/5)
3110 if test `uname -r` -eq 1; then
3111 define_xopen_source=no
3112 fi
3113 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003114 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3115 # defining NI_NUMERICHOST.
3116 QNX/6.3.2)
3117 define_xopen_source=no
3118 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003119
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003120esac
3121
3122if test $define_xopen_source = yes
3123then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003124
Matthias Kloseb9621712010-04-24 17:59:49 +00003125$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003126
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003127
3128 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3129 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3130 # several APIs are not declared. Since this is also needed in some
3131 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003132
Matthias Kloseb9621712010-04-24 17:59:49 +00003133$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003134
3135
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003136
Matthias Kloseb9621712010-04-24 17:59:49 +00003137$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003138
3139
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003140fi
3141
Guido van Rossum91922671997-10-09 20:24:13 +00003142#
3143# SGI compilers allow the specification of the both the ABI and the
3144# ISA on the command line. Depending on the values of these switches,
3145# different and often incompatable code will be generated.
3146#
3147# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3148# thus supply support for various ABI/ISA combinations. The MACHDEP
3149# variable is also adjusted.
3150#
3151
3152if test ! -z "$SGI_ABI"
3153then
3154 CC="cc $SGI_ABI"
3155 LDFLAGS="$SGI_ABI $LDFLAGS"
3156 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3159$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003160
Jack Jansen6b08a402004-06-03 12:41:45 +00003161# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3162# it may influence the way we can build extensions, so distutils
3163# needs to check it
3164
Thomas Wouters477c8d52006-05-27 19:21:47 +00003165
Jack Jansen6b08a402004-06-03 12:41:45 +00003166CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003167EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003168
Matthias Kloseb9621712010-04-24 17:59:49 +00003169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3170$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003171ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3173$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003174
Guido van Rossum627b2d71993-12-24 10:39:16 +00003175# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003176
3177# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3178# for debug/optimization stuff. BASECFLAGS is for flags that are required
3179# just to get things to compile and link. Users are free to override OPT
3180# when running configure or make. The build should not break if they do.
3181# BASECFLAGS should generally not be messed with, however.
3182
3183# XXX shouldn't some/most/all of this code be merged with the stuff later
3184# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3186$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003187
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003188# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003189if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003191 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003192 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003193 without_gcc=yes;;
3194 yes) CC=gcc
3195 without_gcc=no;;
3196 *) CC=$withval
3197 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003198 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003199else
Martin v. Löwis11437992002-04-12 09:54:03 +00003200
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003201 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003202 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003203 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003204 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003205 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003206fi
3207
Matthias Kloseb9621712010-04-24 17:59:49 +00003208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3209$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003210
Guido van Rossum8b131c51995-03-09 14:10:13 +00003211# If the user switches compilers, we can't believe the cache
3212if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3213then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003214 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003215(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003216fi
3217
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003218# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3219# when the compiler supports them, but we don't always want -O2, and
3220# we set -g later.
3221if test -z "$CFLAGS"; then
3222 CFLAGS=
3223fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003224ac_ext=c
3225ac_cpp='$CPP $CPPFLAGS'
3226ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3227ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3228ac_compiler_gnu=$ac_cv_c_compiler_gnu
3229if test -n "$ac_tool_prefix"; then
3230 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3231set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3233$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003234if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003235 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003236else
3237 if test -n "$CC"; then
3238 ac_cv_prog_CC="$CC" # Let the user override the test.
3239else
Martin v. Löwis11437992002-04-12 09:54:03 +00003240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3241for as_dir in $PATH
3242do
3243 IFS=$as_save_IFS
3244 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003245 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003246 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003247 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003248 $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 +00003249 break 2
3250 fi
3251done
Matthias Kloseb9621712010-04-24 17:59:49 +00003252 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003254
Jack Jansendd19cf82001-12-06 22:36:17 +00003255fi
3256fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003257CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003258if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3260$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003261else
Matthias Kloseb9621712010-04-24 17:59:49 +00003262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3263$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003264fi
3265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003266
Martin v. Löwis11437992002-04-12 09:54:03 +00003267fi
3268if test -z "$ac_cv_prog_CC"; then
3269 ac_ct_CC=$CC
3270 # Extract the first word of "gcc", so it can be a program name with args.
3271set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3273$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003274if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003275 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003276else
3277 if test -n "$ac_ct_CC"; then
3278 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3279else
3280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3281for as_dir in $PATH
3282do
3283 IFS=$as_save_IFS
3284 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003285 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003286 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003287 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003288 $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 +00003289 break 2
3290 fi
3291done
Matthias Kloseb9621712010-04-24 17:59:49 +00003292 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003293IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003294
3295fi
3296fi
3297ac_ct_CC=$ac_cv_prog_ac_ct_CC
3298if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3300$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003301else
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3303$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003304fi
3305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003306 if test "x$ac_ct_CC" = x; then
3307 CC=""
3308 else
3309 case $cross_compiling:$ac_tool_warned in
3310yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003311{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3312$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003313ac_tool_warned=yes ;;
3314esac
3315 CC=$ac_ct_CC
3316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003317else
3318 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003319fi
3320
Jack Jansendd19cf82001-12-06 22:36:17 +00003321if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003322 if test -n "$ac_tool_prefix"; then
3323 # 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 +00003324set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3326$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003327if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003328 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003329else
3330 if test -n "$CC"; then
3331 ac_cv_prog_CC="$CC" # Let the user override the test.
3332else
Martin v. Löwis11437992002-04-12 09:54:03 +00003333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3334for as_dir in $PATH
3335do
3336 IFS=$as_save_IFS
3337 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003338 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003339 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003340 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003341 $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 +00003342 break 2
3343 fi
3344done
Matthias Kloseb9621712010-04-24 17:59:49 +00003345 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003346IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003347
3348fi
3349fi
3350CC=$ac_cv_prog_CC
3351if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3353$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003354else
Matthias Kloseb9621712010-04-24 17:59:49 +00003355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3356$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003357fi
3358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003359
Martin v. Löwis11437992002-04-12 09:54:03 +00003360 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003361fi
3362if test -z "$CC"; then
3363 # Extract the first word of "cc", so it can be a program name with args.
3364set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3366$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003367if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003368 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003369else
3370 if test -n "$CC"; then
3371 ac_cv_prog_CC="$CC" # Let the user override the test.
3372else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003373 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3375for as_dir in $PATH
3376do
3377 IFS=$as_save_IFS
3378 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003379 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003380 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003381 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3382 ac_prog_rejected=yes
3383 continue
3384 fi
3385 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003386 $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 +00003387 break 2
3388 fi
3389done
Matthias Kloseb9621712010-04-24 17:59:49 +00003390 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003391IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003392
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003393if test $ac_prog_rejected = yes; then
3394 # We found a bogon in the path, so make sure we never use it.
3395 set dummy $ac_cv_prog_CC
3396 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003397 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003398 # We chose a different compiler from the bogus one.
3399 # However, it has the same basename, so the bogon will be chosen
3400 # first if we set CC to just the basename; use the full file name.
3401 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003402 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003403 fi
3404fi
3405fi
3406fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003407CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003408if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3410$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003411else
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3413$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003414fi
3415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003416
Martin v. Löwis11437992002-04-12 09:54:03 +00003417fi
3418if test -z "$CC"; then
3419 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003420 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003421 do
3422 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3423set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3425$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003426if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003427 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003428else
3429 if test -n "$CC"; then
3430 ac_cv_prog_CC="$CC" # Let the user override the test.
3431else
Martin v. Löwis11437992002-04-12 09:54:03 +00003432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3433for as_dir in $PATH
3434do
3435 IFS=$as_save_IFS
3436 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003437 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003438 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 $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 +00003441 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003442 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003443done
Matthias Kloseb9621712010-04-24 17:59:49 +00003444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003445IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003446
3447fi
3448fi
3449CC=$ac_cv_prog_CC
3450if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3452$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003453else
Matthias Kloseb9621712010-04-24 17:59:49 +00003454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3455$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003456fi
3457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458
Martin v. Löwis11437992002-04-12 09:54:03 +00003459 test -n "$CC" && break
3460 done
3461fi
3462if test -z "$CC"; then
3463 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003465do
3466 # Extract the first word of "$ac_prog", so it can be a program name with args.
3467set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3469$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003470if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003471 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003472else
3473 if test -n "$ac_ct_CC"; then
3474 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3475else
3476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3477for as_dir in $PATH
3478do
3479 IFS=$as_save_IFS
3480 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003481 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003482 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003484 $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 +00003485 break 2
3486 fi
3487done
Matthias Kloseb9621712010-04-24 17:59:49 +00003488 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003490
Martin v. Löwis11437992002-04-12 09:54:03 +00003491fi
3492fi
3493ac_ct_CC=$ac_cv_prog_ac_ct_CC
3494if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3496$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003497else
Matthias Kloseb9621712010-04-24 17:59:49 +00003498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3499$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003500fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003502
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 test -n "$ac_ct_CC" && break
3504done
Michael W. Hudson54241132001-12-07 15:38:26 +00003505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003506 if test "x$ac_ct_CC" = x; then
3507 CC=""
3508 else
3509 case $cross_compiling:$ac_tool_warned in
3510yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003511{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3512$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003513ac_tool_warned=yes ;;
3514esac
3515 CC=$ac_ct_CC
3516 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003517fi
3518
3519fi
3520
3521
Matthias Kloseb9621712010-04-24 17:59:49 +00003522test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3523$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003524as_fn_error $? "no acceptable C compiler found in \$PATH
Gregory P. Smith69140482012-01-16 02:05:55 -08003525See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003526
3527# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003528$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3529set X $ac_compile
3530ac_compiler=$2
3531for ac_option in --version -v -V -qversion; do
3532 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533case "(($ac_try" in
3534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3535 *) ac_try_echo=$ac_try;;
3536esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003537eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3538$as_echo "$ac_try_echo"; } >&5
3539 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003541 if test -s conftest.err; then
3542 sed '10a\
3543... rest of stderr output deleted ...
3544 10q' conftest.err >conftest.er1
3545 cat conftest.er1 >&5
3546 fi
3547 rm -f conftest.er1 conftest.err
3548 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3549 test $ac_status = 0; }
3550done
Martin v. Löwis11437992002-04-12 09:54:03 +00003551
Matthias Kloseb9621712010-04-24 17:59:49 +00003552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003553/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003554
Martin v. Löwis11437992002-04-12 09:54:03 +00003555int
3556main ()
3557{
3558
3559 ;
3560 return 0;
3561}
3562_ACEOF
3563ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003564ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003565# Try to create an executable without -o first, disregard a.out.
3566# It will help us diagnose broken compilers, and finding out an intuition
3567# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3569$as_echo_n "checking whether the C compiler works... " >&6; }
3570ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3571
3572# The possible output files:
3573ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003575ac_rmfiles=
3576for ac_file in $ac_files
3577do
3578 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3581 esac
3582done
3583rm -f $ac_rmfiles
3584
Matthias Kloseb9621712010-04-24 17:59:49 +00003585if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003586case "(($ac_try" in
3587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3588 *) ac_try_echo=$ac_try;;
3589esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003590eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3591$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003592 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3595 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003596 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3597# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3598# in a Makefile. We should not override ac_cv_exeext if it was cached,
3599# so that the user can short-circuit this test for compilers unknown to
3600# Autoconf.
3601for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003602do
3603 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003606 ;;
3607 [ab].out )
3608 # We found the default executable, but exeext='' is most
3609 # certainly right.
3610 break;;
3611 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613 then :; else
3614 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3615 fi
3616 # We set ac_cv_exeext here because the later test for it is not
3617 # safe: cross compilers may not add the suffix if given an `-o'
3618 # argument, so we may need to know it at that point already.
3619 # Even if this section looks crufty: it has the advantage of
3620 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003621 break;;
3622 * )
3623 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 esac
3625done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626test "$ac_cv_exeext" = no && ac_cv_exeext=
3627
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003628else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629 ac_file=''
3630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003631if test -z "$ac_file"; then :
3632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3633$as_echo "no" >&6; }
3634$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003635sed 's/^/| /' conftest.$ac_ext >&5
3636
Matthias Kloseb9621712010-04-24 17:59:49 +00003637{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003639as_fn_error 77 "C compiler cannot create executables
Gregory P. Smith69140482012-01-16 02:05:55 -08003640See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003641else
3642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3643$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3646$as_echo_n "checking for C compiler default output file name... " >&6; }
3647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3648$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003649ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003650
Matthias Kloseb9621712010-04-24 17:59:49 +00003651rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003652ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3654$as_echo_n "checking for suffix of executables... " >&6; }
3655if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656case "(($ac_try" in
3657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3658 *) ac_try_echo=$ac_try;;
3659esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3661$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003663 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3665 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003666 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3667# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3668# work properly (i.e., refer to `conftest.exe'), while it won't with
3669# `rm'.
3670for ac_file in conftest.exe conftest conftest.*; do
3671 test -f "$ac_file" || continue
3672 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003674 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3675 break;;
3676 * ) break;;
3677 esac
3678done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003679else
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003682as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Gregory P. Smith69140482012-01-16 02:05:55 -08003683See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003685rm -f conftest conftest$ac_cv_exeext
3686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3687$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003688
3689rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003690EXEEXT=$ac_cv_exeext
3691ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3693/* end confdefs.h. */
3694#include <stdio.h>
3695int
3696main ()
3697{
3698FILE *f = fopen ("conftest.out", "w");
3699 return ferror (f) || fclose (f) != 0;
3700
3701 ;
3702 return 0;
3703}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003705ac_clean_files="$ac_clean_files conftest.out"
3706# Check that the compiler produces executables we can run. If not, either
3707# the compiler is broken, or we cross compile.
3708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3709$as_echo_n "checking whether we are cross compiling... " >&6; }
3710if test "$cross_compiling" != yes; then
3711 { { ac_try="$ac_link"
3712case "(($ac_try" in
3713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3714 *) ac_try_echo=$ac_try;;
3715esac
3716eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3717$as_echo "$ac_try_echo"; } >&5
3718 (eval "$ac_link") 2>&5
3719 ac_status=$?
3720 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3721 test $ac_status = 0; }
3722 if { ac_try='./conftest$ac_cv_exeext'
3723 { { case "(($ac_try" in
3724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3725 *) ac_try_echo=$ac_try;;
3726esac
3727eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3728$as_echo "$ac_try_echo"; } >&5
3729 (eval "$ac_try") 2>&5
3730 ac_status=$?
3731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3732 test $ac_status = 0; }; }; then
3733 cross_compiling=no
3734 else
3735 if test "$cross_compiling" = maybe; then
3736 cross_compiling=yes
3737 else
3738 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3739$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003740as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003741If you meant to cross compile, use \`--host'.
Gregory P. Smith69140482012-01-16 02:05:55 -08003742See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 fi
3744 fi
3745fi
3746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3747$as_echo "$cross_compiling" >&6; }
3748
3749rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3750ac_clean_files=$ac_clean_files_save
3751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3752$as_echo_n "checking for suffix of object files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003753if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 $as_echo_n "(cached) " >&6
3755else
3756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003757/* end confdefs.h. */
3758
3759int
3760main ()
3761{
3762
3763 ;
3764 return 0;
3765}
3766_ACEOF
3767rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003768if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769case "(($ac_try" in
3770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3771 *) ac_try_echo=$ac_try;;
3772esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3774$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3778 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003779 for ac_file in conftest.o conftest.obj conftest.*; do
3780 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3784 break;;
3785 esac
3786done
3787else
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003789sed 's/^/| /' conftest.$ac_ext >&5
3790
Matthias Kloseb9621712010-04-24 17:59:49 +00003791{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003793as_fn_error $? "cannot compute suffix of object files: cannot compile
Gregory P. Smith69140482012-01-16 02:05:55 -08003794See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003795fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003796rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3799$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003800OBJEXT=$ac_cv_objext
3801ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3803$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003804if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003806else
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003809
Martin v. Löwis11437992002-04-12 09:54:03 +00003810int
3811main ()
3812{
3813#ifndef __GNUC__
3814 choke me
3815#endif
3816
3817 ;
3818 return 0;
3819}
3820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003821if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003822 ac_compiler_gnu=yes
3823else
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003827ac_cv_c_compiler_gnu=$ac_compiler_gnu
3828
3829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3831$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3832if test $ac_compiler_gnu = yes; then
3833 GCC=yes
3834else
3835 GCC=
3836fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003837ac_test_CFLAGS=${CFLAGS+set}
3838ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3840$as_echo_n "checking whether $CC accepts -g... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003841if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003843else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844 ac_save_c_werror_flag=$ac_c_werror_flag
3845 ac_c_werror_flag=yes
3846 ac_cv_prog_cc_g=no
3847 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003850
Martin v. Löwis11437992002-04-12 09:54:03 +00003851int
3852main ()
3853{
3854
3855 ;
3856 return 0;
3857}
3858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003859if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003860 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861else
Matthias Kloseb9621712010-04-24 17:59:49 +00003862 CFLAGS=""
3863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864/* end confdefs.h. */
3865
3866int
3867main ()
3868{
3869
3870 ;
3871 return 0;
3872}
3873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003874if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003875
Matthias Kloseb9621712010-04-24 17:59:49 +00003876else
3877 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880/* end confdefs.h. */
3881
3882int
3883main ()
3884{
3885
3886 ;
3887 return 0;
3888}
3889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003890if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3898 ac_c_werror_flag=$ac_save_c_werror_flag
3899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3901$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003902if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003903 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003904elif test $ac_cv_prog_cc_g = yes; then
3905 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003906 CFLAGS="-g -O2"
3907 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003908 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003909 fi
3910else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003911 if test "$GCC" = yes; then
3912 CFLAGS="-O2"
3913 else
3914 CFLAGS=
3915 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3918$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003919if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003921else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003923ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003925/* end confdefs.h. */
3926#include <stdarg.h>
3927#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003928struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00003929/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3930struct buf { int x; };
3931FILE * (*rcsopen) (struct buf *, struct stat *, int);
3932static char *e (p, i)
3933 char **p;
3934 int i;
3935{
3936 return p[i];
3937}
3938static char *f (char * (*g) (char **, int), char **p, ...)
3939{
3940 char *s;
3941 va_list v;
3942 va_start (v,p);
3943 s = g (p, va_arg (v,int));
3944 va_end (v);
3945 return s;
3946}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003947
3948/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3949 function prototypes and stuff, but not '\xHH' hex character constants.
3950 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003952 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3953 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003955int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3958 inside strings and character constants. */
3959#define FOO(x) 'x'
3960int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3961
Skip Montanaro6dead952003-09-25 14:50:04 +00003962int test (int i, double x);
3963struct s1 {int (*f) (int a);};
3964struct s2 {int (*f) (double a);};
3965int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3966int argc;
3967char **argv;
3968int
3969main ()
3970{
3971return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3972 ;
3973 return 0;
3974}
3975_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3977 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003978do
3979 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983rm -f core conftest.err conftest.$ac_objext
3984 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003985done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003987CC=$ac_save_CC
3988
3989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003990# AC_CACHE_VAL
3991case "x$ac_cv_prog_cc_c89" in
3992 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3994$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3997$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003998 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003999 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4001$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004002esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004003if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004004
Matthias Kloseb9621712010-04-24 17:59:49 +00004005fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004006
Martin v. Löwis11437992002-04-12 09:54:03 +00004007ac_ext=c
4008ac_cpp='$CPP $CPPFLAGS'
4009ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4010ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4011ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004012
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004013
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004014
4015
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4017$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004018
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004020if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004022
4023 case $withval in
4024 no) with_cxx_main=no
4025 MAINCC='$(CC)';;
4026 yes) with_cxx_main=yes
4027 MAINCC='$(CXX)';;
4028 *) with_cxx_main=yes
4029 MAINCC=$withval
4030 if test -z "$CXX"
4031 then
4032 CXX=$withval
4033 fi;;
4034 esac
4035else
4036
4037 with_cxx_main=no
4038 MAINCC='$(CC)'
4039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040fi
4041
Matthias Kloseb9621712010-04-24 17:59:49 +00004042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4043$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004044
4045preset_cxx="$CXX"
4046if test -z "$CXX"
4047then
4048 case "$CC" in
4049 gcc) # Extract the first word of "g++", so it can be a program name with args.
4050set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4052$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004053if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004054 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004055else
4056 case $CXX in
4057 [\\/]* | ?:[\\/]*)
4058 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4059 ;;
4060 *)
4061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4062for as_dir in notfound
4063do
4064 IFS=$as_save_IFS
4065 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004067 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004068 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004070 break 2
4071 fi
4072done
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004075
4076 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4077 ;;
4078esac
4079fi
4080CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004081if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4083$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004084else
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4086$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004089 ;;
4090 cc) # Extract the first word of "c++", so it can be a program name with args.
4091set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4093$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004094if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004095 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004096else
4097 case $CXX in
4098 [\\/]* | ?:[\\/]*)
4099 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4100 ;;
4101 *)
4102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4103for as_dir in notfound
4104do
4105 IFS=$as_save_IFS
4106 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004107 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004108 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004109 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004111 break 2
4112 fi
4113done
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004115IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004116
4117 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4118 ;;
4119esac
4120fi
4121CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004122if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4124$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004125else
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4127$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004130 ;;
4131 esac
4132 if test "$CXX" = "notfound"
4133 then
4134 CXX=""
4135 fi
4136fi
4137if test -z "$CXX"
4138then
4139 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4140do
4141 # Extract the first word of "$ac_prog", so it can be a program name with args.
4142set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4144$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004145if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004147else
4148 if test -n "$CXX"; then
4149 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4150else
4151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4152for as_dir in $PATH
4153do
4154 IFS=$as_save_IFS
4155 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004157 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004158 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004160 break 2
4161 fi
4162done
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004164IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004165
4166fi
4167fi
4168CXX=$ac_cv_prog_CXX
4169if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4171$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004172else
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4174$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004175fi
4176
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004177
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004178 test -n "$CXX" && break
4179done
4180test -n "$CXX" || CXX="notfound"
4181
4182 if test "$CXX" = "notfound"
4183 then
4184 CXX=""
4185 fi
4186fi
4187if test "$preset_cxx" != "$CXX"
4188then
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004190
4191 By default, distutils will build C++ extension modules with \"$CXX\".
4192 If this is not intended, then set CXX on the configure command line.
4193 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004194$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004195
4196 By default, distutils will build C++ extension modules with \"$CXX\".
4197 If this is not intended, then set CXX on the configure command line.
4198 " >&2;}
4199fi
4200
4201
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4203$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4204save_LDFLAGS="$LDFLAGS"
4205LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004206
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4208/* end confdefs.h. */
4209
4210int
4211main ()
4212{
4213
4214 ;
4215 return 0;
4216}
4217_ACEOF
4218if ac_fn_c_try_link "$LINENO"; then :
4219 NO_AS_NEEDED="-Wl,--no-as-needed"
4220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4221$as_echo "yes" >&6; }
4222else
4223 NO_AS_NEEDED=""
4224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4225$as_echo "no" >&6; }
4226fi
4227rm -f core conftest.err conftest.$ac_objext \
4228 conftest$ac_exeext conftest.$ac_ext
4229LDFLAGS="$save_LDFLAGS"
4230
4231
4232
4233# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004234ac_ext=c
4235ac_cpp='$CPP $CPPFLAGS'
4236ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4237ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4238ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4240$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004241# On Suns, sometimes $CPP names a directory.
4242if test -n "$CPP" && test -d "$CPP"; then
4243 CPP=
4244fi
4245if test -z "$CPP"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08004246 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004247 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004248else
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 # Double quotes because CPP needs to be expanded
4250 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4251 do
4252 ac_preproc_ok=false
4253for ac_c_preproc_warn_flag in '' yes
4254do
4255 # Use a header file that comes with gcc, so configuring glibc
4256 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004257 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4258 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004259 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004262/* end confdefs.h. */
4263#ifdef __STDC__
4264# include <limits.h>
4265#else
4266# include <assert.h>
4267#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004268 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004270if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004271
Matthias Kloseb9621712010-04-24 17:59:49 +00004272else
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # Broken: fails on valid input.
4274continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004275fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004276rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004277
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004282#include <ac_nonexistent.h>
4283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004284if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004285 # Broken: success on invalid input.
4286continue
4287else
Martin v. Löwis11437992002-04-12 09:54:03 +00004288 # Passes both tests.
4289ac_preproc_ok=:
4290break
4291fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004292rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004293
4294done
4295# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004296rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004297if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004298 break
4299fi
4300
4301 done
4302 ac_cv_prog_CPP=$CPP
4303
4304fi
4305 CPP=$ac_cv_prog_CPP
4306else
4307 ac_cv_prog_CPP=$CPP
4308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4310$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004311ac_preproc_ok=false
4312for ac_c_preproc_warn_flag in '' yes
4313do
4314 # Use a header file that comes with gcc, so configuring glibc
4315 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004316 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4317 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004318 # On the NeXT, cc -E runs the code through the compiler's parser,
4319 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004321/* end confdefs.h. */
4322#ifdef __STDC__
4323# include <limits.h>
4324#else
4325# include <assert.h>
4326#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004327 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004329if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004330
Matthias Kloseb9621712010-04-24 17:59:49 +00004331else
Martin v. Löwis11437992002-04-12 09:54:03 +00004332 # Broken: fails on valid input.
4333continue
4334fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004335rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004338 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004341#include <ac_nonexistent.h>
4342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004343if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 # Broken: success on invalid input.
4345continue
4346else
Martin v. Löwis11437992002-04-12 09:54:03 +00004347 # Passes both tests.
4348ac_preproc_ok=:
4349break
4350fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004351rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004352
4353done
4354# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004355rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004356if $ac_preproc_ok; then :
4357
Martin v. Löwis11437992002-04-12 09:54:03 +00004358else
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4360$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004361as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Gregory P. Smith69140482012-01-16 02:05:55 -08004362See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004363fi
4364
4365ac_ext=c
4366ac_cpp='$CPP $CPPFLAGS'
4367ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4368ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4369ac_compiler_gnu=$ac_cv_c_compiler_gnu
4370
4371
Matthias Kloseb9621712010-04-24 17:59:49 +00004372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4373$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004374if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004376else
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 # Loop through the user's path and test for each of PROGNAME-LIST
4380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4382do
4383 IFS=$as_save_IFS
4384 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 for ac_prog in grep ggrep; do
4386 for ac_exec_ext in '' $ac_executable_extensions; do
4387 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004388 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004389# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390 # Check for GNU $ac_path_GREP
4391case `"$ac_path_GREP" --version 2>&1` in
4392*GNU*)
4393 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4394*)
4395 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004396 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397 while :
4398 do
4399 cat "conftest.in" "conftest.in" >"conftest.tmp"
4400 mv "conftest.tmp" "conftest.in"
4401 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004403 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4404 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4407 # Best one so far, save it but keep looking for a better one
4408 ac_cv_path_GREP="$ac_path_GREP"
4409 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004410 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411 # 10*(2^10) chars as input seems more than enough
4412 test $ac_count -gt 10 && break
4413 done
4414 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4415esac
4416
Matthias Kloseb9621712010-04-24 17:59:49 +00004417 $ac_path_GREP_found && break 3
4418 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004419 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004420 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004422 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004423 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 +00004424 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004425else
4426 ac_cv_path_GREP=$GREP
4427fi
4428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4431$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004432 GREP="$ac_cv_path_GREP"
4433
4434
Matthias Kloseb9621712010-04-24 17:59:49 +00004435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4436$as_echo_n "checking for egrep... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004437if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004438 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439else
4440 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4441 then ac_cv_path_EGREP="$GREP -E"
4442 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004443 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004444 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 # Loop through the user's path and test for each of PROGNAME-LIST
4446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004447for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4448do
4449 IFS=$as_save_IFS
4450 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004451 for ac_prog in egrep; do
4452 for ac_exec_ext in '' $ac_executable_extensions; do
4453 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004454 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004455# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004456 # Check for GNU $ac_path_EGREP
4457case `"$ac_path_EGREP" --version 2>&1` in
4458*GNU*)
4459 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4460*)
4461 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004462 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004463 while :
4464 do
4465 cat "conftest.in" "conftest.in" >"conftest.tmp"
4466 mv "conftest.tmp" "conftest.in"
4467 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004468 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004469 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4470 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004471 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004472 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4473 # Best one so far, save it but keep looking for a better one
4474 ac_cv_path_EGREP="$ac_path_EGREP"
4475 ac_path_EGREP_max=$ac_count
4476 fi
4477 # 10*(2^10) chars as input seems more than enough
4478 test $ac_count -gt 10 && break
4479 done
4480 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4481esac
4482
Matthias Kloseb9621712010-04-24 17:59:49 +00004483 $ac_path_EGREP_found && break 3
4484 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004485 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004486 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004487IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004488 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004489 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 +00004490 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491else
4492 ac_cv_path_EGREP=$EGREP
4493fi
4494
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004495 fi
4496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4498$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004499 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004500
4501
Matthias Kloseb9621712010-04-24 17:59:49 +00004502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4503$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004504if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004505 $as_echo_n "(cached) " >&6
4506else
4507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004508/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004509#include <stdlib.h>
4510#include <stdarg.h>
4511#include <string.h>
4512#include <float.h>
4513
4514int
4515main ()
4516{
4517
4518 ;
4519 return 0;
4520}
4521_ACEOF
4522if ac_fn_c_try_compile "$LINENO"; then :
4523 ac_cv_header_stdc=yes
4524else
4525 ac_cv_header_stdc=no
4526fi
4527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4528
4529if test $ac_cv_header_stdc = yes; then
4530 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4532/* end confdefs.h. */
4533#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004534
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004535_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004537 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004538
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004539else
Matthias Kloseb9621712010-04-24 17:59:49 +00004540 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004541fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004542rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004543
Matthias Kloseb9621712010-04-24 17:59:49 +00004544fi
4545
4546if test $ac_cv_header_stdc = yes; then
4547 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4549/* end confdefs.h. */
4550#include <stdlib.h>
4551
4552_ACEOF
4553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4554 $EGREP "free" >/dev/null 2>&1; then :
4555
4556else
4557 ac_cv_header_stdc=no
4558fi
4559rm -f conftest*
4560
4561fi
4562
4563if test $ac_cv_header_stdc = yes; then
4564 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4565 if test "$cross_compiling" = yes; then :
4566 :
4567else
4568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4569/* end confdefs.h. */
4570#include <ctype.h>
4571#include <stdlib.h>
4572#if ((' ' & 0x0FF) == 0x020)
4573# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4574# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4575#else
4576# define ISLOWER(c) \
4577 (('a' <= (c) && (c) <= 'i') \
4578 || ('j' <= (c) && (c) <= 'r') \
4579 || ('s' <= (c) && (c) <= 'z'))
4580# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4581#endif
4582
4583#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4584int
4585main ()
4586{
4587 int i;
4588 for (i = 0; i < 256; i++)
4589 if (XOR (islower (i), ISLOWER (i))
4590 || toupper (i) != TOUPPER (i))
4591 return 2;
4592 return 0;
4593}
4594_ACEOF
4595if ac_fn_c_try_run "$LINENO"; then :
4596
4597else
4598 ac_cv_header_stdc=no
4599fi
4600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4601 conftest.$ac_objext conftest.beam conftest.$ac_ext
4602fi
4603
4604fi
4605fi
4606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4607$as_echo "$ac_cv_header_stdc" >&6; }
4608if test $ac_cv_header_stdc = yes; then
4609
4610$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4611
4612fi
4613
4614# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4615for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4616 inttypes.h stdint.h unistd.h
4617do :
4618 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4619ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4620"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004621if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004622 cat >>confdefs.h <<_ACEOF
4623#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4624_ACEOF
4625
4626fi
4627
4628done
4629
4630
4631
4632 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 -08004633if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004634 MINIX=yes
4635else
4636 MINIX=
4637fi
4638
4639
4640 if test "$MINIX" = yes; then
4641
4642$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4643
4644
4645$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4646
4647
4648$as_echo "#define _MINIX 1" >>confdefs.h
4649
4650 fi
4651
4652
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4654$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004655if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004656 $as_echo_n "(cached) " >&6
4657else
4658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4659/* end confdefs.h. */
4660
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004661# define __EXTENSIONS__ 1
4662 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00004663int
4664main ()
4665{
4666
4667 ;
4668 return 0;
4669}
4670_ACEOF
4671if ac_fn_c_try_compile "$LINENO"; then :
4672 ac_cv_safe_to_define___extensions__=yes
4673else
4674 ac_cv_safe_to_define___extensions__=no
4675fi
4676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4677fi
4678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4679$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4680 test $ac_cv_safe_to_define___extensions__ = yes &&
4681 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4682
4683 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4684
4685 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4686
4687 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4688
4689 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4690
4691
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004693# Check for unsupported systems
4694case $ac_sys_system/$ac_sys_release in
4695atheos*|Linux*/1*)
4696 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4697 echo See README for details.
4698 exit 1;;
4699esac
4700
4701
Matthias Kloseb9621712010-04-24 17:59:49 +00004702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4703$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004704
4705# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004706if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004707 withval=$with_suffix;
4708 case $withval in
4709 no) EXEEXT=;;
4710 yes) EXEEXT=.exe;;
4711 *) EXEEXT=$withval;;
4712 esac
4713fi
4714
Matthias Kloseb9621712010-04-24 17:59:49 +00004715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4716$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004717
4718# Test whether we're running on a non-case-sensitive system, in which
4719# case we give a warning if no ext is given
4720
Matthias Kloseb9621712010-04-24 17:59:49 +00004721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4722$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004723if test ! -d CaseSensitiveTestDir; then
4724mkdir CaseSensitiveTestDir
4725fi
4726
4727if test -d casesensitivetestdir
4728then
Matthias Kloseb9621712010-04-24 17:59:49 +00004729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4730$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004731 BUILDEXEEXT=.exe
4732else
Matthias Kloseb9621712010-04-24 17:59:49 +00004733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4734$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735 BUILDEXEEXT=$EXEEXT
4736fi
4737rmdir CaseSensitiveTestDir
4738
4739case $MACHDEP in
4740bsdos*)
4741 case $CC in
4742 gcc) CC="$CC -D_HAVE_BSDI";;
4743 esac;;
4744esac
4745
4746case $ac_sys_system in
4747hp*|HP*)
4748 case $CC in
4749 cc|*/cc) CC="$CC -Ae";;
4750 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751esac
4752
4753
4754
Matthias Kloseb9621712010-04-24 17:59:49 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4756$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757if test -z "$LIBRARY"
4758then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004759 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4762$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004763
4764# LDLIBRARY is the name of the library to link against (as opposed to the
4765# name of the library into which to insert object files). BLDLIBRARY is also
4766# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4767# is blank as the main program is not linked directly against LDLIBRARY.
4768# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4769# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4770# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4771# DLLLIBRARY is the shared (i.e., DLL) library.
4772#
4773# RUNSHARED is used to run shared python without installed libraries
4774#
4775# INSTSONAME is the name of the shared library that will be use to install
4776# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004777#
4778# LDVERSION is the shared library version number, normally the Python version
4779# with the ABI build flags appended.
4780
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781
4782
4783
4784
4785
4786
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004787
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004788LDLIBRARY="$LIBRARY"
4789BLDLIBRARY='$(LDLIBRARY)'
4790INSTSONAME='$(LDLIBRARY)'
4791DLLLIBRARY=''
4792LDLIBRARYDIR=''
4793RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004794LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004795
4796# LINKCC is the command that links the python executable -- default is $(CC).
4797# If CXX is set, and if it is needed to link a main function that was
4798# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4799# python might then depend on the C++ runtime
4800# This is altered for AIX in order to build the export list before
4801# linking.
4802
Matthias Kloseb9621712010-04-24 17:59:49 +00004803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4804$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004805if test -z "$LINKCC"
4806then
4807 LINKCC='$(PURIFY) $(MAINCC)'
4808 case $ac_sys_system in
4809 AIX*)
4810 exp_extra="\"\""
4811 if test $ac_sys_release -ge 5 -o \
4812 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4813 exp_extra="."
4814 fi
4815 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004816 QNX*)
4817 # qcc must be used because the other compilers do not
4818 # support -N.
4819 LINKCC=qcc;;
4820 esac
4821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4823$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004824
4825# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4826# make sure we default having it set to "no": this is used by
4827# distutils.unixccompiler to know if it should add --enable-new-dtags
4828# to linker command lines, and failing to detect GNU ld simply results
4829# in the same bahaviour as before.
4830
Matthias Kloseb9621712010-04-24 17:59:49 +00004831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4832$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004833ac_prog=ld
4834if test "$GCC" = yes; then
4835 ac_prog=`$CC -print-prog-name=ld`
4836fi
4837case `"$ac_prog" -V 2>&1 < /dev/null` in
4838 *GNU*)
4839 GNULD=yes;;
4840 *)
4841 GNULD=no;;
4842esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4844$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4847$as_echo_n "checking for inline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004848if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004849 $as_echo_n "(cached) " >&6
4850else
4851 ac_cv_c_inline=no
4852for ac_kw in inline __inline__ __inline; do
4853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4854/* end confdefs.h. */
4855#ifndef __cplusplus
4856typedef int foo_t;
4857static $ac_kw foo_t static_foo () {return 0; }
4858$ac_kw foo_t foo () {return 0; }
4859#endif
4860
4861_ACEOF
4862if ac_fn_c_try_compile "$LINENO"; then :
4863 ac_cv_c_inline=$ac_kw
4864fi
4865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4866 test "$ac_cv_c_inline" != no && break
4867done
4868
4869fi
4870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4871$as_echo "$ac_cv_c_inline" >&6; }
4872
4873case $ac_cv_c_inline in
4874 inline | yes) ;;
4875 *)
4876 case $ac_cv_c_inline in
4877 no) ac_val=;;
4878 *) ac_val=$ac_cv_c_inline;;
4879 esac
4880 cat >>confdefs.h <<_ACEOF
4881#ifndef __cplusplus
4882#define inline $ac_val
4883#endif
4884_ACEOF
4885 ;;
4886esac
4887
4888if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004889
4890$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004891
4892
4893fi
4894
4895
Matthias Kloseb9621712010-04-24 17:59:49 +00004896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4897$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004898# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004899if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900 enableval=$enable_shared;
4901fi
4902
4903
4904if test -z "$enable_shared"
4905then
4906 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004907 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908 enable_shared="yes";;
4909 *)
4910 enable_shared="no";;
4911 esac
4912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4914$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004915
Matthias Kloseb9621712010-04-24 17:59:49 +00004916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4917$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004919if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004920 enableval=$enable_profiling; ac_save_cc="$CC"
4921 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004922 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004923 ac_enable_profiling="no"
4924else
Matthias Kloseb9621712010-04-24 17:59:49 +00004925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926/* end confdefs.h. */
4927int main() { return 0; }
4928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004929if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004930 ac_enable_profiling="yes"
4931else
Matthias Kloseb9621712010-04-24 17:59:49 +00004932 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004934rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4935 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936fi
4937
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 CC="$ac_save_cc"
4939fi
4940
Matthias Kloseb9621712010-04-24 17:59:49 +00004941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4942$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943
4944case "$ac_enable_profiling" in
4945 "yes")
4946 BASECFLAGS="-pg $BASECFLAGS"
4947 LDFLAGS="-pg $LDFLAGS"
4948 ;;
4949esac
4950
Matthias Kloseb9621712010-04-24 17:59:49 +00004951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4952$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953
4954# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4955# library that we build, but we do not want to link against it (we
4956# will find it with a -framework option). For this reason there is an
4957# extra variable BLDLIBRARY against which Python and the extension
4958# modules are linked, BLDLIBRARY. This is normally the same as
4959# LDLIBRARY, but empty for MacOSX framework builds.
4960if test "$enable_framework"
4961then
4962 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4963 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4964 BLDLIBRARY=''
4965else
4966 BLDLIBRARY='$(LDLIBRARY)'
4967fi
4968
4969# Other platforms follow
4970if test $enable_shared = "yes"; then
4971
Matthias Kloseb9621712010-04-24 17:59:49 +00004972$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973
4974 case $ac_sys_system in
4975 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004976 LDLIBRARY='libpython$(LDVERSION).dll.a'
4977 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 ;;
4979 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004980 LDLIBRARY='libpython$(LDVERSION).so'
4981 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4983 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004984 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004985 then
4986 PY3LIBRARY=libpython3.so
4987 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004988 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02004989 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004990 LDLIBRARY='libpython$(LDVERSION).so'
4991 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4993 case $ac_sys_system in
4994 FreeBSD*)
4995 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4996 ;;
4997 esac
4998 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004999 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005000 then
5001 PY3LIBRARY=libpython3.so
5002 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003 ;;
5004 hp*|HP*)
5005 case `uname -m` in
5006 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005007 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008 ;;
5009 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005010 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011 ;;
5012 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005013 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005014 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5015 ;;
5016 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005017 LDLIBRARY='libpython$(LDVERSION).so'
5018 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5020 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005021 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005022 LDLIBRARY='libpython$(LDVERSION).dylib'
5023 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005024 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5025 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005026 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005027 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005028 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5029 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030
5031 esac
5032else # shared is disabled
5033 case $ac_sys_system in
5034 CYGWIN*)
5035 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005036 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037 ;;
5038 esac
5039fi
5040
Matthias Kloseb9621712010-04-24 17:59:49 +00005041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5042$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043
5044if test -n "$ac_tool_prefix"; then
5045 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5046set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5048$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005049if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051else
5052 if test -n "$RANLIB"; then
5053 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5054else
5055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5056for as_dir in $PATH
5057do
5058 IFS=$as_save_IFS
5059 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064 break 2
5065 fi
5066done
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005068IFS=$as_save_IFS
5069
5070fi
5071fi
5072RANLIB=$ac_cv_prog_RANLIB
5073if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5075$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076else
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5078$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005079fi
5080
5081
5082fi
5083if test -z "$ac_cv_prog_RANLIB"; then
5084 ac_ct_RANLIB=$RANLIB
5085 # Extract the first word of "ranlib", so it can be a program name with args.
5086set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005089if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005091else
5092 if test -n "$ac_ct_RANLIB"; then
5093 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5094else
5095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096for as_dir in $PATH
5097do
5098 IFS=$as_save_IFS
5099 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005102 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005104 break 2
5105 fi
5106done
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005108IFS=$as_save_IFS
5109
5110fi
5111fi
5112ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5113if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5115$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116else
Matthias Kloseb9621712010-04-24 17:59:49 +00005117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119fi
5120
5121 if test "x$ac_ct_RANLIB" = x; then
5122 RANLIB=":"
5123 else
5124 case $cross_compiling:$ac_tool_warned in
5125yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128ac_tool_warned=yes ;;
5129esac
5130 RANLIB=$ac_ct_RANLIB
5131 fi
5132else
5133 RANLIB="$ac_cv_prog_RANLIB"
5134fi
5135
5136
5137for ac_prog in ar aal
5138do
5139 # Extract the first word of "$ac_prog", so it can be a program name with args.
5140set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5142$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005143if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005144 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145else
5146 if test -n "$AR"; then
5147 ac_cv_prog_AR="$AR" # Let the user override the test.
5148else
5149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5150for as_dir in $PATH
5151do
5152 IFS=$as_save_IFS
5153 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005154 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005155 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005156 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158 break 2
5159 fi
5160done
Matthias Kloseb9621712010-04-24 17:59:49 +00005161 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005162IFS=$as_save_IFS
5163
5164fi
5165fi
5166AR=$ac_cv_prog_AR
5167if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5169$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005170else
Matthias Kloseb9621712010-04-24 17:59:49 +00005171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5172$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005173fi
5174
5175
5176 test -n "$AR" && break
5177done
5178test -n "$AR" || AR="ar"
5179
5180
5181# tweak ARFLAGS only if the user didn't set it on the command line
5182
5183if test -z "$ARFLAGS"
5184then
5185 ARFLAGS="rc"
5186fi
5187
5188
5189# Extract the first word of "svnversion", so it can be a program name with args.
5190set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5192$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005193if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005194 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195else
5196 if test -n "$SVNVERSION"; then
5197 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5198else
5199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5200for as_dir in $PATH
5201do
5202 IFS=$as_save_IFS
5203 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005204 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005205 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005206 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005207 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005208 break 2
5209 fi
5210done
Matthias Kloseb9621712010-04-24 17:59:49 +00005211 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005212IFS=$as_save_IFS
5213
5214 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5215fi
5216fi
5217SVNVERSION=$ac_cv_prog_SVNVERSION
5218if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5220$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005221else
Matthias Kloseb9621712010-04-24 17:59:49 +00005222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5223$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005224fi
5225
5226
5227if test $SVNVERSION = found
5228then
5229 SVNVERSION="svnversion \$(srcdir)"
5230else
5231 SVNVERSION="echo Unversioned directory"
5232fi
5233
Trent Nelson9effe692012-10-16 08:41:32 -04005234
Trent Nelson739fc542012-10-17 04:45:30 -04005235if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson9effe692012-10-16 08:41:32 -04005236 # If we're building out-of-tree, we need to make sure the following
5237 # resources get picked up before their $srcdir counterparts.
5238 # Objects/ -> typeslots.inc
5239 # Include/ -> Python-ast.h, graminit.h
5240 # Python/ -> importlib.h
5241 # (A side effect of this is that these resources will automatically be
5242 # regenerated when building out-of-tree, regardless of whether or not
5243 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5244 # off.)
5245 BASECPPFLAGS="-IObjects -IInclude -IPython"
5246else
5247 BASECPPFLAGS=""
5248fi
5249
Georg Brandl1ca2e792011-03-05 20:51:24 +01005250
5251
5252
Georg Brandl187c1112011-07-03 09:23:20 +02005253
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005254if test -e $srcdir/.hg/dirstate
Georg Brandl187c1112011-07-03 09:23:20 +02005255then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005256# Extract the first word of "hg", so it can be a program name with args.
5257set dummy hg; ac_word=$2
5258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5259$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005260if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005261 $as_echo_n "(cached) " >&6
5262else
5263 if test -n "$HAS_HG"; then
5264 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5265else
5266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5267for as_dir in $PATH
5268do
5269 IFS=$as_save_IFS
5270 test -z "$as_dir" && as_dir=.
5271 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005272 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005273 ac_cv_prog_HAS_HG="found"
5274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5275 break 2
5276 fi
5277done
5278 done
5279IFS=$as_save_IFS
5280
5281 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5282fi
5283fi
5284HAS_HG=$ac_cv_prog_HAS_HG
5285if test -n "$HAS_HG"; then
5286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5287$as_echo "$HAS_HG" >&6; }
5288else
5289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5290$as_echo "no" >&6; }
5291fi
5292
5293
Georg Brandl187c1112011-07-03 09:23:20 +02005294else
5295HAS_HG=no-repository
5296fi
Georg Brandl1ca2e792011-03-05 20:51:24 +01005297if test $HAS_HG = found
5298then
5299 HGVERSION="hg id -i \$(srcdir)"
5300 HGTAG="hg id -t \$(srcdir)"
5301 HGBRANCH="hg id -b \$(srcdir)"
5302else
5303 HGVERSION=""
5304 HGTAG=""
5305 HGBRANCH=""
5306fi
5307
Georg Brandl187c1112011-07-03 09:23:20 +02005308
Matthias Klosec4c48422012-10-21 23:05:35 +02005309for ac_prog in python$PACKAGE_VERSION python3 python
5310do
5311 # Extract the first word of "$ac_prog", so it can be a program name with args.
5312set dummy $ac_prog; ac_word=$2
Georg Brandl187c1112011-07-03 09:23:20 +02005313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5314$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005315if ${ac_cv_prog_PYTHON+:} false; then :
Georg Brandl187c1112011-07-03 09:23:20 +02005316 $as_echo_n "(cached) " >&6
5317else
Matthias Klosec4c48422012-10-21 23:05:35 +02005318 if test -n "$PYTHON"; then
5319 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Georg Brandl187c1112011-07-03 09:23:20 +02005320else
5321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5322for as_dir in $PATH
5323do
5324 IFS=$as_save_IFS
5325 test -z "$as_dir" && as_dir=.
5326 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005327 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005328 ac_cv_prog_PYTHON="$ac_prog"
Georg Brandl187c1112011-07-03 09:23:20 +02005329 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5330 break 2
5331 fi
5332done
5333 done
5334IFS=$as_save_IFS
5335
Georg Brandl187c1112011-07-03 09:23:20 +02005336fi
5337fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005338PYTHON=$ac_cv_prog_PYTHON
5339if test -n "$PYTHON"; then
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5341$as_echo "$PYTHON" >&6; }
Georg Brandl187c1112011-07-03 09:23:20 +02005342else
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5344$as_echo "no" >&6; }
5345fi
5346
5347
Matthias Klosec4c48422012-10-21 23:05:35 +02005348 test -n "$PYTHON" && break
5349done
5350test -n "$PYTHON" || PYTHON="not-found"
5351
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005352if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005353 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5354else
5355 ASDLGEN="$PYTHON"
Georg Brandl187c1112011-07-03 09:23:20 +02005356fi
5357
5358
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359case $MACHDEP in
5360bsdos*|hp*|HP*)
5361 # install -d does not work on BSDI or HP-UX
5362 if test -z "$INSTALL"
5363 then
5364 INSTALL="${srcdir}/install-sh -c"
5365 fi
5366esac
5367ac_aux_dir=
5368for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005369 if test -f "$ac_dir/install-sh"; then
5370 ac_aux_dir=$ac_dir
5371 ac_install_sh="$ac_aux_dir/install-sh -c"
5372 break
5373 elif 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/shtool"; then
5378 ac_aux_dir=$ac_dir
5379 ac_install_sh="$ac_aux_dir/shtool install -c"
5380 break
5381 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005382done
5383if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005384 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385fi
5386
5387# These three variables are undocumented and unsupported,
5388# and are intended to be withdrawn in a future Autoconf release.
5389# They can cause serious problems if a builder's source tree is in a directory
5390# whose full name contains unusual characters.
5391ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5392ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5393ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5394
5395
5396# Find a good install program. We prefer a C program (faster),
5397# so one script is as good as another. But avoid the broken or
5398# incompatible versions:
5399# SysV /etc/install, /usr/sbin/install
5400# SunOS /usr/etc/install
5401# IRIX /sbin/install
5402# AIX /bin/install
5403# AmigaOS /C/install, which installs bootblocks on floppy discs
5404# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5405# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5406# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5407# OS/2's system install, which has a completely different semantic
5408# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005409# Reject install programs that cannot install multiple files.
5410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5411$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412if test -z "$INSTALL"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08005413if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005414 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415else
5416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5417for as_dir in $PATH
5418do
5419 IFS=$as_save_IFS
5420 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 # Account for people who put trailing slashes in PATH elements.
5422case $as_dir/ in #((
5423 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426 /usr/ucb/* ) ;;
5427 *)
5428 # OSF1 and SCO ODT 3.0 have their own names for install.
5429 # Don't use installbsd from OSF since it installs stuff as root
5430 # by default.
5431 for ac_prog in ginstall scoinst install; do
5432 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005433 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434 if test $ac_prog = install &&
5435 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5436 # AIX install. It has an incompatible calling convention.
5437 :
5438 elif test $ac_prog = install &&
5439 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5440 # program-specific install script used by HP pwplus--don't use.
5441 :
5442 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 rm -rf conftest.one conftest.two conftest.dir
5444 echo one > conftest.one
5445 echo two > conftest.two
5446 mkdir conftest.dir
5447 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5448 test -s conftest.one && test -s conftest.two &&
5449 test -s conftest.dir/conftest.one &&
5450 test -s conftest.dir/conftest.two
5451 then
5452 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5453 break 3
5454 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455 fi
5456 fi
5457 done
5458 done
5459 ;;
5460esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005461
5462 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005463IFS=$as_save_IFS
5464
Matthias Kloseb9621712010-04-24 17:59:49 +00005465rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005466
5467fi
5468 if test "${ac_cv_path_install+set}" = set; then
5469 INSTALL=$ac_cv_path_install
5470 else
5471 # As a last resort, use the slow shell script. Don't cache a
5472 # value for INSTALL within a source directory, because that will
5473 # break other packages using the cache if that directory is
5474 # removed, or if the value is a relative name.
5475 INSTALL=$ac_install_sh
5476 fi
5477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5479$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480
5481# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5482# It thinks the first close brace ends the variable substitution.
5483test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5484
5485test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5486
5487test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5488
Trent Nelsona45afca2012-08-30 14:32:02 +00005489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5490$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5491if test -z "$MKDIR_P"; then
5492 if ${ac_cv_path_mkdir+:} false; then :
5493 $as_echo_n "(cached) " >&6
5494else
5495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5496for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5497do
5498 IFS=$as_save_IFS
5499 test -z "$as_dir" && as_dir=.
5500 for ac_prog in mkdir gmkdir; do
5501 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005502 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsona45afca2012-08-30 14:32:02 +00005503 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5504 'mkdir (GNU coreutils) '* | \
5505 'mkdir (coreutils) '* | \
5506 'mkdir (fileutils) '4.1*)
5507 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5508 break 3;;
5509 esac
5510 done
5511 done
5512 done
5513IFS=$as_save_IFS
5514
5515fi
5516
5517 test -d ./--version && rmdir ./--version
5518 if test "${ac_cv_path_mkdir+set}" = set; then
5519 MKDIR_P="$ac_cv_path_mkdir -p"
5520 else
5521 # As a last resort, use the slow shell script. Don't cache a
5522 # value for MKDIR_P within a source directory, because that will
5523 # break other packages using the cache if that directory is
5524 # removed, or if the value is a relative name.
5525 MKDIR_P="$ac_install_sh -d"
5526 fi
5527fi
5528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5529$as_echo "$MKDIR_P" >&6; }
5530
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005531
5532# Not every filesystem supports hard links
5533
5534if test -z "$LN" ; then
5535 case $ac_sys_system in
5536 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537 *) LN=ln;;
5538 esac
5539fi
5540
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005541# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005542
5543ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005544
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5547$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548
5549# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005550if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551 withval=$with_pydebug;
5552if test "$withval" != no
5553then
5554
Matthias Kloseb9621712010-04-24 17:59:49 +00005555$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556
Matthias Kloseb9621712010-04-24 17:59:49 +00005557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5558$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005560 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005561else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5562$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563fi
5564else
Matthias Kloseb9621712010-04-24 17:59:49 +00005565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567fi
5568
5569
5570# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5571# merged with this chunk of code?
5572
5573# Optimizer/debugger flags
5574# ------------------------
5575# (The following bit of code is complicated enough - please keep things
5576# indented properly. Just pretend you're editing Python code. ;-)
5577
5578# There are two parallel sets of case statements below, one that checks to
5579# see if OPT was set and one that does BASECFLAGS setting based upon
5580# compiler and platform. BASECFLAGS tweaks need to be made even if the
5581# user set OPT.
5582
5583# tweak OPT based on compiler and platform, only if the user didn't set
5584# it on the command line
5585
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005586if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587then
5588 case $GCC in
5589 yes)
5590 if test "$CC" != 'g++' ; then
5591 STRICT_PROTO="-Wstrict-prototypes"
5592 fi
5593 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5594 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5595 WRAP="-fwrapv"
5596 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005597
5598 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005599 case $CC in
5600 *clang*) WRAP="-fwrapv"
5601 ;;
5602 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005603
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604 case $ac_cv_prog_cc_g in
5605 yes)
5606 if test "$Py_DEBUG" = 'true' ; then
5607 # Optimization messes up debuggers, so turn it off for
5608 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005609 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610 else
5611 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5612 fi
5613 ;;
5614 *)
5615 OPT="-O3 -Wall $STRICT_PROTO"
5616 ;;
5617 esac
5618 case $ac_sys_system in
5619 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5620 ;;
5621 esac
5622 ;;
5623
5624 *)
5625 OPT="-O"
5626 ;;
5627 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628fi
5629
5630
5631
5632# The -arch flags for universal builds on OSX
5633UNIVERSAL_ARCH_FLAGS=
5634
5635
5636# tweak BASECFLAGS based on compiler and platform
5637case $GCC in
5638yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005639 # Python doesn't violate C99 aliasing rules, but older versions of
5640 # GCC produce warnings for legal Python code. Enable
5641 # -fno-strict-aliasing on versions of GCC that support but produce
5642 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5644$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645 ac_save_cc="$CC"
5646 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005647 save_CFLAGS="$CFLAGS"
Gregory P. Smith69140482012-01-16 02:05:55 -08005648 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005649 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005650else
Matthias Kloseb9621712010-04-24 17:59:49 +00005651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005653
Matthias Kloseb159a552010-04-25 21:00:44 +00005654
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005655int
5656main ()
5657{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005658
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005659 ;
5660 return 0;
5661}
Matthias Kloseb159a552010-04-25 21:00:44 +00005662
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005664if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005665
5666 CC="$ac_save_cc -fstrict-aliasing"
5667 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005669/* end confdefs.h. */
5670
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005671 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005672int
5673main ()
5674{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005675double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005676 ;
5677 return 0;
5678}
Matthias Kloseb159a552010-04-25 21:00:44 +00005679
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005681if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005682
5683 ac_cv_no_strict_aliasing=no
5684
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685else
Matthias Kloseb159a552010-04-25 21:00:44 +00005686
5687 ac_cv_no_strict_aliasing=yes
5688
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005689fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005691
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005692else
Matthias Kloseb159a552010-04-25 21:00:44 +00005693
5694 ac_cv_no_strict_aliasing=no
5695
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005698fi
5699
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005700 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5703$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005704 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705 then
5706 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5707 fi
5708
5709 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5710 # support. Without this, treatment of subnormals doesn't follow
5711 # the standard.
5712 case $ac_sys_machine in
5713 alpha*)
5714 BASECFLAGS="$BASECFLAGS -mieee"
5715 ;;
5716 esac
5717
5718 case $ac_sys_system in
5719 SCO_SV*)
5720 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5721 ;;
5722 # is there any other compiler on Darwin besides gcc?
5723 Darwin*)
5724 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5725 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005726 if test "${CC}" = gcc
5727 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5729$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005730 case "${UNIVERSALSDK}" in
5731 */MacOSX10.4u.sdk)
5732 # Build using 10.4 SDK, force usage of gcc when the
5733 # compiler is gcc, otherwise the user will get very
5734 # confusing error messages when building on OSX 10.6
5735 CC=gcc-4.0
5736 CPP=cpp-4.0
5737 ;;
5738 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5740$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005741 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742
5743
5744 if test "${enable_universalsdk}"; then
5745 UNIVERSAL_ARCH_FLAGS=""
5746 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5747 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5748 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005749 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5751 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005752 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005753 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754
5755 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5756 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005757 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005758 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005760 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5761 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005762 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005763 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005764
5765 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5766 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005767 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005768 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005769
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005771 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 +00005772
5773 fi
5774
5775
Ronald Oussoren666028b2010-04-18 19:07:43 +00005776 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5777 if test "${UNIVERSALSDK}" != "/"
5778 then
5779 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5780 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005781 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782 fi
5783 fi
5784
5785 # Calculate the right deployment target for this build.
5786 #
5787 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5788 if test ${cur_target} '>' 10.2; then
5789 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005790 if test ${enable_universalsdk}; then
5791 if test "${UNIVERSAL_ARCHS}" = "all"; then
5792 # Ensure that the default platform for a
5793 # 4-way universal build is OSX 10.5,
5794 # that's the first OS release where
5795 # 4-way builds make sense.
5796 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005797
5798 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5799 cur_target='10.5'
5800
5801 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5802 cur_target='10.5'
5803
5804 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5805 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005806 fi
5807 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005808 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005809 # On Intel macs default to a deployment
5810 # target of 10.4, that's the first OSX
5811 # release with Intel support.
5812 cur_target="10.4"
5813 fi
5814 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815 fi
5816 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5817
5818 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5819 # environment with a value that is the same as what we'll use
5820 # in the Makefile to ensure that we'll get the same compiler
5821 # environment during configure and build time.
5822 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5823 export MACOSX_DEPLOYMENT_TARGET
5824 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5825
5826 ;;
5827 OSF*)
5828 BASECFLAGS="$BASECFLAGS -mieee"
5829 ;;
5830 esac
5831 ;;
5832
5833*)
5834 case $ac_sys_system in
5835 OpenUNIX*|UnixWare*)
5836 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5837 ;;
5838 OSF*)
5839 BASECFLAGS="$BASECFLAGS -ieee -std"
5840 ;;
5841 SCO_SV*)
5842 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5843 ;;
5844 esac
5845 ;;
5846esac
5847
5848if test "$Py_DEBUG" = 'true'; then
5849 :
5850else
5851 OPT="-DNDEBUG $OPT"
5852fi
5853
5854if test "$ac_arch_flags"
5855then
5856 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5857fi
5858
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859# Check whether GCC supports PyArg_ParseTuple format
5860if test "$GCC" = "yes"
5861then
Matthias Kloseb9621712010-04-24 17:59:49 +00005862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5863$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864 save_CFLAGS=$CFLAGS
5865 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867/* end confdefs.h. */
5868
5869 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870int
5871main ()
5872{
5873
5874 ;
5875 return 0;
5876}
Matthias Kloseb159a552010-04-25 21:00:44 +00005877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005879if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880
Matthias Kloseb159a552010-04-25 21:00:44 +00005881
Matthias Kloseb9621712010-04-24 17:59:49 +00005882$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883
Matthias Kloseb159a552010-04-25 21:00:44 +00005884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005885$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005886
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887else
Matthias Kloseb159a552010-04-25 21:00:44 +00005888
5889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005890$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891
5892fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5894 CFLAGS=$save_CFLAGS
5895fi
5896
5897# On some compilers, pthreads are available without further options
5898# (e.g. MacOS X). On some of these systems, the compiler will not
5899# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5900# So we have to see first whether pthreads are available without
5901# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5903$as_echo_n "checking whether pthreads are available without options... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005904if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906else
Matthias Kloseb9621712010-04-24 17:59:49 +00005907 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 ac_cv_pthread_is_default=no
5909else
Matthias Kloseb9621712010-04-24 17:59:49 +00005910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911/* end confdefs.h. */
5912
5913#include <pthread.h>
5914
5915void* routine(void* p){return NULL;}
5916
5917int main(){
5918 pthread_t p;
5919 if(pthread_create(&p,NULL,routine,NULL)!=0)
5920 return 1;
5921 (void)pthread_detach(p);
5922 return 0;
5923}
5924
5925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005926if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
5928 ac_cv_pthread_is_default=yes
5929 ac_cv_kthread=no
5930 ac_cv_pthread=no
5931
5932else
Matthias Kloseb9621712010-04-24 17:59:49 +00005933 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5936 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937fi
5938
5939
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940fi
5941
Matthias Kloseb9621712010-04-24 17:59:49 +00005942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5943$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944
5945
5946if test $ac_cv_pthread_is_default = yes
5947then
5948 ac_cv_kpthread=no
5949else
5950# -Kpthread, if available, provides the right #defines
5951# and linker options to make pthread_create available
5952# Some compilers won't report that they do not support -Kpthread,
5953# so we need to run a program to see whether it really made the
5954# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5956$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005957if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959else
5960 ac_save_cc="$CC"
5961CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005962if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ac_cv_kpthread=no
5964else
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966/* end confdefs.h. */
5967
5968#include <pthread.h>
5969
5970void* routine(void* p){return NULL;}
5971
5972int main(){
5973 pthread_t p;
5974 if(pthread_create(&p,NULL,routine,NULL)!=0)
5975 return 1;
5976 (void)pthread_detach(p);
5977 return 0;
5978}
5979
5980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005981if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982 ac_cv_kpthread=yes
5983else
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5987 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988fi
5989
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990CC="$ac_save_cc"
5991fi
5992
Matthias Kloseb9621712010-04-24 17:59:49 +00005993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5994$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995fi
5996
5997if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5998then
5999# -Kthread, if available, provides the right #defines
6000# and linker options to make pthread_create available
6001# Some compilers won't report that they do not support -Kthread,
6002# so we need to run a program to see whether it really made the
6003# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6005$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006006if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008else
6009 ac_save_cc="$CC"
6010CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006011if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012 ac_cv_kthread=no
6013else
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015/* end confdefs.h. */
6016
6017#include <pthread.h>
6018
6019void* routine(void* p){return NULL;}
6020
6021int main(){
6022 pthread_t p;
6023 if(pthread_create(&p,NULL,routine,NULL)!=0)
6024 return 1;
6025 (void)pthread_detach(p);
6026 return 0;
6027}
6028
6029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006030if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031 ac_cv_kthread=yes
6032else
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6036 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037fi
6038
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039CC="$ac_save_cc"
6040fi
6041
Matthias Kloseb9621712010-04-24 17:59:49 +00006042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6043$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044fi
6045
6046if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6047then
6048# -pthread, if available, provides the right #defines
6049# and linker options to make pthread_create available
6050# Some compilers won't report that they do not support -pthread,
6051# so we need to run a program to see whether it really made the
6052# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6054$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006055if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006056 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057else
6058 ac_save_cc="$CC"
6059CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006060if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061 ac_cv_pthread=no
6062else
Matthias Kloseb9621712010-04-24 17:59:49 +00006063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006064/* end confdefs.h. */
6065
6066#include <pthread.h>
6067
6068void* routine(void* p){return NULL;}
6069
6070int main(){
6071 pthread_t p;
6072 if(pthread_create(&p,NULL,routine,NULL)!=0)
6073 return 1;
6074 (void)pthread_detach(p);
6075 return 0;
6076}
6077
6078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006079if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080 ac_cv_pthread=yes
6081else
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6085 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086fi
6087
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088CC="$ac_save_cc"
6089fi
6090
Matthias Kloseb9621712010-04-24 17:59:49 +00006091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6092$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093fi
6094
6095# If we have set a CC compiler flag for thread support then
6096# check if it works for CXX, too.
6097ac_cv_cxx_thread=no
6098if test ! -z "$CXX"
6099then
Matthias Kloseb9621712010-04-24 17:59:49 +00006100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6101$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102ac_save_cxx="$CXX"
6103
6104if test "$ac_cv_kpthread" = "yes"
6105then
6106 CXX="$CXX -Kpthread"
6107 ac_cv_cxx_thread=yes
6108elif test "$ac_cv_kthread" = "yes"
6109then
6110 CXX="$CXX -Kthread"
6111 ac_cv_cxx_thread=yes
6112elif test "$ac_cv_pthread" = "yes"
6113then
6114 CXX="$CXX -pthread"
6115 ac_cv_cxx_thread=yes
6116fi
6117
6118if test $ac_cv_cxx_thread = yes
6119then
6120 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6121 $CXX -c conftest.$ac_ext 2>&5
6122 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6123 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6124 then
6125 ac_cv_cxx_thread=yes
6126 else
6127 ac_cv_cxx_thread=no
6128 fi
6129 rm -fr conftest*
6130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6132$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133fi
6134CXX="$ac_save_cxx"
6135
6136
6137# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6139$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006140if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006141 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142else
Matthias Kloseb9621712010-04-24 17:59:49 +00006143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144/* end confdefs.h. */
6145#include <stdlib.h>
6146#include <stdarg.h>
6147#include <string.h>
6148#include <float.h>
6149
6150int
6151main ()
6152{
6153
6154 ;
6155 return 0;
6156}
6157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006158if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159 ac_cv_header_stdc=yes
6160else
Matthias Kloseb9621712010-04-24 17:59:49 +00006161 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6164
6165if test $ac_cv_header_stdc = yes; then
6166 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168/* end confdefs.h. */
6169#include <string.h>
6170
6171_ACEOF
6172if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006173 $EGREP "memchr" >/dev/null 2>&1; then :
6174
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175else
6176 ac_cv_header_stdc=no
6177fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006178rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179
6180fi
6181
6182if test $ac_cv_header_stdc = yes; then
6183 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006185/* end confdefs.h. */
6186#include <stdlib.h>
6187
6188_ACEOF
6189if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 $EGREP "free" >/dev/null 2>&1; then :
6191
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192else
6193 ac_cv_header_stdc=no
6194fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006195rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196
6197fi
6198
6199if test $ac_cv_header_stdc = yes; then
6200 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202 :
6203else
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006205/* end confdefs.h. */
6206#include <ctype.h>
6207#include <stdlib.h>
6208#if ((' ' & 0x0FF) == 0x020)
6209# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6210# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6211#else
6212# define ISLOWER(c) \
6213 (('a' <= (c) && (c) <= 'i') \
6214 || ('j' <= (c) && (c) <= 'r') \
6215 || ('s' <= (c) && (c) <= 'z'))
6216# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6217#endif
6218
6219#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6220int
6221main ()
6222{
6223 int i;
6224 for (i = 0; i < 256; i++)
6225 if (XOR (islower (i), ISLOWER (i))
6226 || toupper (i) != TOUPPER (i))
6227 return 2;
6228 return 0;
6229}
6230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006231if ac_fn_c_try_run "$LINENO"; then :
6232
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233else
Matthias Kloseb9621712010-04-24 17:59:49 +00006234 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6237 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238fi
6239
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240fi
6241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6243$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244if test $ac_cv_header_stdc = yes; then
6245
Matthias Kloseb9621712010-04-24 17:59:49 +00006246$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006247
6248fi
6249
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006250for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6251fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006252ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006253shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006254unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006255sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6256sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006257sys/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 -08006258sys/syscall.h sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006259sys/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 +00006260sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006261bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006262do :
6263 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6264ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006265if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006266 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006267#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006268_ACEOF
6269
6270fi
6271
Guido van Rossum627b2d71993-12-24 10:39:16 +00006272done
6273
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006274ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006275for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006276 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6278$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006279if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006280 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006281else
Matthias Kloseb9621712010-04-24 17:59:49 +00006282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006283/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006284#include <sys/types.h>
6285#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006286
Martin v. Löwis11437992002-04-12 09:54:03 +00006287int
6288main ()
6289{
6290if ((DIR *) 0)
6291return 0;
6292 ;
6293 return 0;
6294}
6295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006297 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006298else
Matthias Kloseb9621712010-04-24 17:59:49 +00006299 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006302fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006303eval ac_res=\$$as_ac_Header
6304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6305$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006306if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006307 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006308#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006309_ACEOF
6310
6311ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006312fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006313
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006314done
6315# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6316if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6318$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006319if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006320 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006321else
Martin v. Löwis11437992002-04-12 09:54:03 +00006322 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006326/* Override any GCC internal prototype to avoid an error.
6327 Use char because int might match the return type of a GCC
6328 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006329#ifdef __cplusplus
6330extern "C"
6331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006332char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006333int
6334main ()
6335{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006336return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006337 ;
6338 return 0;
6339}
6340_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006341for ac_lib in '' dir; do
6342 if test -z "$ac_lib"; then
6343 ac_res="none required"
6344 else
6345 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006346 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006347 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006348 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006349 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006350fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006351rm -f core conftest.err conftest.$ac_objext \
6352 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006353 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006354 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006356done
Gregory P. Smith69140482012-01-16 02:05:55 -08006357if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006359else
6360 ac_cv_search_opendir=no
6361fi
6362rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006363LIBS=$ac_func_search_save_LIBS
6364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6366$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006367ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006368if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006369 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006370
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006371fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006372
Michael W. Hudson54241132001-12-07 15:38:26 +00006373else
Matthias Kloseb9621712010-04-24 17:59:49 +00006374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6375$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006376if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006377 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006378else
6379 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006382
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006383/* Override any GCC internal prototype to avoid an error.
6384 Use char because int might match the return type of a GCC
6385 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006386#ifdef __cplusplus
6387extern "C"
6388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006389char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006390int
6391main ()
6392{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006393return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006394 ;
6395 return 0;
6396}
6397_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006398for ac_lib in '' x; do
6399 if test -z "$ac_lib"; then
6400 ac_res="none required"
6401 else
6402 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006403 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006404 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006405 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006406 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006408rm -f core conftest.err conftest.$ac_objext \
6409 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006410 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006411 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006413done
Gregory P. Smith69140482012-01-16 02:05:55 -08006414if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006416else
6417 ac_cv_search_opendir=no
6418fi
6419rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006420LIBS=$ac_func_search_save_LIBS
6421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6423$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006424ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006425if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006426 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006427
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006428fi
6429
6430fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006431
Matthias Kloseb9621712010-04-24 17:59:49 +00006432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6433$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006434if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006435 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006436else
Matthias Kloseb9621712010-04-24 17:59:49 +00006437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006438/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006439#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006440int
6441main ()
6442{
6443return makedev(0, 0);
6444 ;
6445 return 0;
6446}
6447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006448if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006449 ac_cv_header_sys_types_h_makedev=yes
6450else
Matthias Kloseb9621712010-04-24 17:59:49 +00006451 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006453rm -f core conftest.err conftest.$ac_objext \
6454 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006455
6456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6458$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006459
6460if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006461ac_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 -08006462if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006463
Matthias Kloseb9621712010-04-24 17:59:49 +00006464$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006465
6466fi
6467
6468
6469
6470 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006471 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 -08006472if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006473
Matthias Kloseb9621712010-04-24 17:59:49 +00006474$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006475
6476fi
6477
6478
6479 fi
6480fi
6481
Michael W. Hudson54241132001-12-07 15:38:26 +00006482
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006483# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006484for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006485do :
6486 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006487#ifdef HAVE_CURSES_H
6488#include <curses.h>
6489#endif
6490
Matthias Kloseb9621712010-04-24 17:59:49 +00006491"
Gregory P. Smith69140482012-01-16 02:05:55 -08006492if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006493 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006494#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006495_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006496
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006497fi
6498
6499done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006500
6501
Martin v. Löwis11017b12006-01-14 18:12:57 +00006502# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006503for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006504do :
6505 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 +00006506#ifdef HAVE_ASM_TYPES_H
6507#include <asm/types.h>
6508#endif
6509#ifdef HAVE_SYS_SOCKET_H
6510#include <sys/socket.h>
6511#endif
6512
Matthias Kloseb9621712010-04-24 17:59:49 +00006513"
Gregory P. Smith69140482012-01-16 02:05:55 -08006514if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006515 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006516#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006517_ACEOF
6518
6519fi
6520
6521done
6522
6523
Guido van Rossum627b2d71993-12-24 10:39:16 +00006524# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006525was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6527$as_echo_n "checking for clock_t in time.h... " >&6; }
6528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006529/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006530#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006531
6532_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006534 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006535 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006536else
Martin v. Löwis11437992002-04-12 09:54:03 +00006537
6538
Matthias Kloseb9621712010-04-24 17:59:49 +00006539$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006540
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006541
Guido van Rossum627b2d71993-12-24 10:39:16 +00006542fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006543rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006544
Matthias Kloseb9621712010-04-24 17:59:49 +00006545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6546$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006547
Neal Norwitz11690112002-07-30 01:08:28 +00006548# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6550$as_echo_n "checking for makedev... " >&6; }
6551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006552/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006553
Jesus Cea740f53a2010-04-28 11:35:30 +00006554#if defined(MAJOR_IN_MKDEV)
6555#include <sys/mkdev.h>
6556#elif defined(MAJOR_IN_SYSMACROS)
6557#include <sys/sysmacros.h>
6558#else
6559#include <sys/types.h>
6560#endif
6561
Neal Norwitz11690112002-07-30 01:08:28 +00006562int
6563main ()
6564{
Jesus Cea740f53a2010-04-28 11:35:30 +00006565
6566 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006567 ;
6568 return 0;
6569}
Matthias Kloseb159a552010-04-25 21:00:44 +00006570
Neal Norwitz11690112002-07-30 01:08:28 +00006571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006572if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006573 ac_cv_has_makedev=yes
6574else
Matthias Kloseb9621712010-04-24 17:59:49 +00006575 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006577rm -f core conftest.err conftest.$ac_objext \
6578 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006579if test "$ac_cv_has_makedev" = "no"; then
6580 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006582/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006583
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006584#define _OSF_SOURCE 1
6585#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006586
Neal Norwitz11690112002-07-30 01:08:28 +00006587int
6588main ()
6589{
6590 makedev(0, 0)
6591 ;
6592 return 0;
6593}
6594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006595if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006596 ac_cv_has_makedev=yes
6597else
Matthias Kloseb9621712010-04-24 17:59:49 +00006598 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006600rm -f core conftest.err conftest.$ac_objext \
6601 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006602 if test "$ac_cv_has_makedev" = "yes"; then
6603
Matthias Kloseb9621712010-04-24 17:59:49 +00006604$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006605
6606 fi
6607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6609$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006610if test "$ac_cv_has_makedev" = "yes"; then
6611
Matthias Kloseb9621712010-04-24 17:59:49 +00006612$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006613
6614fi
6615
Martin v. Löwis399a6892002-10-04 10:22:02 +00006616# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6617# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6618# defined, but the compiler does not support pragma redefine_extname,
6619# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6620# structures (such as rlimit64) without declaring them. As a
6621# work-around, disable LFS on such configurations
6622
6623use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6625$as_echo_n "checking Solaris LFS bug... " >&6; }
6626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006627/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006628
6629#define _LARGEFILE_SOURCE 1
6630#define _FILE_OFFSET_BITS 64
6631#include <sys/resource.h>
6632
Martin v. Löwis399a6892002-10-04 10:22:02 +00006633int
6634main ()
6635{
6636struct rlimit foo;
6637 ;
6638 return 0;
6639}
6640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006641if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006642 sol_lfs_bug=no
6643else
Matthias Kloseb9621712010-04-24 17:59:49 +00006644 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6648$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006649if test "$sol_lfs_bug" = "yes"; then
6650 use_lfs=no
6651fi
6652
6653if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006654# Two defines needed to enable largefile support on various platforms
6655# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006656case $ac_sys_system/$ac_sys_release in
6657AIX*)
6658
6659$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6660
6661 ;;
6662esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006663
Matthias Kloseb9621712010-04-24 17:59:49 +00006664$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006665
6666
Matthias Kloseb9621712010-04-24 17:59:49 +00006667$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006668
Martin v. Löwis399a6892002-10-04 10:22:02 +00006669fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006670
Guido van Rossum84e7b241996-08-19 21:59:00 +00006671# Add some code to confdefs.h so that the test for off_t works on SCO
6672cat >> confdefs.h <<\EOF
6673#if defined(SCO_DS)
6674#undef _OFF_T
6675#endif
6676EOF
6677
Guido van Rossumef2255b2000-03-10 22:30:29 +00006678# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006679ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006680if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006681
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006682else
Martin v. Löwis11437992002-04-12 09:54:03 +00006683
6684cat >>confdefs.h <<_ACEOF
6685#define mode_t int
6686_ACEOF
6687
6688fi
6689
Matthias Kloseb9621712010-04-24 17:59:49 +00006690ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006691if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006692
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006693else
Martin v. Löwis11437992002-04-12 09:54:03 +00006694
6695cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006696#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006697_ACEOF
6698
6699fi
6700
Matthias Kloseb9621712010-04-24 17:59:49 +00006701ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006702if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006703
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006704else
Martin v. Löwis11437992002-04-12 09:54:03 +00006705
6706cat >>confdefs.h <<_ACEOF
6707#define pid_t int
6708_ACEOF
6709
6710fi
6711
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006712
Martin v. Löwis11437992002-04-12 09:54:03 +00006713cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006714#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006715_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006716
Matthias Kloseb9621712010-04-24 17:59:49 +00006717ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006718if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006719
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006720else
Martin v. Löwis11437992002-04-12 09:54:03 +00006721
6722cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006723#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006724_ACEOF
6725
6726fi
6727
Matthias Kloseb9621712010-04-24 17:59:49 +00006728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6729$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006730if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006731 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006732else
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006734/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006735#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006736
6737_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006738if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006739 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006740 ac_cv_type_uid_t=yes
6741else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006742 ac_cv_type_uid_t=no
6743fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006744rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006745
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6748$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006749if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006750
Matthias Kloseb9621712010-04-24 17:59:49 +00006751$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006752
6753
Matthias Kloseb9621712010-04-24 17:59:49 +00006754$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006755
6756fi
6757
Mark Dickinsonce31f662012-12-02 13:20:22 +00006758
6759# There are two separate checks for each of the exact-width integer types we
6760# need. First we check whether the type is available using the usual
6761# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
6762# and <stdint.h> where available). We then also use the special type checks of
6763# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
6764# directly, #define's uint32_t to be a suitable type.
6765
6766ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
6767if test "x$ac_cv_type_uint32_t" = xyes; then :
6768
6769$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
6770
6771fi
6772
Matthias Kloseb9621712010-04-24 17:59:49 +00006773ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6774case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006775 no|yes) ;; #(
6776 *)
6777
Matthias Kloseb9621712010-04-24 17:59:49 +00006778$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006779
6780
6781cat >>confdefs.h <<_ACEOF
6782#define uint32_t $ac_cv_c_uint32_t
6783_ACEOF
6784;;
6785 esac
6786
Mark Dickinsonce31f662012-12-02 13:20:22 +00006787
6788ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
6789if test "x$ac_cv_type_uint64_t" = xyes; then :
6790
6791$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
6792
6793fi
6794
Matthias Kloseb9621712010-04-24 17:59:49 +00006795ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6796case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006797 no|yes) ;; #(
6798 *)
6799
Matthias Kloseb9621712010-04-24 17:59:49 +00006800$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006801
6802
6803cat >>confdefs.h <<_ACEOF
6804#define uint64_t $ac_cv_c_uint64_t
6805_ACEOF
6806;;
6807 esac
6808
Mark Dickinsonce31f662012-12-02 13:20:22 +00006809
6810ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
6811if test "x$ac_cv_type_int32_t" = xyes; then :
6812
6813$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
6814
6815fi
6816
Matthias Kloseb9621712010-04-24 17:59:49 +00006817ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6818case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006819 no|yes) ;; #(
6820 *)
6821
6822cat >>confdefs.h <<_ACEOF
6823#define int32_t $ac_cv_c_int32_t
6824_ACEOF
6825;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006826esac
6827
Mark Dickinsonce31f662012-12-02 13:20:22 +00006828
6829ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
6830if test "x$ac_cv_type_int64_t" = xyes; then :
6831
6832$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
6833
6834fi
6835
Matthias Kloseb9621712010-04-24 17:59:49 +00006836ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6837case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006838 no|yes) ;; #(
6839 *)
6840
6841cat >>confdefs.h <<_ACEOF
6842#define int64_t $ac_cv_c_int64_t
6843_ACEOF
6844;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006845esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006846
Mark Dickinsonce31f662012-12-02 13:20:22 +00006847
Matthias Kloseb9621712010-04-24 17:59:49 +00006848ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006849if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006850
Matthias Kloseb9621712010-04-24 17:59:49 +00006851$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006852
6853fi
6854
Jack Jansendd19cf82001-12-06 22:36:17 +00006855
Michael W. Hudson54241132001-12-07 15:38:26 +00006856# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006857# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006858# The cast to long int works around a bug in the HP C Compiler
6859# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6860# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6861# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6863$as_echo_n "checking size of int... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006864if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006865 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006866else
Matthias Kloseb9621712010-04-24 17:59:49 +00006867 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 +00006868
Martin v. Löwis11437992002-04-12 09:54:03 +00006869else
Matthias Kloseb9621712010-04-24 17:59:49 +00006870 if test "$ac_cv_type_int" = yes; then
6871 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006873as_fn_error 77 "cannot compute sizeof (int)
Gregory P. Smith69140482012-01-16 02:05:55 -08006874See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006875 else
6876 ac_cv_sizeof_int=0
6877 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006879
Martin v. Löwis11437992002-04-12 09:54:03 +00006880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6882$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006883
6884
6885
Martin v. Löwis11437992002-04-12 09:54:03 +00006886cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006887#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006888_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006889
6890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006891# The cast to long int works around a bug in the HP C Compiler
6892# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6893# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6894# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6896$as_echo_n "checking size of long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006897if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006898 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006899else
Matthias Kloseb9621712010-04-24 17:59:49 +00006900 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 +00006901
Martin v. Löwis11437992002-04-12 09:54:03 +00006902else
Matthias Kloseb9621712010-04-24 17:59:49 +00006903 if test "$ac_cv_type_long" = yes; then
6904 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006906as_fn_error 77 "cannot compute sizeof (long)
Gregory P. Smith69140482012-01-16 02:05:55 -08006907See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006908 else
6909 ac_cv_sizeof_long=0
6910 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006912
Martin v. Löwis11437992002-04-12 09:54:03 +00006913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6915$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006916
6917
6918
Martin v. Löwis11437992002-04-12 09:54:03 +00006919cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006920#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006921_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006922
6923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006924# The cast to long int works around a bug in the HP C Compiler
6925# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6926# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6927# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6929$as_echo_n "checking size of void *... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006930if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006932else
Matthias Kloseb9621712010-04-24 17:59:49 +00006933 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 +00006934
Martin v. Löwis11437992002-04-12 09:54:03 +00006935else
Matthias Kloseb9621712010-04-24 17:59:49 +00006936 if test "$ac_cv_type_void_p" = yes; then
6937 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6938$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006939as_fn_error 77 "cannot compute sizeof (void *)
Gregory P. Smith69140482012-01-16 02:05:55 -08006940See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006941 else
6942 ac_cv_sizeof_void_p=0
6943 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006945
Martin v. Löwis11437992002-04-12 09:54:03 +00006946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6948$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006949
6950
6951
Martin v. Löwis11437992002-04-12 09:54:03 +00006952cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006953#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006954_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006955
6956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006957# The cast to long int works around a bug in the HP C Compiler
6958# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6959# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6960# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6962$as_echo_n "checking size of short... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006963if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006965else
Matthias Kloseb9621712010-04-24 17:59:49 +00006966 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 +00006967
Martin v. Löwis11437992002-04-12 09:54:03 +00006968else
Matthias Kloseb9621712010-04-24 17:59:49 +00006969 if test "$ac_cv_type_short" = yes; then
6970 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006972as_fn_error 77 "cannot compute sizeof (short)
Gregory P. Smith69140482012-01-16 02:05:55 -08006973See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006974 else
6975 ac_cv_sizeof_short=0
6976 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006978
Martin v. Löwis11437992002-04-12 09:54:03 +00006979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6981$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006982
6983
6984
Martin v. Löwis11437992002-04-12 09:54:03 +00006985cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006986#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006987_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006988
6989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006990# The cast to long int works around a bug in the HP C Compiler
6991# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6992# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6993# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6995$as_echo_n "checking size of float... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006996if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006997 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006998else
Matthias Kloseb9621712010-04-24 17:59:49 +00006999 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 +00007000
Martin v. Löwis11437992002-04-12 09:54:03 +00007001else
Matthias Kloseb9621712010-04-24 17:59:49 +00007002 if test "$ac_cv_type_float" = yes; then
7003 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007005as_fn_error 77 "cannot compute sizeof (float)
Gregory P. Smith69140482012-01-16 02:05:55 -08007006See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007007 else
7008 ac_cv_sizeof_float=0
7009 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007011
Martin v. Löwis11437992002-04-12 09:54:03 +00007012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7014$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015
7016
7017
Martin v. Löwis11437992002-04-12 09:54:03 +00007018cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007019#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007020_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007021
7022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007023# The cast to long int works around a bug in the HP C Compiler
7024# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7025# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7026# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7028$as_echo_n "checking size of double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007029if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007030 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007031else
Matthias Kloseb9621712010-04-24 17:59:49 +00007032 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 +00007033
Martin v. Löwis11437992002-04-12 09:54:03 +00007034else
Matthias Kloseb9621712010-04-24 17:59:49 +00007035 if test "$ac_cv_type_double" = yes; then
7036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007038as_fn_error 77 "cannot compute sizeof (double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007039See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040 else
7041 ac_cv_sizeof_double=0
7042 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007044
Martin v. Löwis11437992002-04-12 09:54:03 +00007045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7047$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007048
7049
7050
Martin v. Löwis11437992002-04-12 09:54:03 +00007051cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007052#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007053_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007054
7055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007056# The cast to long int works around a bug in the HP C Compiler
7057# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7058# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7059# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7061$as_echo_n "checking size of fpos_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007062if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007063 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007064else
Matthias Kloseb9621712010-04-24 17:59:49 +00007065 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 +00007066
Martin v. Löwis11437992002-04-12 09:54:03 +00007067else
Matthias Kloseb9621712010-04-24 17:59:49 +00007068 if test "$ac_cv_type_fpos_t" = yes; then
7069 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007071as_fn_error 77 "cannot compute sizeof (fpos_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007072See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007073 else
7074 ac_cv_sizeof_fpos_t=0
7075 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007076fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007077
Martin v. Löwis11437992002-04-12 09:54:03 +00007078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7080$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007081
7082
7083
Martin v. Löwis11437992002-04-12 09:54:03 +00007084cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007085#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007086_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007087
Michael W. Hudson54241132001-12-07 15:38:26 +00007088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007089# The cast to long int works around a bug in the HP C Compiler
7090# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7091# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7092# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7094$as_echo_n "checking size of size_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007095if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007096 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007097else
Matthias Kloseb9621712010-04-24 17:59:49 +00007098 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 +00007099
Martin v. Löwis18e16552006-02-15 17:27:45 +00007100else
Matthias Kloseb9621712010-04-24 17:59:49 +00007101 if test "$ac_cv_type_size_t" = yes; then
7102 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7103$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007104as_fn_error 77 "cannot compute sizeof (size_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007105See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007106 else
7107 ac_cv_sizeof_size_t=0
7108 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007110
Martin v. Löwis18e16552006-02-15 17:27:45 +00007111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7113$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007114
7115
7116
Martin v. Löwis18e16552006-02-15 17:27:45 +00007117cat >>confdefs.h <<_ACEOF
7118#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7119_ACEOF
7120
7121
Christian Heimes400adb02008-02-01 08:12:03 +00007122# The cast to long int works around a bug in the HP C Compiler
7123# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7124# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7125# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7127$as_echo_n "checking size of pid_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007128if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007129 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007130else
Matthias Kloseb9621712010-04-24 17:59:49 +00007131 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 +00007132
Christian Heimes400adb02008-02-01 08:12:03 +00007133else
Matthias Kloseb9621712010-04-24 17:59:49 +00007134 if test "$ac_cv_type_pid_t" = yes; then
7135 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007137as_fn_error 77 "cannot compute sizeof (pid_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007138See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007139 else
7140 ac_cv_sizeof_pid_t=0
7141 fi
7142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007143
Christian Heimes400adb02008-02-01 08:12:03 +00007144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7146$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007147
7148
7149
7150cat >>confdefs.h <<_ACEOF
7151#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7152_ACEOF
7153
7154
Michael W. Hudson54241132001-12-07 15:38:26 +00007155
Matthias Kloseb9621712010-04-24 17:59:49 +00007156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7157$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007158have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007160/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007161
Martin v. Löwis11437992002-04-12 09:54:03 +00007162int
7163main ()
7164{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007165long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007166 ;
7167 return 0;
7168}
7169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007170if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007171
7172
Matthias Kloseb9621712010-04-24 17:59:49 +00007173$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007174
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007175 have_long_long=yes
7176
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7180$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007181if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007182# The cast to long int works around a bug in the HP C Compiler
7183# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7184# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7185# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7187$as_echo_n "checking size of long long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007188if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007189 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007190else
Matthias Kloseb9621712010-04-24 17:59:49 +00007191 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 +00007192
Martin v. Löwis11437992002-04-12 09:54:03 +00007193else
Matthias Kloseb9621712010-04-24 17:59:49 +00007194 if test "$ac_cv_type_long_long" = yes; then
7195 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7196$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007197as_fn_error 77 "cannot compute sizeof (long long)
Gregory P. Smith69140482012-01-16 02:05:55 -08007198See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007199 else
7200 ac_cv_sizeof_long_long=0
7201 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007203
Martin v. Löwis11437992002-04-12 09:54:03 +00007204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7206$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007207
7208
7209
Martin v. Löwis11437992002-04-12 09:54:03 +00007210cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007211#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007212_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007213
Michael W. Hudson54241132001-12-07 15:38:26 +00007214
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007215fi
7216
Matthias Kloseb9621712010-04-24 17:59:49 +00007217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7218$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007219have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007221/* end confdefs.h. */
7222
7223int
7224main ()
7225{
7226long double x; x = (long double)0;
7227 ;
7228 return 0;
7229}
7230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007231if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007232
7233
Matthias Kloseb9621712010-04-24 17:59:49 +00007234$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007235
7236 have_long_double=yes
7237
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007238fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7241$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007242if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007243# The cast to long int works around a bug in the HP C Compiler
7244# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7245# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7246# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7248$as_echo_n "checking size of long double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007249if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007251else
Matthias Kloseb9621712010-04-24 17:59:49 +00007252 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 +00007253
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007254else
Matthias Kloseb9621712010-04-24 17:59:49 +00007255 if test "$ac_cv_type_long_double" = yes; then
7256 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007258as_fn_error 77 "cannot compute sizeof (long double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007259See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007260 else
7261 ac_cv_sizeof_long_double=0
7262 fi
7263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007264
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7267$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007268
7269
7270
7271cat >>confdefs.h <<_ACEOF
7272#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7273_ACEOF
7274
7275
7276fi
7277
7278
Matthias Kloseb9621712010-04-24 17:59:49 +00007279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7280$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007281have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007283/* end confdefs.h. */
7284
7285int
7286main ()
7287{
7288_Bool x; x = (_Bool)0;
7289 ;
7290 return 0;
7291}
7292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007293if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007294
7295
Matthias Kloseb9621712010-04-24 17:59:49 +00007296$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007297
7298 have_c99_bool=yes
7299
Thomas Woutersb2137042007-02-01 18:02:27 +00007300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7303$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007304if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007305# The cast to long int works around a bug in the HP C Compiler
7306# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7307# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7308# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7310$as_echo_n "checking size of _Bool... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007311if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007312 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007313else
Matthias Kloseb9621712010-04-24 17:59:49 +00007314 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 +00007315
Thomas Woutersb2137042007-02-01 18:02:27 +00007316else
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 if test "$ac_cv_type__Bool" = yes; then
7318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007320as_fn_error 77 "cannot compute sizeof (_Bool)
Gregory P. Smith69140482012-01-16 02:05:55 -08007321See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007322 else
7323 ac_cv_sizeof__Bool=0
7324 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007326
Thomas Woutersb2137042007-02-01 18:02:27 +00007327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7329$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007330
7331
7332
Thomas Woutersb2137042007-02-01 18:02:27 +00007333cat >>confdefs.h <<_ACEOF
7334#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7335_ACEOF
7336
7337
7338fi
7339
Matthias Kloseb9621712010-04-24 17:59:49 +00007340ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007341 #include <stdint.h>
7342 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007343 #ifdef HAVE_INTTYPES_H
7344 #include <inttypes.h>
7345 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007346"
Gregory P. Smith69140482012-01-16 02:05:55 -08007347if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007348
7349cat >>confdefs.h <<_ACEOF
7350#define HAVE_UINTPTR_T 1
7351_ACEOF
7352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007353# The cast to long int works around a bug in the HP C Compiler
7354# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7355# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7356# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7358$as_echo_n "checking size of uintptr_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007359if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007360 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007361else
Matthias Kloseb9621712010-04-24 17:59:49 +00007362 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 +00007363
Martin v. Löwis11437992002-04-12 09:54:03 +00007364else
Matthias Kloseb9621712010-04-24 17:59:49 +00007365 if test "$ac_cv_type_uintptr_t" = yes; then
7366 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7367$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007368as_fn_error 77 "cannot compute sizeof (uintptr_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007369See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007370 else
7371 ac_cv_sizeof_uintptr_t=0
7372 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007374
Martin v. Löwis11437992002-04-12 09:54:03 +00007375fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7377$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007378
7379
7380
Martin v. Löwis11437992002-04-12 09:54:03 +00007381cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007382#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007383_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007384
Michael W. Hudson54241132001-12-07 15:38:26 +00007385
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007386fi
7387
Thomas Wouters89f507f2006-12-13 04:49:30 +00007388
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007389# The cast to long int works around a bug in the HP C Compiler
7390# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7391# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7392# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7394$as_echo_n "checking size of off_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007395if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007397else
Matthias Kloseb9621712010-04-24 17:59:49 +00007398 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007399#ifdef HAVE_SYS_TYPES_H
7400#include <sys/types.h>
7401#endif
7402
Matthias Kloseb9621712010-04-24 17:59:49 +00007403"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007404
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007405else
Matthias Kloseb9621712010-04-24 17:59:49 +00007406 if test "$ac_cv_type_off_t" = yes; then
7407 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007409as_fn_error 77 "cannot compute sizeof (off_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007410See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007411 else
7412 ac_cv_sizeof_off_t=0
7413 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007415
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7418$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007419
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007420
7421
Martin v. Löwis11437992002-04-12 09:54:03 +00007422cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007423#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007424_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007425
Michael W. Hudson54241132001-12-07 15:38:26 +00007426
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007427
Matthias Kloseb9621712010-04-24 17:59:49 +00007428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7429$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007430if test "$have_long_long" = yes
7431then
7432if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007433 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007434
Matthias Kloseb9621712010-04-24 17:59:49 +00007435$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007436
Matthias Kloseb9621712010-04-24 17:59:49 +00007437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7438$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007439else
Matthias Kloseb9621712010-04-24 17:59:49 +00007440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7441$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007442fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007443else
Matthias Kloseb9621712010-04-24 17:59:49 +00007444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7445$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007446fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007447
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007448# The cast to long int works around a bug in the HP C Compiler
7449# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7450# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7451# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7453$as_echo_n "checking size of time_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007454if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007455 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007456else
Matthias Kloseb9621712010-04-24 17:59:49 +00007457 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007458#ifdef HAVE_SYS_TYPES_H
7459#include <sys/types.h>
7460#endif
7461#ifdef HAVE_TIME_H
7462#include <time.h>
7463#endif
7464
Matthias Kloseb9621712010-04-24 17:59:49 +00007465"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007466
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007467else
Matthias Kloseb9621712010-04-24 17:59:49 +00007468 if test "$ac_cv_type_time_t" = yes; then
7469 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7470$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007471as_fn_error 77 "cannot compute sizeof (time_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007472See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007473 else
7474 ac_cv_sizeof_time_t=0
7475 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007477
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7480$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007481
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007482
7483
Martin v. Löwis11437992002-04-12 09:54:03 +00007484cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007485#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007486_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007487
Michael W. Hudson54241132001-12-07 15:38:26 +00007488
7489
Trent Mick635f6fb2000-08-23 21:33:05 +00007490# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007491ac_save_cc="$CC"
7492if test "$ac_cv_kpthread" = "yes"
7493then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007494elif test "$ac_cv_kthread" = "yes"
7495then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007496elif test "$ac_cv_pthread" = "yes"
7497then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007498fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007499
Matthias Kloseb9621712010-04-24 17:59:49 +00007500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7501$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007502have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007504/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007505
7506 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007507int
7508main ()
7509{
Guido van Rossum12580492000-09-24 16:47:19 +00007510pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007511 ;
7512 return 0;
7513}
Matthias Kloseb159a552010-04-25 21:00:44 +00007514
Martin v. Löwis11437992002-04-12 09:54:03 +00007515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007516if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007517 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7521$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007522if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007523 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7526# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7528$as_echo_n "checking size of pthread_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007529if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007530 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007531else
Matthias Kloseb9621712010-04-24 17:59:49 +00007532 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007533#ifdef HAVE_PTHREAD_H
7534#include <pthread.h>
7535#endif
7536
Matthias Kloseb9621712010-04-24 17:59:49 +00007537"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007538
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007539else
Matthias Kloseb9621712010-04-24 17:59:49 +00007540 if test "$ac_cv_type_pthread_t" = yes; then
7541 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007543as_fn_error 77 "cannot compute sizeof (pthread_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007544See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007545 else
7546 ac_cv_sizeof_pthread_t=0
7547 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007549
Trent Mick635f6fb2000-08-23 21:33:05 +00007550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7552$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007553
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007554
7555
Martin v. Löwis11437992002-04-12 09:54:03 +00007556cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007557#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007558_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007559
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007560
Trent Mick635f6fb2000-08-23 21:33:05 +00007561fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007562CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007563
Michael W. Hudson54241132001-12-07 15:38:26 +00007564
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007565case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007566 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007567 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7568 ;;
7569 Darwin/*)
7570 OTHER_LIBTOOL_OPT=""
7571 ;;
7572esac
7573
7574
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007575ARCH_RUN_32BIT=""
7576
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007577case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007578 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007579 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7580 if test "${enable_universalsdk}"; then
7581 :
7582 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007583 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007584 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007585 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007586 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007587 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007588 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007589 if test ${gcc_version} '<' 4.0
7590 then
7591 LIBTOOL_CRUFT="-lcc_dynamic"
7592 else
7593 LIBTOOL_CRUFT=""
7594 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007595 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007596 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007597else
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007599/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007600
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007601 #include <unistd.h>
7602 int main(int argc, char*argv[])
7603 {
7604 if (sizeof(long) == 4) {
7605 return 0;
7606 } else {
7607 return 1;
7608 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007609 }
7610
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007612if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007613 ac_osx_32bit=yes
7614else
Matthias Kloseb9621712010-04-24 17:59:49 +00007615 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7618 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007619fi
7620
7621
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007622 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007623 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007624 i386)
7625 MACOSX_DEFAULT_ARCH="i386"
7626 ;;
7627 ppc)
7628 MACOSX_DEFAULT_ARCH="ppc"
7629 ;;
7630 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007631 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007632 ;;
7633 esac
7634 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007635 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007636 i386)
7637 MACOSX_DEFAULT_ARCH="x86_64"
7638 ;;
7639 ppc)
7640 MACOSX_DEFAULT_ARCH="ppc64"
7641 ;;
7642 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007643 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007644 ;;
7645 esac
7646
7647 #ARCH_RUN_32BIT="true"
7648 fi
7649
7650 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007651 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007652 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007653esac
7654
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7656$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007657if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007658then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007659 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007660 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007661 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007662
Matthias Kloseb9621712010-04-24 17:59:49 +00007663$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007664
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7666$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007667 if test $enable_shared = "yes"
7668 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007669 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 +00007670 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007671else
Matthias Kloseb9621712010-04-24 17:59:49 +00007672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7673$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007674fi
7675
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7677$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007678case $ac_sys_system/$ac_sys_release in
7679 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007680
Matthias Kloseb9621712010-04-24 17:59:49 +00007681$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007682
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7684$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007685 ;;
7686 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7688$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007689 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007690esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007691
Guido van Rossum0a516c91994-09-12 10:58:40 +00007692# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007693
Michael W. Hudson54241132001-12-07 15:38:26 +00007694
7695
7696
7697
Benjamin Peterson99f03762010-04-11 22:15:28 +00007698
Thomas Wouters477c8d52006-05-27 19:21:47 +00007699
Georg Brandlb1441c72009-01-03 22:33:39 +00007700
Thomas Wouters477c8d52006-05-27 19:21:47 +00007701cat >>confdefs.h <<_ACEOF
7702#define SHLIB_EXT "$SO"
7703_ACEOF
7704
Guido van Rossum0a516c91994-09-12 10:58:40 +00007705# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007706# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007707# (Shared libraries in this instance are shared modules to be loaded into
7708# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7710$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007711if test -z "$LDSHARED"
7712then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007713 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007714 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007715 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007716 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007717 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007718 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007719 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007720 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007721 if test "$GCC" = "yes" ; then
7722 LDSHARED='$(CC) -shared'
7723 LDCXXSHARED='$(CXX) -shared'
7724 else
7725 LDSHARED='$(CC) -G'
7726 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007727 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007728 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007729 if test "$GCC" = "yes" ; then
7730 LDSHARED='$(CC) -shared'
7731 LDCXXSHARED='$(CXX) -shared'
7732 else
7733 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007734 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007735 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007736 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007737 LDSHARED='$(CC) -bundle'
7738 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007739 if test "$enable_framework" ; then
7740 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007741 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7742 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007743 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007744 else
7745 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007746 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007747 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007748 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007749 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007750 LDSHARED='$(CC) -bundle'
7751 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007752 if test "$enable_framework" ; then
7753 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007754 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7755 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007756 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007757 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007758 # No framework, use the Python app as bundle-loader
7759 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007760 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007761 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007762 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007763 Darwin/*)
7764 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7765 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007766
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007767 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007768 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007769 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007770 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007771 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007772 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7773 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007774 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007775 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007776 LDSHARED='$(CC) -bundle'
7777 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007778 if test "$enable_framework" ; then
7779 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007780 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7781 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007782 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007783 else
7784 # No framework, use the Python app as bundle-loader
7785 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7786 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007787 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007788 fi
7789 fi
7790 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007791 Linux*|GNU*|QNX*)
7792 LDSHARED='$(CC) -shared'
7793 LDCXXSHARED='$(CXX) -shared';;
7794 BSD/OS*/4*)
7795 LDSHARED="gcc -shared"
7796 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007797 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007798 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007799 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007800 LDSHARED='$(CC) -shared'
7801 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007802 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007803 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007804 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007805 OpenBSD*)
7806 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7807 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007808 LDSHARED='$(CC) -shared $(CCSHARED)'
7809 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007810 else
7811 case `uname -r` in
7812 [01].* | 2.[0-7] | 2.[0-7].*)
7813 LDSHARED="ld -Bshareable ${LDFLAGS}"
7814 ;;
7815 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007816 LDSHARED='$(CC) -shared $(CCSHARED)'
7817 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007818 ;;
7819 esac
7820 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007821 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007822 LDSHARED='$(CC) -shared'
7823 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007824 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007825 if test "$GCC" = "yes" ; then
7826 LDSHARED='$(CC) -shared'
7827 LDCXXSHARED='$(CXX) -shared'
7828 else
7829 LDSHARED='$(CC) -G'
7830 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007831 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007832 SCO_SV*)
7833 LDSHARED='$(CC) -Wl,-G,-Bexport'
7834 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7835 CYGWIN*)
7836 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7837 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007838 *) LDSHARED="ld";;
7839 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7842$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007843LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007844BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007845# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007846# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7848$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007849if test -z "$CCSHARED"
7850then
Guido van Rossum07397971997-04-29 21:49:50 +00007851 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007852 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007853 then CCSHARED="-fPIC";
7854 elif test `uname -p` = sparc;
7855 then CCSHARED="-xcode=pic32";
7856 else CCSHARED="-Kpic";
7857 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007858 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007859 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007860 else CCSHARED="+z";
7861 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007862 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007863 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007864 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007865 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007866 if test "$GCC" = "yes"
7867 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007868 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007869 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007870 SCO_SV*)
7871 if test "$GCC" = "yes"
7872 then CCSHARED="-fPIC"
7873 else CCSHARED="-Kpic -belf"
7874 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007875 IRIX*/6*) case $CC in
7876 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007877 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007878 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007879 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7882$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007883# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007884# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7886$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007887if test -z "$LINKFORSHARED"
7888then
Guido van Rossum07397971997-04-29 21:49:50 +00007889 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007890 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007891 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007892 LINKFORSHARED="-Wl,-E -Wl,+s";;
7893# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007894 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007895 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007896 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007898 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007899 if test "$enable_framework"
7900 then
Jack Jansenda49e192005-01-07 13:08:22 +00007901 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007902 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007903 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007904 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007905 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007906 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007907 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007908 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7909 then
7910 LINKFORSHARED="-Wl,--export-dynamic"
7911 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007912 SunOS/5*) case $CC in
7913 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007914 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007915 then
7916 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007917 fi;;
7918 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007919 CYGWIN*)
7920 if test $enable_shared = "no"
7921 then
7922 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7923 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007924 QNX*)
7925 # -Wl,-E causes the symbols to be added to the dynamic
7926 # symbol table so that they can be found when a module
7927 # is loaded. -N 2048K causes the stack size to be set
7928 # to 2048 kilobytes so that the stack doesn't overflow
7929 # when running test_compile.py.
7930 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007931 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7934$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007935
Michael W. Hudson54241132001-12-07 15:38:26 +00007936
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007937
Matthias Kloseb9621712010-04-24 17:59:49 +00007938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7939$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007940if test ! "$LIBRARY" = "$LDLIBRARY"
7941then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007942 case $ac_sys_system in
7943 CYGWIN*)
7944 # Cygwin needs CCSHARED when building extension DLLs
7945 # but not when building the interpreter DLL.
7946 CFLAGSFORSHARED='';;
7947 *)
7948 CFLAGSFORSHARED='$(CCSHARED)'
7949 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7952$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007953
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007954# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7955# library (with --enable-shared).
7956# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007957# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7958# if it is not required, since it creates a dependency of the shared library
7959# to LIBS. This, in turn, means that applications linking the shared libpython
7960# don't need to link LIBS explicitly. The default should be only changed
7961# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007962
Matthias Kloseb9621712010-04-24 17:59:49 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7964$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007965case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007966 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007967 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7970$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007971
7972
Guido van Rossum627b2d71993-12-24 10:39:16 +00007973# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7975$as_echo_n "checking for dlopen in -ldl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007976if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007977 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007978else
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007980LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984/* Override any GCC internal prototype to avoid an error.
7985 Use char because int might match the return type of a GCC
7986 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007987#ifdef __cplusplus
7988extern "C"
7989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007990char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007991int
7992main ()
7993{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 ;
7996 return 0;
7997}
7998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007999if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008000 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008001else
Matthias Kloseb9621712010-04-24 17:59:49 +00008002 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008004rm -f core conftest.err conftest.$ac_objext \
8005 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008006LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8009$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008010if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 cat >>confdefs.h <<_ACEOF
8012#define HAVE_LIBDL 1
8013_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008014
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008015 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008017fi
8018 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8020$as_echo_n "checking for shl_load in -ldld... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008021if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008023else
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008025LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029/* Override any GCC internal prototype to avoid an error.
8030 Use char because int might match the return type of a GCC
8031 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008032#ifdef __cplusplus
8033extern "C"
8034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008035char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008036int
8037main ()
8038{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 ;
8041 return 0;
8042}
8043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008044if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008045 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008046else
Matthias Kloseb9621712010-04-24 17:59:49 +00008047 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008048fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008049rm -f core conftest.err conftest.$ac_objext \
8050 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008051LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8054$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008055if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008056 cat >>confdefs.h <<_ACEOF
8057#define HAVE_LIBDLD 1
8058_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008059
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008060 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008062fi
8063 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008064
Georg Brandlb1441c72009-01-03 22:33:39 +00008065# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008066if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8068$as_echo_n "checking for library containing sem_init... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008069if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008070 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008071else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008072 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008074/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008075
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076/* Override any GCC internal prototype to avoid an error.
8077 Use char because int might match the return type of a GCC
8078 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008079#ifdef __cplusplus
8080extern "C"
8081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008082char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008083int
8084main ()
8085{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008086return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008087 ;
8088 return 0;
8089}
8090_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091for ac_lib in '' pthread rt posix4; do
8092 if test -z "$ac_lib"; then
8093 ac_res="none required"
8094 else
8095 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008096 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008099 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008101rm -f core conftest.err conftest.$ac_objext \
8102 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08008103 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106done
Gregory P. Smith69140482012-01-16 02:05:55 -08008107if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109else
8110 ac_cv_search_sem_init=no
8111fi
8112rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008113LIBS=$ac_func_search_save_LIBS
8114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8116$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008117ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008118if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008120
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008121fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008122 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008123 # posix4 on Solaris 2.6
8124 # pthread (first!) on Linux
8125fi
8126
Martin v. Löwis19d17342003-06-14 21:03:05 +00008127# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8129$as_echo_n "checking for textdomain in -lintl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008130if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008132else
8133 ac_check_lib_save_LIBS=$LIBS
8134LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008136/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138/* Override any GCC internal prototype to avoid an error.
8139 Use char because int might match the return type of a GCC
8140 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008141#ifdef __cplusplus
8142extern "C"
8143#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008144char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008145int
8146main ()
8147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008149 ;
8150 return 0;
8151}
8152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008153if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008154 ac_cv_lib_intl_textdomain=yes
8155else
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008158rm -f core conftest.err conftest.$ac_objext \
8159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008160LIBS=$ac_check_lib_save_LIBS
8161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8163$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008164if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008165
Matthias Kloseb9621712010-04-24 17:59:49 +00008166$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008167
Brett Cannonc6d936e2009-06-07 20:09:53 +00008168 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008169fi
8170
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008171
8172# checks for system dependent C++ extensions support
8173case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008174 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8175$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008177/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008178
Georg Brandl59e87bd2011-02-15 19:48:59 +00008179 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008180int
8181main ()
8182{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008183loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008184 ;
8185 return 0;
8186}
Matthias Kloseb159a552010-04-25 21:00:44 +00008187
Martin v. Löwis11437992002-04-12 09:54:03 +00008188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008189if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008190
Matthias Kloseb159a552010-04-25 21:00:44 +00008191
Matthias Kloseb9621712010-04-24 17:59:49 +00008192$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008193
Matthias Kloseb159a552010-04-25 21:00:44 +00008194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008195$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008196
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008197else
Matthias Kloseb159a552010-04-25 21:00:44 +00008198
8199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008200$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008201
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008203rm -f core conftest.err conftest.$ac_objext \
8204 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008205 *) ;;
8206esac
8207
Guido van Rossum70c7f481998-03-26 18:44:10 +00008208# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8210$as_echo_n "checking for t_open in -lnsl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008211if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008213else
Martin v. Löwis11437992002-04-12 09:54:03 +00008214 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008215LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219/* Override any GCC internal prototype to avoid an error.
8220 Use char because int might match the return type of a GCC
8221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008222#ifdef __cplusplus
8223extern "C"
8224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008225char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008226int
8227main ()
8228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 ;
8231 return 0;
8232}
8233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008235 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008239rm -f core conftest.err conftest.$ac_objext \
8240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008241LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8244$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008245if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008246 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008247fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008248 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8250$as_echo_n "checking for socket in -lsocket... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008251if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008252 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008253else
Martin v. Löwis11437992002-04-12 09:54:03 +00008254 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008255LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008259/* Override any GCC internal prototype to avoid an error.
8260 Use char because int might match the return type of a GCC
8261 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008262#ifdef __cplusplus
8263extern "C"
8264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008265char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008266int
8267main ()
8268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008269return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008270 ;
8271 return 0;
8272}
8273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008274if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008275 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008276else
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008279rm -f core conftest.err conftest.$ac_objext \
8280 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008281LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8284$as_echo "$ac_cv_lib_socket_socket" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008285if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008286 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008287fi
8288 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008289
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8291$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008294if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8297$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008298LIBS="$withval $LIBS"
8299
8300else
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8302$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303fi
8304
Guido van Rossum7f43da71994-08-01 12:15:30 +00008305
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008306if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008307 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8308set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8310$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008311if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008313else
8314 case $PKG_CONFIG in
8315 [\\/]* | ?:[\\/]*)
8316 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8317 ;;
8318 *)
8319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8320for as_dir in $PATH
8321do
8322 IFS=$as_save_IFS
8323 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008325 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008326 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008328 break 2
8329 fi
8330done
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008332IFS=$as_save_IFS
8333
8334 ;;
8335esac
8336fi
8337PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8338if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8340$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008341else
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8343$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008344fi
8345
8346
8347fi
8348if test -z "$ac_cv_path_PKG_CONFIG"; then
8349 ac_pt_PKG_CONFIG=$PKG_CONFIG
8350 # Extract the first word of "pkg-config", so it can be a program name with args.
8351set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8353$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008354if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008356else
8357 case $ac_pt_PKG_CONFIG in
8358 [\\/]* | ?:[\\/]*)
8359 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8360 ;;
8361 *)
8362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8363for as_dir in $PATH
8364do
8365 IFS=$as_save_IFS
8366 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008368 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008369 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008371 break 2
8372 fi
8373done
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008375IFS=$as_save_IFS
8376
8377 ;;
8378esac
8379fi
8380ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8381if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8383$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008384else
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008387fi
8388
8389 if test "x$ac_pt_PKG_CONFIG" = x; then
8390 PKG_CONFIG=""
8391 else
8392 case $cross_compiling:$ac_tool_warned in
8393yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008394{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8395$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008396ac_tool_warned=yes ;;
8397esac
8398 PKG_CONFIG=$ac_pt_PKG_CONFIG
8399 fi
8400else
8401 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8402fi
8403
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008404
8405# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8407$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008408
8409# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008410if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008411 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008412else
8413 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008414fi
8415
8416
Matthias Kloseb9621712010-04-24 17:59:49 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8418$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008419
8420# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8422$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008423
8424# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008425if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008426 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008427else
8428 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008429fi
8430
8431
8432if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008433 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8434else
8435 LIBFFI_INCLUDEDIR=""
8436fi
8437
8438
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8440$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008441
Benjamin Peterson076ed002010-10-31 17:11:02 +00008442# Check for support for loadable sqlite extensions
8443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8444$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8445# Check whether --enable-loadable-sqlite-extensions was given.
8446if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8447 enableval=$enable_loadable_sqlite_extensions;
8448else
8449 enable_loadable_sqlite_extensions="no"
8450fi
8451
8452
8453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8454$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8455
Matthias Klose55708cc2009-04-30 08:06:49 +00008456# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8458$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008459
8460# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008461if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008462 withval=$with_dbmliborder;
8463if test x$with_dbmliborder = xyes
8464then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008465as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008466else
8467 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8468 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8469 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008470 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008471 fi
8472 done
8473fi
8474fi
8475
Matthias Kloseb9621712010-04-24 17:59:49 +00008476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8477$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008478
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008479# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008480
8481
Matthias Kloseb9621712010-04-24 17:59:49 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8483$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008486if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487 withval=$with_signal_module;
8488fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008489
8490
8491if test -z "$with_signal_module"
8492then with_signal_module="yes"
8493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8495$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008496
8497if test "${with_signal_module}" = "yes"; then
8498 USE_SIGNAL_MODULE=""
8499 SIGNAL_OBJS=""
8500else
8501 USE_SIGNAL_MODULE="#"
8502 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8503fi
8504
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008505# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008506
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008507USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008508
Matthias Kloseb9621712010-04-24 17:59:49 +00008509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8510$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008511
Guido van Rossumec2f0731997-01-22 20:54:01 +00008512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008514if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8517$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008518LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008519if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008520 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008521fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008522else
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8524$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008525fi
8526
Martin v. Löwis11437992002-04-12 09:54:03 +00008527
8528# Templates for things AC_DEFINEd more than once.
8529# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008530
8531
Martin v. Löwis11437992002-04-12 09:54:03 +00008532
8533
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8535$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008538if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539 withval=$with_threads;
8540fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008541
8542
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008543# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008545# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008546if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547 withval=$with_thread; with_threads=$with_thread
8548fi
8549
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008550
8551if test -z "$with_threads"
8552then with_threads="yes"
8553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8555$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008556
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008557
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008558if test "$with_threads" = "no"
8559then
8560 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008561elif test "$ac_cv_pthread_is_default" = yes
8562then
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008564
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008565 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008567
8568 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008569 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008570elif test "$ac_cv_kpthread" = "yes"
8571then
8572 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008573 if test "$ac_cv_cxx_thread" = "yes"; then
8574 CXX="$CXX -Kpthread"
8575 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008577
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008578 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008579 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008580elif test "$ac_cv_kthread" = "yes"
8581then
8582 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008583 if test "$ac_cv_cxx_thread" = "yes"; then
8584 CXX="$CXX -Kthread"
8585 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008587
8588 posix_threads=yes
8589 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008590elif test "$ac_cv_pthread" = "yes"
8591then
8592 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008593 if test "$ac_cv_cxx_thread" = "yes"; then
8594 CXX="$CXX -pthread"
8595 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008597
8598 posix_threads=yes
8599 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008600else
8601 if test ! -z "$with_threads" -a -d "$with_threads"
8602 then LDFLAGS="$LDFLAGS -L$with_threads"
8603 fi
8604 if test ! -z "$withval" -a -d "$withval"
8605 then LDFLAGS="$LDFLAGS -L$withval"
8606 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008607
8608 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008609 # define _POSIX_THREADS in unistd.h. Some apparently don't
8610 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8612$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008614/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008615
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008616#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008617#ifdef _POSIX_THREADS
8618yes
8619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008620
8621_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008623 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008624 unistd_defines_pthreads=yes
8625else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008626 unistd_defines_pthreads=no
8627fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008628rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008629
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8631$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008632
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008634
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 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 -08008636if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008638
Matthias Kloseb9621712010-04-24 17:59:49 +00008639 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008640
Martin v. Löwis11437992002-04-12 09:54:03 +00008641
Matthias Kloseb9621712010-04-24 17:59:49 +00008642$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008643
8644 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008645 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008646else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008647
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 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 -08008649if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008651
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008653
Martin v. Löwis11437992002-04-12 09:54:03 +00008654
Matthias Kloseb9621712010-04-24 17:59:49 +00008655$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008656
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008657 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008658else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008659
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008660 # Just looking for pthread_create in libpthread is not enough:
8661 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8662 # So we really have to include pthread.h, and then link.
8663 _libs=$LIBS
8664 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8666$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008668/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008669#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008670
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008671void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008672int
8673main ()
8674{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008675
8676pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 ;
8678 return 0;
8679}
8680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008681if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008682
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8684$as_echo "yes" >&6; }
8685 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008686
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008687 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008688 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008689else
Martin v. Löwis11437992002-04-12 09:54:03 +00008690
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008691 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008692 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Gregory P. Smith69140482012-01-16 02:05:55 -08008693if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008695
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008696 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008697 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008698else
Guido van Rossumad678af1998-10-02 14:42:15 +00008699
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8701$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008702if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008704else
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008706LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710/* Override any GCC internal prototype to avoid an error.
8711 Use char because int might match the return type of a GCC
8712 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008713#ifdef __cplusplus
8714extern "C"
8715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008716char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008717int
8718main ()
8719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008721 ;
8722 return 0;
8723}
8724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008725if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730rm -f core conftest.err conftest.$ac_objext \
8731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008732LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8735$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008736if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008738
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008739 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008740 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008741 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008742else
Greg Steinadf63d62000-07-05 10:38:09 +00008743
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8745$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008746if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008748else
Martin v. Löwis11437992002-04-12 09:54:03 +00008749 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008750LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754/* Override any GCC internal prototype to avoid an error.
8755 Use char because int might match the return type of a GCC
8756 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008757#ifdef __cplusplus
8758extern "C"
8759#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008760char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008761int
8762main ()
8763{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ;
8766 return 0;
8767}
8768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008769if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008771else
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774rm -f core conftest.err conftest.$ac_objext \
8775 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008776LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8779$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008780if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008782
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008783 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008784 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008785 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008786else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008787
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8789$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008790if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008792else
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008794LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798/* Override any GCC internal prototype to avoid an error.
8799 Use char because int might match the return type of a GCC
8800 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008801#ifdef __cplusplus
8802extern "C"
8803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008804char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008805int
8806main ()
8807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008809 ;
8810 return 0;
8811}
8812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008815else
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008818rm -f core conftest.err conftest.$ac_objext \
8819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008820LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8823$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008824if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008826
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008827 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008828 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008829 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008830else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008831
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8833$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008834if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008836else
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008838LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842/* Override any GCC internal prototype to avoid an error.
8843 Use char because int might match the return type of a GCC
8844 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008845#ifdef __cplusplus
8846extern "C"
8847#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008848char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008849int
8850main ()
8851{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008852return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008853 ;
8854 return 0;
8855}
8856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008857if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008859else
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008862rm -f core conftest.err conftest.$ac_objext \
8863 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008864LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8867$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008868if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008870
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008871 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008872 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008873 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008874else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008875
Martin v. Löwis130fb172001-07-19 11:00:41 +00008876 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008877fi
8878
Guido van Rossum627b2d71993-12-24 10:39:16 +00008879
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008880fi
8881
Guido van Rossum0be3e491997-05-22 20:33:33 +00008882fi
8883
Guido van Rossum49545951997-12-02 19:28:29 +00008884fi
8885
Guido van Rossumb93a8621998-05-07 13:27:32 +00008886fi
8887
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008889rm -f core conftest.err conftest.$ac_objext \
8890 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891fi
8892
Martin v. Löwis11437992002-04-12 09:54:03 +00008893
8894fi
8895
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008896
Michael W. Hudson54241132001-12-07 15:38:26 +00008897
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8899$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008900if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008902else
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008904LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908/* Override any GCC internal prototype to avoid an error.
8909 Use char because int might match the return type of a GCC
8910 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008911#ifdef __cplusplus
8912extern "C"
8913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008914char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008915int
8916main ()
8917{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008918return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ;
8920 return 0;
8921}
8922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008925else
Matthias Kloseb9621712010-04-24 17:59:49 +00008926 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008928rm -f core conftest.err conftest.$ac_objext \
8929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008930LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8933$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008934if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008936
Martin v. Löwis130fb172001-07-19 11:00:41 +00008937 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008938 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008939 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008940fi
8941
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008942
Neal Norwitza978ab02002-11-02 16:58:05 +00008943 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8945$as_echo_n "checking for thr_create in -lthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008946if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008948else
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008950LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954/* Override any GCC internal prototype to avoid an error.
8955 Use char because int might match the return type of a GCC
8956 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008957#ifdef __cplusplus
8958extern "C"
8959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008960char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008961int
8962main ()
8963{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008964return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 ;
8966 return 0;
8967}
8968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008969if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008971else
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008974rm -f core conftest.err conftest.$ac_objext \
8975 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008976LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8979$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008980if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008982
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008983 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008984 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008985 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008986fi
8987
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008988 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008989
Martin v. Löwis130fb172001-07-19 11:00:41 +00008990 if test "$USE_THREAD_MODULE" != "#"
8991 then
8992 # If the above checks didn't disable threads, (at least) OSF1
8993 # needs this '-threads' argument during linking.
8994 case $ac_sys_system in
8995 OSF1) LDLAST=-threads;;
8996 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008997 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008998fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008999
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009000if test "$posix_threads" = "yes"; then
9001 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009002
Matthias Kloseb9621712010-04-24 17:59:49 +00009003$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009004
9005 fi
9006
9007 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9008 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009009 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009010$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009011
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009012 ;;
9013 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009014$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009015
9016 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009017 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009018$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009019
9020 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009021 esac
9022
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9024$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009025 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009027else
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009029 ac_cv_pthread_system_supported=no
9030else
Matthias Kloseb9621712010-04-24 17:59:49 +00009031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009032/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009033#include <pthread.h>
9034 void *foo(void *parm) {
9035 return NULL;
9036 }
9037 main() {
9038 pthread_attr_t attr;
9039 pthread_t id;
9040 if (pthread_attr_init(&attr)) exit(-1);
9041 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9042 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9043 exit(0);
9044 }
9045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009046if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009047 ac_cv_pthread_system_supported=yes
9048else
Matthias Kloseb9621712010-04-24 17:59:49 +00009049 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9052 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009053fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055
Guido van Rossum627b2d71993-12-24 10:39:16 +00009056fi
9057
Matthias Kloseb9621712010-04-24 17:59:49 +00009058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9059$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009060 if test "$ac_cv_pthread_system_supported" = "yes"; then
9061
Matthias Kloseb9621712010-04-24 17:59:49 +00009062$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009063
9064 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 for ac_func in pthread_sigmask
9066do :
9067 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Gregory P. Smith69140482012-01-16 02:05:55 -08009068if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009069 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009070#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009071_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009072 case $ac_sys_system in
9073 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009074
Matthias Kloseb9621712010-04-24 17:59:49 +00009075$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009076
9077 ;;
9078 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009079fi
9080done
9081
9082fi
9083
9084
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009086
Matthias Kloseb9621712010-04-24 17:59:49 +00009087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9088$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009090if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009091 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009092 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9094$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009095 ipv6=no
9096 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9098$as_echo "yes" >&6; }
9099 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009100
9101 ipv6=yes
9102 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104else
Martin v. Löwis11437992002-04-12 09:54:03 +00009105
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009107
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9109$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009110 ipv6=no
9111
9112else
Matthias Kloseb9621712010-04-24 17:59:49 +00009113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009114/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009115 /* AF_INET6 available check */
9116#include <sys/types.h>
9117#include <sys/socket.h>
9118main()
9119{
9120 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9121 exit(1);
9122 else
9123 exit(0);
9124}
9125
Martin v. Löwis11437992002-04-12 09:54:03 +00009126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009127if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009128
Matthias Kloseb9621712010-04-24 17:59:49 +00009129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9130$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009131 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009132
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009133else
Matthias Kloseb159a552010-04-25 21:00:44 +00009134
Matthias Kloseb9621712010-04-24 17:59:49 +00009135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9136$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009137 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009138
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9141 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009142fi
9143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009145if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9147$as_echo_n "checking if RFC2553 API is available... " >&6; }
9148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009149/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009150
9151 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009152#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009153int
9154main ()
9155{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009156struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009157 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009158 ;
9159 return 0;
9160}
Matthias Kloseb159a552010-04-25 21:00:44 +00009161
Martin v. Löwis11437992002-04-12 09:54:03 +00009162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009163if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009164
9165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009166$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009167 ipv6=yes
9168
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009169else
Matthias Kloseb159a552010-04-25 21:00:44 +00009170
9171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009172$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009173 ipv6=no
9174
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009177fi
9178
9179if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009180 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009181
9182fi
9183
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009184fi
9185
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009186
9187ipv6type=unknown
9188ipv6lib=none
9189ipv6trylibc=no
9190
9191if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9193$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009194 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9195 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009196 case $i in
9197 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009199/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009200
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009201#include <netinet/in.h>
9202#ifdef IPV6_INRIA_VERSION
9203yes
9204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009205_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009206if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009207 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009208 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009209fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009210rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009211
9212 ;;
9213 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009215/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009216
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009217#include <netinet/in.h>
9218#ifdef __KAME__
9219yes
9220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009221_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009223 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009224 ipv6type=$i;
9225 ipv6lib=inet6
9226 ipv6libdir=/usr/local/v6/lib
9227 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009228fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009229rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009230
9231 ;;
9232 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009234/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009235
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009236#include <features.h>
9237#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9238yes
9239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009240_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009242 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009243 ipv6type=$i;
9244 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009245fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009246rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009247
9248 ;;
9249 linux-inet6)
9250 if test -d /usr/inet6; then
9251 ipv6type=$i
9252 ipv6lib=inet6
9253 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009254 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009255 fi
9256 ;;
9257 solaris)
9258 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009259 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009260 ipv6type=$i
9261 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009262 fi
9263 fi
9264 ;;
9265 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009267/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009268
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009269#include <sys/param.h>
9270#ifdef _TOSHIBA_INET6
9271yes
9272#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009273_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009275 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009276 ipv6type=$i;
9277 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009278 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009279fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009280rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009281
9282 ;;
9283 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009285/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009286
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009287#include </usr/local/v6/include/sys/v6config.h>
9288#ifdef __V6D__
9289yes
9290#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009291_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009293 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009294 ipv6type=$i;
9295 ipv6lib=v6;
9296 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009297 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009298fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009299rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009300
9301 ;;
9302 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009304/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009305
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009306#include <sys/param.h>
9307#ifdef _ZETA_MINAMI_INET6
9308yes
9309#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009310_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009311if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009312 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009313 ipv6type=$i;
9314 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009315 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009316fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009317rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009318
9319 ;;
9320 esac
9321 if test "$ipv6type" != "unknown"; then
9322 break
9323 fi
9324 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9326$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009327fi
9328
9329if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9330 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9331 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9332 echo "using lib$ipv6lib"
9333 else
9334 if test $ipv6trylibc = "yes"; then
9335 echo "using libc"
9336 else
9337 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9338 echo "You need to fetch lib$ipv6lib.a from appropriate"
9339 echo 'ipv6 kit and compile beforehand.'
9340 exit 1
9341 fi
9342 fi
9343fi
9344
Matthias Kloseb9621712010-04-24 17:59:49 +00009345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9346$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009348/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009349
9350 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009351int
9352main ()
9353{
9354FSIORefNum fRef = 0
9355 ;
9356 return 0;
9357}
Matthias Kloseb159a552010-04-25 21:00:44 +00009358
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009360if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009361
Matthias Kloseb159a552010-04-25 21:00:44 +00009362
Matthias Kloseb9621712010-04-24 17:59:49 +00009363$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009364
Matthias Kloseb9621712010-04-24 17:59:49 +00009365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9366$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009367
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009368else
Matthias Kloseb159a552010-04-25 21:00:44 +00009369
Matthias Kloseb9621712010-04-24 17:59:49 +00009370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9371$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009372
9373fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9375
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009376# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9378$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009379
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009380# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009381if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009382 withval=$with_doc_strings;
9383fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009384
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009385
9386if test -z "$with_doc_strings"
9387then with_doc_strings="yes"
9388fi
9389if test "$with_doc_strings" != "no"
9390then
9391
Matthias Kloseb9621712010-04-24 17:59:49 +00009392$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009393
9394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9396$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009397
Antoine Pitrou042b1282010-08-13 21:15:58 +00009398# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9400$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009402# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009403if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009405if test "$withval" != no
9406then
9407
Matthias Kloseb9621712010-04-24 17:59:49 +00009408$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009409
Matthias Kloseb9621712010-04-24 17:59:49 +00009410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9411$as_echo "yes" >&6; }
9412else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9413$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009414fi
9415else
Matthias Kloseb9621712010-04-24 17:59:49 +00009416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9417$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418fi
9419
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009420
9421# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9423$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009426if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427 withval=$with_pymalloc;
9428fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009429
Neil Schemenauera35c6882001-02-27 04:45:05 +00009430
Neil Schemenauer16c22972002-03-22 15:34:49 +00009431if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009432then
9433 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009434 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009435fi
9436if test "$with_pymalloc" != "no"
9437then
Martin v. Löwis11437992002-04-12 09:54:03 +00009438
Matthias Kloseb9621712010-04-24 17:59:49 +00009439$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009440
9441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9443$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009444
Benjamin Peterson05159c42009-12-03 03:01:27 +00009445# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9447$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009448
9449# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009450if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009451 withval=$with_valgrind;
9452else
9453 with_valgrind=no
9454fi
9455
Matthias Kloseb9621712010-04-24 17:59:49 +00009456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9457$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009458if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 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 -08009460if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009461
Matthias Kloseb9621712010-04-24 17:59:49 +00009462$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009463
9464else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009465 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009466
9467fi
9468
9469
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009470 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009471fi
9472
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009473# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009474
Guido van Rossum98935bf2001-09-05 19:13:16 +00009475DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009476
Guido van Rossume97ee181999-12-20 21:27:22 +00009477# the dlopen() function means we might want to use dynload_shlib.o. some
9478# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009479for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009480do :
9481 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Gregory P. Smith69140482012-01-16 02:05:55 -08009482if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009484#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009485_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009486
Guido van Rossume97ee181999-12-20 21:27:22 +00009487fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009488done
Guido van Rossume97ee181999-12-20 21:27:22 +00009489
Michael W. Hudson54241132001-12-07 15:38:26 +00009490
Guido van Rossume97ee181999-12-20 21:27:22 +00009491# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9492# loading of modules.
9493
Matthias Kloseb9621712010-04-24 17:59:49 +00009494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9495$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009496if test -z "$DYNLOADFILE"
9497then
9498 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009499 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9500 if test "$ac_cv_func_dlopen" = yes
9501 then DYNLOADFILE="dynload_shlib.o"
9502 else DYNLOADFILE="dynload_aix.o"
9503 fi
9504 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009505 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009506 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9507 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009508 *)
9509 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9510 # out any dynamic loading
9511 if test "$ac_cv_func_dlopen" = yes
9512 then DYNLOADFILE="dynload_shlib.o"
9513 else DYNLOADFILE="dynload_stub.o"
9514 fi
9515 ;;
9516 esac
9517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9519$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009520if test "$DYNLOADFILE" != "dynload_stub.o"
9521then
Martin v. Löwis11437992002-04-12 09:54:03 +00009522
Matthias Kloseb9621712010-04-24 17:59:49 +00009523$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009524
9525fi
9526
Neil Schemenauer4e425612001-06-19 15:44:15 +00009527# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9528
Michael W. Hudson54241132001-12-07 15:38:26 +00009529
Matthias Kloseb9621712010-04-24 17:59:49 +00009530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9531$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009532if test -z "$MACHDEP_OBJS"
9533then
Jack Jansene578a632001-08-15 01:27:14 +00009534 MACHDEP_OBJS=$extra_machdep_objs
9535else
9536 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9539$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009540
Guido van Rossum627b2d71993-12-24 10:39:16 +00009541# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009542for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009543 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009544 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009545 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009546 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009547 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009548 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009549 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9550 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009551 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009552 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009553 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009554 truncate uname unsetenv utimes waitpid wait3 wait4 \
9555 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009556do :
9557 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9558ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009559if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009560 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009561#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009562_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009563
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009564fi
9565done
9566
Michael W. Hudson54241132001-12-07 15:38:26 +00009567
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009568ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9569 #include <dirent.h>
9570"
9571if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9572
9573$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9574
9575fi
9576
9577
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009578# For some functions, having a definition is not sufficient, since
9579# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9581$as_echo_n "checking for chroot... " >&6; }
9582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009583/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009584#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009585int
9586main ()
9587{
9588void *x=chroot
9589 ;
9590 return 0;
9591}
9592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009593if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009594
Matthias Kloseb9621712010-04-24 17:59:49 +00009595$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009596
Matthias Kloseb159a552010-04-25 21:00:44 +00009597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009598$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009599else
Matthias Kloseb9621712010-04-24 17:59:49 +00009600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9601$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009602
9603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9606$as_echo_n "checking for link... " >&6; }
9607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009608/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009609#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009610int
9611main ()
9612{
9613void *x=link
9614 ;
9615 return 0;
9616}
9617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009618if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009619
Matthias Kloseb9621712010-04-24 17:59:49 +00009620$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009621
Matthias Kloseb159a552010-04-25 21:00:44 +00009622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009623$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009624else
Matthias Kloseb9621712010-04-24 17:59:49 +00009625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9626$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009627
9628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9631$as_echo_n "checking for symlink... " >&6; }
9632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009633/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009634#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009635int
9636main ()
9637{
9638void *x=symlink
9639 ;
9640 return 0;
9641}
9642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009643if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009644
Matthias Kloseb9621712010-04-24 17:59:49 +00009645$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009646
Matthias Kloseb159a552010-04-25 21:00:44 +00009647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009648$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009649else
Matthias Kloseb9621712010-04-24 17:59:49 +00009650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9651$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009652
9653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9656$as_echo_n "checking for fchdir... " >&6; }
9657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009658/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009659#include <unistd.h>
9660int
9661main ()
9662{
9663void *x=fchdir
9664 ;
9665 return 0;
9666}
9667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009668if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009669
Matthias Kloseb9621712010-04-24 17:59:49 +00009670$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009671
Matthias Kloseb159a552010-04-25 21:00:44 +00009672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009673$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009674else
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9676$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009677
9678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9681$as_echo_n "checking for fsync... " >&6; }
9682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009683/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009684#include <unistd.h>
9685int
9686main ()
9687{
9688void *x=fsync
9689 ;
9690 return 0;
9691}
9692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009693if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009694
Matthias Kloseb9621712010-04-24 17:59:49 +00009695$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009696
Matthias Kloseb159a552010-04-25 21:00:44 +00009697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009698$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009699else
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9701$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009702
9703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9706$as_echo_n "checking for fdatasync... " >&6; }
9707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009708/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009709#include <unistd.h>
9710int
9711main ()
9712{
9713void *x=fdatasync
9714 ;
9715 return 0;
9716}
9717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009718if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009719
Matthias Kloseb9621712010-04-24 17:59:49 +00009720$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009721
Matthias Kloseb159a552010-04-25 21:00:44 +00009722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009723$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009724else
Matthias Kloseb9621712010-04-24 17:59:49 +00009725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9726$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009727
9728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9731$as_echo_n "checking for epoll... " >&6; }
9732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009733/* end confdefs.h. */
9734#include <sys/epoll.h>
9735int
9736main ()
9737{
9738void *x=epoll_create
9739 ;
9740 return 0;
9741}
9742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009743if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009744
Matthias Kloseb9621712010-04-24 17:59:49 +00009745$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009746
Matthias Kloseb159a552010-04-25 21:00:44 +00009747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009748$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009749else
Matthias Kloseb9621712010-04-24 17:59:49 +00009750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9751$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009752
9753fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9756$as_echo_n "checking for kqueue... " >&6; }
9757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009758/* end confdefs.h. */
9759
9760#include <sys/types.h>
9761#include <sys/event.h>
9762
9763int
9764main ()
9765{
9766int x=kqueue()
9767 ;
9768 return 0;
9769}
9770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009771if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009772
Matthias Kloseb9621712010-04-24 17:59:49 +00009773$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009774
Matthias Kloseb159a552010-04-25 21:00:44 +00009775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009776$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009777else
Matthias Kloseb9621712010-04-24 17:59:49 +00009778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9779$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009780
9781fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009783# On some systems (eg. FreeBSD 5), we would find a definition of the
9784# functions ctermid_r, setgroups in the library, but no prototype
9785# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9786# address to avoid compiler warnings and potential miscompilations
9787# because of the missing prototypes.
9788
Matthias Kloseb9621712010-04-24 17:59:49 +00009789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9790$as_echo_n "checking for ctermid_r... " >&6; }
9791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009792/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009793
Martin v. Löwisd5843682002-11-21 20:41:28 +00009794#include <stdio.h>
9795
Martin v. Löwisd5843682002-11-21 20:41:28 +00009796int
9797main ()
9798{
9799void* p = ctermid_r
9800 ;
9801 return 0;
9802}
9803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009804if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009805
Matthias Kloseb9621712010-04-24 17:59:49 +00009806$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009807
Matthias Kloseb159a552010-04-25 21:00:44 +00009808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009809$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009810else
Matthias Kloseb9621712010-04-24 17:59:49 +00009811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9812$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009813
9814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9816
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9818$as_echo_n "checking for flock declaration... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009819if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009820 $as_echo_n "(cached) " >&6
9821else
9822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009823/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009824#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009825int
9826main ()
9827{
9828void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009829
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009830 ;
9831 return 0;
9832}
9833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009834if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009835 ac_cv_flock_decl=yes
9836else
9837 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009838
9839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009841
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009842fi
9843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9844$as_echo "$ac_cv_flock_decl" >&6; }
9845if test "x${ac_cv_flock_decl}" = xyes; then
9846 for ac_func in flock
9847do :
9848 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Gregory P. Smith69140482012-01-16 02:05:55 -08009849if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009850 cat >>confdefs.h <<_ACEOF
9851#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009852_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009853
Antoine Pitroua3000072010-09-07 14:52:42 +00009854else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009856$as_echo_n "checking for flock in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009857if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009858 $as_echo_n "(cached) " >&6
9859else
9860 ac_check_lib_save_LIBS=$LIBS
9861LIBS="-lbsd $LIBS"
9862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9863/* end confdefs.h. */
9864
9865/* Override any GCC internal prototype to avoid an error.
9866 Use char because int might match the return type of a GCC
9867 builtin and then its argument prototype would still apply. */
9868#ifdef __cplusplus
9869extern "C"
9870#endif
9871char flock ();
9872int
9873main ()
9874{
9875return flock ();
9876 ;
9877 return 0;
9878}
9879_ACEOF
9880if ac_fn_c_try_link "$LINENO"; then :
9881 ac_cv_lib_bsd_flock=yes
9882else
9883 ac_cv_lib_bsd_flock=no
9884fi
9885rm -f core conftest.err conftest.$ac_objext \
9886 conftest$ac_exeext conftest.$ac_ext
9887LIBS=$ac_check_lib_save_LIBS
9888fi
9889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9890$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009891if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009892 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009893
9894
9895$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9896
9897
9898fi
9899
9900
9901fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009902done
9903
Antoine Pitroua3000072010-09-07 14:52:42 +00009904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905
Matthias Kloseb9621712010-04-24 17:59:49 +00009906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9907$as_echo_n "checking for getpagesize... " >&6; }
9908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009909/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009910
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009911#include <unistd.h>
9912
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009913int
9914main ()
9915{
9916void* p = getpagesize
9917 ;
9918 return 0;
9919}
9920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009921if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009922
Matthias Kloseb9621712010-04-24 17:59:49 +00009923$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009924
Matthias Kloseb159a552010-04-25 21:00:44 +00009925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009926$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009927else
Matthias Kloseb9621712010-04-24 17:59:49 +00009928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9929$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009930
9931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009933
Charles-François Natali6613c182011-11-27 12:41:06 +01009934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9935$as_echo_n "checking for broken unsetenv... " >&6; }
9936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9937/* end confdefs.h. */
9938
9939#include <stdlib.h>
9940
9941int
9942main ()
9943{
9944int res = unsetenv("DUMMY")
9945 ;
9946 return 0;
9947}
9948_ACEOF
9949if ac_fn_c_try_compile "$LINENO"; then :
9950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951$as_echo "no" >&6; }
9952else
9953
9954$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9955
9956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9957$as_echo "yes" >&6; }
9958
9959fi
9960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9961
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009962for ac_prog in true
9963do
9964 # Extract the first word of "$ac_prog", so it can be a program name with args.
9965set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9967$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009968if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009970else
9971 if test -n "$TRUE"; then
9972 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9973else
9974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9975for as_dir in $PATH
9976do
9977 IFS=$as_save_IFS
9978 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009980 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009981 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 $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 +00009983 break 2
9984 fi
9985done
Matthias Kloseb9621712010-04-24 17:59:49 +00009986 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009987IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009988
9989fi
9990fi
9991TRUE=$ac_cv_prog_TRUE
9992if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9994$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009995else
Matthias Kloseb9621712010-04-24 17:59:49 +00009996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9997$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009998fi
9999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010000
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010001 test -n "$TRUE" && break
10002done
10003test -n "$TRUE" || TRUE="/bin/true"
10004
10005
Matthias Kloseb9621712010-04-24 17:59:49 +000010006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10007$as_echo_n "checking for inet_aton in -lc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010008if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010009 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010010else
10011 ac_check_lib_save_LIBS=$LIBS
10012LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010014/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010016/* Override any GCC internal prototype to avoid an error.
10017 Use char because int might match the return type of a GCC
10018 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010019#ifdef __cplusplus
10020extern "C"
10021#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010022char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010023int
10024main ()
10025{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010026return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010027 ;
10028 return 0;
10029}
10030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010031if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010032 ac_cv_lib_c_inet_aton=yes
10033else
Matthias Kloseb9621712010-04-24 17:59:49 +000010034 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010036rm -f core conftest.err conftest.$ac_objext \
10037 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010038LIBS=$ac_check_lib_save_LIBS
10039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10041$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010042if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010043 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010044else
Matthias Kloseb9621712010-04-24 17:59:49 +000010045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10046$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010047if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010048 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010049else
10050 ac_check_lib_save_LIBS=$LIBS
10051LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010053/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010055/* Override any GCC internal prototype to avoid an error.
10056 Use char because int might match the return type of a GCC
10057 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010058#ifdef __cplusplus
10059extern "C"
10060#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010061char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010062int
10063main ()
10064{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010065return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010066 ;
10067 return 0;
10068}
10069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010070if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010071 ac_cv_lib_resolv_inet_aton=yes
10072else
Matthias Kloseb9621712010-04-24 17:59:49 +000010073 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010075rm -f core conftest.err conftest.$ac_objext \
10076 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010077LIBS=$ac_check_lib_save_LIBS
10078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10080$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010081if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010082 cat >>confdefs.h <<_ACEOF
10083#define HAVE_LIBRESOLV 1
10084_ACEOF
10085
10086 LIBS="-lresolv $LIBS"
10087
10088fi
10089
10090
10091fi
10092
10093
Christian Heimesd0764e22007-12-04 15:00:33 +000010094# On Tru64, chflags seems to be present, but calling it will
10095# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10097$as_echo_n "checking for chflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010098if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010099 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010100else
Matthias Kloseb9621712010-04-24 17:59:49 +000010101 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010102 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010103else
Matthias Kloseb9621712010-04-24 17:59:49 +000010104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010105/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010106
Christian Heimesd0764e22007-12-04 15:00:33 +000010107#include <sys/stat.h>
10108#include <unistd.h>
10109int main(int argc, char*argv[])
10110{
10111 if(chflags(argv[0], 0) != 0)
10112 return 1;
10113 return 0;
10114}
Ned Deily3eb67d52011-06-28 00:00:28 -070010115
Christian Heimesd0764e22007-12-04 15:00:33 +000010116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010117if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010118 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010119else
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10123 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010124fi
10125
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10129$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010130if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010131 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010132if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010133 ac_cv_have_chflags="yes"
10134else
10135 ac_cv_have_chflags="no"
10136fi
10137
10138fi
10139if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010140
Matthias Kloseb9621712010-04-24 17:59:49 +000010141$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010142
10143fi
10144
Matthias Kloseb9621712010-04-24 17:59:49 +000010145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10146$as_echo_n "checking for lchflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010147if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010149else
Matthias Kloseb9621712010-04-24 17:59:49 +000010150 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010151 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010152else
Matthias Kloseb9621712010-04-24 17:59:49 +000010153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010154/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010155
Christian Heimesd0764e22007-12-04 15:00:33 +000010156#include <sys/stat.h>
10157#include <unistd.h>
10158int main(int argc, char*argv[])
10159{
10160 if(lchflags(argv[0], 0) != 0)
10161 return 1;
10162 return 0;
10163}
Ned Deily3eb67d52011-06-28 00:00:28 -070010164
Christian Heimesd0764e22007-12-04 15:00:33 +000010165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010166if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010167 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010168else
Matthias Kloseb9621712010-04-24 17:59:49 +000010169 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10172 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010173fi
10174
10175
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10178$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010179if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010180 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010181if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010182 ac_cv_have_lchflags="yes"
10183else
10184 ac_cv_have_lchflags="no"
10185fi
10186
10187fi
10188if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010189
Matthias Kloseb9621712010-04-24 17:59:49 +000010190$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010191
10192fi
10193
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010194case $ac_sys_system/$ac_sys_release in
10195Darwin/*)
10196 _CUR_CFLAGS="${CFLAGS}"
10197 _CUR_LDFLAGS="${LDFLAGS}"
10198 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10199 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10200 ;;
10201esac
10202
Matthias Kloseb9621712010-04-24 17:59:49 +000010203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10204$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010205if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010207else
10208 ac_check_lib_save_LIBS=$LIBS
10209LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010211/* end confdefs.h. */
10212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010213/* Override any GCC internal prototype to avoid an error.
10214 Use char because int might match the return type of a GCC
10215 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010216#ifdef __cplusplus
10217extern "C"
10218#endif
10219char inflateCopy ();
10220int
10221main ()
10222{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010224 ;
10225 return 0;
10226}
10227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010228if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010229 ac_cv_lib_z_inflateCopy=yes
10230else
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010233rm -f core conftest.err conftest.$ac_objext \
10234 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010235LIBS=$ac_check_lib_save_LIBS
10236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10238$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010239if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010240
Matthias Kloseb9621712010-04-24 17:59:49 +000010241$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010242
10243fi
10244
10245
10246case $ac_sys_system/$ac_sys_release in
10247Darwin/*)
10248 CFLAGS="${_CUR_CFLAGS}"
10249 LDFLAGS="${_CUR_LDFLAGS}"
10250 ;;
10251esac
10252
Matthias Kloseb9621712010-04-24 17:59:49 +000010253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10254$as_echo_n "checking for hstrerror... " >&6; }
10255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010256/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010257
Martin v. Löwise9416172003-05-03 10:12:45 +000010258#include <netdb.h>
10259
Martin v. Löwise9416172003-05-03 10:12:45 +000010260int
10261main ()
10262{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010263void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010264 ;
10265 return 0;
10266}
10267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010268if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010269
Matthias Kloseb9621712010-04-24 17:59:49 +000010270$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010271
Matthias Kloseb159a552010-04-25 21:00:44 +000010272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010273$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010274else
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010277
10278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010279rm -f core conftest.err conftest.$ac_objext \
10280 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281
Matthias Kloseb9621712010-04-24 17:59:49 +000010282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10283$as_echo_n "checking for inet_aton... " >&6; }
10284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010285/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010286
Martin v. Löwis86d66262006-02-17 08:40:11 +000010287#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010288#include <sys/socket.h>
10289#include <netinet/in.h>
10290#include <arpa/inet.h>
10291
Martin v. Löwise9416172003-05-03 10:12:45 +000010292int
10293main ()
10294{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010295void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010296 ;
10297 return 0;
10298}
10299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010300if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010301
Matthias Kloseb9621712010-04-24 17:59:49 +000010302$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010303
Matthias Kloseb159a552010-04-25 21:00:44 +000010304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010305$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010306else
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10308$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010309
10310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010311rm -f core conftest.err conftest.$ac_objext \
10312 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010313
Matthias Kloseb9621712010-04-24 17:59:49 +000010314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10315$as_echo_n "checking for inet_pton... " >&6; }
10316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010317/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010318
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010319#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010320#include <sys/socket.h>
10321#include <netinet/in.h>
10322#include <arpa/inet.h>
10323
Martin v. Löwise9416172003-05-03 10:12:45 +000010324int
10325main ()
10326{
10327void* p = inet_pton
10328 ;
10329 return 0;
10330}
10331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010333
Matthias Kloseb9621712010-04-24 17:59:49 +000010334$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010335
Matthias Kloseb159a552010-04-25 21:00:44 +000010336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010337$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010338else
Matthias Kloseb9621712010-04-24 17:59:49 +000010339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10340$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010341
10342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010344
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010345# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10347$as_echo_n "checking for setgroups... " >&6; }
10348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010349/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010350
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010351#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010352#ifdef HAVE_GRP_H
10353#include <grp.h>
10354#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010355
Martin v. Löwisd5843682002-11-21 20:41:28 +000010356int
10357main ()
10358{
10359void* p = setgroups
10360 ;
10361 return 0;
10362}
10363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010365
Matthias Kloseb9621712010-04-24 17:59:49 +000010366$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010367
Matthias Kloseb159a552010-04-25 21:00:44 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010369$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010370else
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10372$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010373
10374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010376
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010377# check for openpty and forkpty
10378
10379for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010380do :
10381 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010382if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010383 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010384#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010385_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010386
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010387else
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10389$as_echo_n "checking for openpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010390if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010391 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010392else
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010394LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010398/* Override any GCC internal prototype to avoid an error.
10399 Use char because int might match the return type of a GCC
10400 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010401#ifdef __cplusplus
10402extern "C"
10403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010404char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010405int
10406main ()
10407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010409 ;
10410 return 0;
10411}
10412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010413if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010414 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010415else
Matthias Kloseb9621712010-04-24 17:59:49 +000010416 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010418rm -f core conftest.err conftest.$ac_objext \
10419 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010420LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10423$as_echo "$ac_cv_lib_util_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010424if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010425 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010426 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010427else
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10429$as_echo_n "checking for openpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010430if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010432else
10433 ac_check_lib_save_LIBS=$LIBS
10434LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010436/* end confdefs.h. */
10437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438/* Override any GCC internal prototype to avoid an error.
10439 Use char because int might match the return type of a GCC
10440 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010441#ifdef __cplusplus
10442extern "C"
10443#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010444char openpty ();
10445int
10446main ()
10447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010449 ;
10450 return 0;
10451}
10452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010454 ac_cv_lib_bsd_openpty=yes
10455else
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010458rm -f core conftest.err conftest.$ac_objext \
10459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010460LIBS=$ac_check_lib_save_LIBS
10461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10463$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010464if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010466 LIBS="$LIBS -lbsd"
10467fi
10468
10469
10470fi
10471
Fred Drake8cef4cf2000-06-28 16:40:38 +000010472
10473fi
10474done
10475
10476for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010477do :
10478 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010479if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010480 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010481#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010482_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010483
Fred Drake8cef4cf2000-06-28 16:40:38 +000010484else
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10486$as_echo_n "checking for forkpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010487if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010488 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010489else
Martin v. Löwis11437992002-04-12 09:54:03 +000010490 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010491LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495/* Override any GCC internal prototype to avoid an error.
10496 Use char because int might match the return type of a GCC
10497 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010498#ifdef __cplusplus
10499extern "C"
10500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010501char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010502int
10503main ()
10504{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010506 ;
10507 return 0;
10508}
10509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010510if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010511 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010512else
Matthias Kloseb9621712010-04-24 17:59:49 +000010513 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010515rm -f core conftest.err conftest.$ac_objext \
10516 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010517LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10520$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010521if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010522 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010523 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010524else
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10526$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010527if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010529else
10530 ac_check_lib_save_LIBS=$LIBS
10531LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010533/* end confdefs.h. */
10534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535/* Override any GCC internal prototype to avoid an error.
10536 Use char because int might match the return type of a GCC
10537 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010538#ifdef __cplusplus
10539extern "C"
10540#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010541char forkpty ();
10542int
10543main ()
10544{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010545return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010546 ;
10547 return 0;
10548}
10549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010550if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010551 ac_cv_lib_bsd_forkpty=yes
10552else
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010555rm -f core conftest.err conftest.$ac_objext \
10556 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010557LIBS=$ac_check_lib_save_LIBS
10558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10560$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010561if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010563 LIBS="$LIBS -lbsd"
10564fi
10565
10566
10567fi
10568
Fred Drake8cef4cf2000-06-28 16:40:38 +000010569
10570fi
10571done
10572
Jack Jansendd19cf82001-12-06 22:36:17 +000010573
Christian Heimesb186d002008-03-18 15:15:01 +000010574# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010575for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010576do :
10577 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Gregory P. Smith69140482012-01-16 02:05:55 -080010578if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010579 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010580#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010581_ACEOF
10582
10583fi
10584done
10585
10586
Michael W. Hudson54241132001-12-07 15:38:26 +000010587# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010588for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010589do :
10590 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10591ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010592if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010594#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010595_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010596
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010597fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010598done
10599
Michael W. Hudson54241132001-12-07 15:38:26 +000010600
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010601ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Gregory P. Smith69140482012-01-16 02:05:55 -080010602if test "x$ac_cv_func_dup2" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010603 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010604
Martin v. Löwis1142de32002-03-29 16:28:31 +000010605else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010606 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010607 *" dup2.$ac_objext "* ) ;;
10608 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010609 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010610esac
10611
Martin v. Löwis1142de32002-03-29 16:28:31 +000010612fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010613
10614ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Gregory P. Smith69140482012-01-16 02:05:55 -080010615if test "x$ac_cv_func_getcwd" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010616 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10617
10618else
10619 case " $LIBOBJS " in
10620 *" getcwd.$ac_objext "* ) ;;
10621 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10622 ;;
10623esac
10624
10625fi
10626
10627ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Gregory P. Smith69140482012-01-16 02:05:55 -080010628if test "x$ac_cv_func_strdup" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010629 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10630
10631else
10632 case " $LIBOBJS " in
10633 *" strdup.$ac_objext "* ) ;;
10634 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10635 ;;
10636esac
10637
10638fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010639
10640
10641for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010642do :
10643 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010644if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010646#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010649/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010650#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010651int
10652main ()
10653{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010654getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010655 ;
10656 return 0;
10657}
10658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010659if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010660
Matthias Kloseb9621712010-04-24 17:59:49 +000010661$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010662
Guido van Rossum627b2d71993-12-24 10:39:16 +000010663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010665
Guido van Rossum627b2d71993-12-24 10:39:16 +000010666fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010667done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010668
Jack Jansen150753c2003-03-29 22:07:47 +000010669for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010670do :
10671 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010672if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010673 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010674#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010677/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010678#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010679int
10680main ()
10681{
10682setpgrp(0,0);
10683 ;
10684 return 0;
10685}
10686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010687if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010688
Matthias Kloseb9621712010-04-24 17:59:49 +000010689$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010690
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010693
10694fi
10695done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010696
Thomas Wouters3a584202000-08-05 23:28:51 +000010697for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010698do :
10699 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Gregory P. Smith69140482012-01-16 02:05:55 -080010700if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010701 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010702#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010705/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010706#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010707int
10708main ()
10709{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010710gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 ;
10712 return 0;
10713}
10714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010715if ac_fn_c_try_compile "$LINENO"; then :
10716
Guido van Rossum627b2d71993-12-24 10:39:16 +000010717else
Skip Montanaro6dead952003-09-25 14:50:04 +000010718
Matthias Kloseb9621712010-04-24 17:59:49 +000010719$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010720
Martin v. Löwis11437992002-04-12 09:54:03 +000010721
Guido van Rossum627b2d71993-12-24 10:39:16 +000010722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010724
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010725fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010726done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010727
Michael W. Hudson54241132001-12-07 15:38:26 +000010728
Matthias Kloseb9621712010-04-24 17:59:49 +000010729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10730$as_echo_n "checking for major... " >&6; }
10731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010733
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010734#if defined(MAJOR_IN_MKDEV)
10735#include <sys/mkdev.h>
10736#elif defined(MAJOR_IN_SYSMACROS)
10737#include <sys/sysmacros.h>
10738#else
10739#include <sys/types.h>
10740#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010741
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010742int
10743main ()
10744{
10745
10746 makedev(major(0),minor(0));
10747
10748 ;
10749 return 0;
10750}
10751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010753
10754
Matthias Kloseb9621712010-04-24 17:59:49 +000010755$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010756
Matthias Kloseb9621712010-04-24 17:59:49 +000010757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10758$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010759
10760else
Skip Montanaro6dead952003-09-25 14:50:04 +000010761
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10763$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010764
10765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010766rm -f core conftest.err conftest.$ac_objext \
10767 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010768
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010769# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010770# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10772$as_echo_n "checking for getaddrinfo... " >&6; }
10773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010774/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010775
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010776#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010777#include <sys/socket.h>
10778#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010779#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010780
Martin v. Löwis11437992002-04-12 09:54:03 +000010781int
10782main ()
10783{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010784getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010785 ;
10786 return 0;
10787}
10788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010789if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010790 have_getaddrinfo=yes
10791else
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010794rm -f core conftest.err conftest.$ac_objext \
10795 conftest$ac_exeext conftest.$ac_ext
10796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10797$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010798if test $have_getaddrinfo = yes
10799then
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10801$as_echo_n "checking getaddrinfo bug... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010802 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010804else
Matthias Kloseb9621712010-04-24 17:59:49 +000010805 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010806 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010807else
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010809/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010810
10811#include <sys/types.h>
10812#include <netdb.h>
10813#include <string.h>
10814#include <sys/socket.h>
10815#include <netinet/in.h>
10816
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010817int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010818{
10819 int passive, gaierr, inet4 = 0, inet6 = 0;
10820 struct addrinfo hints, *ai, *aitop;
10821 char straddr[INET6_ADDRSTRLEN], strport[16];
10822
10823 for (passive = 0; passive <= 1; passive++) {
10824 memset(&hints, 0, sizeof(hints));
10825 hints.ai_family = AF_UNSPEC;
10826 hints.ai_flags = passive ? AI_PASSIVE : 0;
10827 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010828 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010829 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10830 (void)gai_strerror(gaierr);
10831 goto bad;
10832 }
10833 for (ai = aitop; ai; ai = ai->ai_next) {
10834 if (ai->ai_addr == NULL ||
10835 ai->ai_addrlen == 0 ||
10836 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10837 straddr, sizeof(straddr), strport, sizeof(strport),
10838 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10839 goto bad;
10840 }
10841 switch (ai->ai_family) {
10842 case AF_INET:
10843 if (strcmp(strport, "54321") != 0) {
10844 goto bad;
10845 }
10846 if (passive) {
10847 if (strcmp(straddr, "0.0.0.0") != 0) {
10848 goto bad;
10849 }
10850 } else {
10851 if (strcmp(straddr, "127.0.0.1") != 0) {
10852 goto bad;
10853 }
10854 }
10855 inet4++;
10856 break;
10857 case AF_INET6:
10858 if (strcmp(strport, "54321") != 0) {
10859 goto bad;
10860 }
10861 if (passive) {
10862 if (strcmp(straddr, "::") != 0) {
10863 goto bad;
10864 }
10865 } else {
10866 if (strcmp(straddr, "::1") != 0) {
10867 goto bad;
10868 }
10869 }
10870 inet6++;
10871 break;
10872 case AF_UNSPEC:
10873 goto bad;
10874 break;
10875 default:
10876 /* another family support? */
10877 break;
10878 }
10879 }
10880 }
10881
10882 if (!(inet4 == 0 || inet4 == 2))
10883 goto bad;
10884 if (!(inet6 == 0 || inet6 == 2))
10885 goto bad;
10886
10887 if (aitop)
10888 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010889 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010890
10891 bad:
10892 if (aitop)
10893 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010894 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010895}
10896
Martin v. Löwis11437992002-04-12 09:54:03 +000010897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010898if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010899 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010900else
Matthias Kloseb9621712010-04-24 17:59:49 +000010901 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10904 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010906
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010907fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010908
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010910
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10912$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10913
Mark Dickinson2df5d282009-12-31 21:22:50 +000010914if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010915then
10916 if test $ipv6 = yes
10917 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010918 echo 'Fatal: You must get working getaddrinfo() function.'
10919 echo ' or you can specify "--disable-ipv6"'.
10920 exit 1
10921 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010922else
Martin v. Löwis11437992002-04-12 09:54:03 +000010923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010925
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010926fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010927
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010928for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010929do :
10930 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Gregory P. Smith69140482012-01-16 02:05:55 -080010931if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010932 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010933#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010934_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010935
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010936fi
10937done
10938
Michael W. Hudson54241132001-12-07 15:38:26 +000010939
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010940# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10942$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010943if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010944 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010945else
Matthias Kloseb9621712010-04-24 17:59:49 +000010946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010947/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010948#include <sys/types.h>
10949#include <sys/time.h>
10950#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010951
Martin v. Löwis11437992002-04-12 09:54:03 +000010952int
10953main ()
10954{
10955if ((struct tm *) 0)
10956return 0;
10957 ;
10958 return 0;
10959}
10960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010961if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010962 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010963else
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10969$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010970if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010971
Matthias Kloseb9621712010-04-24 17:59:49 +000010972$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010973
10974fi
10975
Matthias Kloseb9621712010-04-24 17:59:49 +000010976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10977$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010978if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010980else
Matthias Kloseb9621712010-04-24 17:59:49 +000010981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010982/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010983#include <sys/types.h>
10984#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010985
Martin v. Löwis11437992002-04-12 09:54:03 +000010986int
10987main ()
10988{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010989struct tm tm;
10990 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010991 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 ;
10993 return 0;
10994}
10995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010996if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010997 ac_cv_struct_tm=time.h
10998else
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11004$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011005if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011006
Matthias Kloseb9621712010-04-24 17:59:49 +000011007$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011008
11009fi
11010
Matthias Kloseb9621712010-04-24 17:59:49 +000011011ac_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 +000011012#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014"
Gregory P. Smith69140482012-01-16 02:05:55 -080011015if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011016
11017cat >>confdefs.h <<_ACEOF
11018#define HAVE_STRUCT_TM_TM_ZONE 1
11019_ACEOF
11020
11021
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011022fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011023
Martin v. Löwis11437992002-04-12 09:54:03 +000011024if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11025
Matthias Kloseb9621712010-04-24 17:59:49 +000011026$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011027
11028else
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11030"
Gregory P. Smith69140482012-01-16 02:05:55 -080011031if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033else
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011035fi
11036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011038#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011039_ACEOF
11040
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11042$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011043if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011044 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045else
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011047/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011048#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011049#if !HAVE_DECL_TZNAME
11050extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011052
Martin v. Löwis11437992002-04-12 09:54:03 +000011053int
11054main ()
11055{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011056return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 ;
11058 return 0;
11059}
11060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011061if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011062 ac_cv_var_tzname=yes
11063else
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011066rm -f core conftest.err conftest.$ac_objext \
11067 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11070$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011071 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011072
Matthias Kloseb9621712010-04-24 17:59:49 +000011073$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011074
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011075 fi
11076fi
11077
Matthias Kloseb9621712010-04-24 17:59:49 +000011078ac_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 -080011079if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011080
11081cat >>confdefs.h <<_ACEOF
11082#define HAVE_STRUCT_STAT_ST_RDEV 1
11083_ACEOF
11084
11085
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011086fi
11087
Matthias Kloseb9621712010-04-24 17:59:49 +000011088ac_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 -080011089if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011090
Martin v. Löwis11437992002-04-12 09:54:03 +000011091cat >>confdefs.h <<_ACEOF
11092#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11093_ACEOF
11094
11095
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011096fi
11097
Matthias Kloseb9621712010-04-24 17:59:49 +000011098ac_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 -080011099if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011100
11101cat >>confdefs.h <<_ACEOF
11102#define HAVE_STRUCT_STAT_ST_FLAGS 1
11103_ACEOF
11104
11105
11106fi
11107
Matthias Kloseb9621712010-04-24 17:59:49 +000011108ac_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 -080011109if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011110
11111cat >>confdefs.h <<_ACEOF
11112#define HAVE_STRUCT_STAT_ST_GEN 1
11113_ACEOF
11114
11115
11116fi
11117
Matthias Kloseb9621712010-04-24 17:59:49 +000011118ac_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 -080011119if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011120
11121cat >>confdefs.h <<_ACEOF
11122#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11123_ACEOF
11124
11125
11126fi
11127
Matthias Kloseb9621712010-04-24 17:59:49 +000011128ac_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 -080011129if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011130
Martin v. Löwis11437992002-04-12 09:54:03 +000011131cat >>confdefs.h <<_ACEOF
11132#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11133_ACEOF
11134
11135
Matthias Kloseb9621712010-04-24 17:59:49 +000011136$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011137
11138else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011139 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011140 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011141 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11142 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011143esac
11144
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011145fi
11146
Michael W. Hudson54241132001-12-07 15:38:26 +000011147
Martin v. Löwis11437992002-04-12 09:54:03 +000011148
Matthias Kloseb9621712010-04-24 17:59:49 +000011149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11150$as_echo_n "checking for time.h that defines altzone... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011151if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011153else
Matthias Kloseb159a552010-04-25 21:00:44 +000011154
Matthias Kloseb9621712010-04-24 17:59:49 +000011155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011156/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011157#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011158int
11159main ()
11160{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011162 ;
11163 return 0;
11164}
11165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011166if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011167 ac_cv_header_time_altzone=yes
11168else
Matthias Kloseb9621712010-04-24 17:59:49 +000011169 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011173fi
11174
Matthias Kloseb9621712010-04-24 17:59:49 +000011175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11176$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011177if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011178
Matthias Kloseb9621712010-04-24 17:59:49 +000011179$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011180
11181fi
11182
Guido van Rossumda88dad1995-01-26 00:46:29 +000011183was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11185$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011187/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011188
11189#include <sys/types.h>
11190#include <sys/select.h>
11191#include <sys/time.h>
11192
Martin v. Löwis11437992002-04-12 09:54:03 +000011193int
11194main ()
11195{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011196;
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 ;
11198 return 0;
11199}
11200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011201if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011202
11203
Matthias Kloseb9621712010-04-24 17:59:49 +000011204$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011205
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011206 was_it_defined=yes
11207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11211$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011212
Matthias Kloseb9621712010-04-24 17:59:49 +000011213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11214$as_echo_n "checking for addrinfo... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011215if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011216 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011217else
Matthias Kloseb9621712010-04-24 17:59:49 +000011218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011219/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011220#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011221int
11222main ()
11223{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011224struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 ;
11226 return 0;
11227}
11228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011229if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011230 ac_cv_struct_addrinfo=yes
11231else
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11235fi
11236
Matthias Kloseb9621712010-04-24 17:59:49 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11238$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011239if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011240
Matthias Kloseb9621712010-04-24 17:59:49 +000011241$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011242
11243fi
11244
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11246$as_echo_n "checking for sockaddr_storage... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011247if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011248 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011249else
Matthias Kloseb9621712010-04-24 17:59:49 +000011250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011251/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011252
11253# include <sys/types.h>
11254# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011255int
11256main ()
11257{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011258struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 ;
11260 return 0;
11261}
11262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011263if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011264 ac_cv_struct_sockaddr_storage=yes
11265else
Matthias Kloseb9621712010-04-24 17:59:49 +000011266 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11269fi
11270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11272$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011273if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011274
Matthias Kloseb9621712010-04-24 17:59:49 +000011275$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011276
11277fi
11278
Guido van Rossum627b2d71993-12-24 10:39:16 +000011279# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011280
Matthias Kloseb9621712010-04-24 17:59:49 +000011281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11282$as_echo_n "checking whether char is unsigned... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011283if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011284 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011285else
Matthias Kloseb9621712010-04-24 17:59:49 +000011286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011288$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011289int
11290main ()
11291{
11292static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011293test_array [0] = 0;
11294return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
11296 ;
11297 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011298}
Martin v. Löwis11437992002-04-12 09:54:03 +000011299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011300if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011301 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011302else
Matthias Kloseb9621712010-04-24 17:59:49 +000011303 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011306fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11308$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011309if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011310 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011311
11312fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011313
Matthias Kloseb9621712010-04-24 17:59:49 +000011314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11315$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011316if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011317 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011318else
Matthias Kloseb9621712010-04-24 17:59:49 +000011319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011320/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011321
Martin v. Löwis11437992002-04-12 09:54:03 +000011322int
11323main ()
11324{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011325
Martin v. Löwis11437992002-04-12 09:54:03 +000011326#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011327 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011329 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011330 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011331 char const *const *pcpcc;
11332 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 /* NEC SVR4.0.2 mips cc rejects this. */
11334 struct point {int x, y;};
11335 static struct point const zero = {0,0};
11336 /* AIX XL C 1.02.0.0 rejects this.
11337 It does not let you subtract one const X* pointer from another in
11338 an arm of an if-expression whose if-part is not a constant
11339 expression */
11340 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011341 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011343 ++pcpcc;
11344 ppc = (char**) pcpcc;
11345 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011346 { /* SCO 3.2v4 cc rejects this sort of thing. */
11347 char tx;
11348 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011349 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011350
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011352 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011353 }
11354 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11355 int x[] = {25, 17};
11356 const int *foo = &x[0];
11357 ++foo;
11358 }
11359 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11360 typedef const int *iptr;
11361 iptr p = 0;
11362 ++p;
11363 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011364 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011366 struct s { int j; const int *ap[3]; } bx;
11367 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011368 }
11369 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11370 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011371 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011373 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011374#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011375
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 ;
11377 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011378}
Martin v. Löwis11437992002-04-12 09:54:03 +000011379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011380if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011381 ac_cv_c_const=yes
11382else
Matthias Kloseb9621712010-04-24 17:59:49 +000011383 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11388$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011389if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011392
11393fi
11394
Michael W. Hudson54241132001-12-07 15:38:26 +000011395
Guido van Rossumda88dad1995-01-26 00:46:29 +000011396works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11398$as_echo_n "checking for working volatile... " >&6; }
11399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011400/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011401
Martin v. Löwis11437992002-04-12 09:54:03 +000011402int
11403main ()
11404{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011405volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 ;
11407 return 0;
11408}
11409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011410if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011411 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011412else
Skip Montanaro6dead952003-09-25 14:50:04 +000011413
Matthias Kloseb9621712010-04-24 17:59:49 +000011414$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011415
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011416
Guido van Rossum627b2d71993-12-24 10:39:16 +000011417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11420$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011421
Guido van Rossumda88dad1995-01-26 00:46:29 +000011422works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11424$as_echo_n "checking for working signed char... " >&6; }
11425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011426/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011427
Martin v. Löwis11437992002-04-12 09:54:03 +000011428int
11429main ()
11430{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011431signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 ;
11433 return 0;
11434}
11435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011436if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011437 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011438else
Skip Montanaro6dead952003-09-25 14:50:04 +000011439
Matthias Kloseb9621712010-04-24 17:59:49 +000011440$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011441
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011442
Guido van Rossum7f43da71994-08-01 12:15:30 +000011443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11446$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011447
Guido van Rossumda88dad1995-01-26 00:46:29 +000011448have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11450$as_echo_n "checking for prototypes... " >&6; }
11451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011452/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011453int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011454int
11455main ()
11456{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011457return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011458 ;
11459 return 0;
11460}
11461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011462if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
Matthias Kloseb9621712010-04-24 17:59:49 +000011464$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011465
Matthias Kloseb159a552010-04-25 21:00:44 +000011466 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11470$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011471
Guido van Rossumda88dad1995-01-26 00:46:29 +000011472works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11474$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011476/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011477
11478#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011479int foo(int x, ...) {
11480 va_list va;
11481 va_start(va, x);
11482 va_arg(va, int);
11483 va_arg(va, char *);
11484 va_arg(va, double);
11485 return 0;
11486}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011487
Martin v. Löwis11437992002-04-12 09:54:03 +000011488int
11489main ()
11490{
Guido van Rossum90eea071996-08-30 20:58:57 +000011491return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011492 ;
11493 return 0;
11494}
11495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011496if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011497
11498
Matthias Kloseb9621712010-04-24 17:59:49 +000011499$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011500
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011501 works=yes
11502
Guido van Rossum627b2d71993-12-24 10:39:16 +000011503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11506$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011507
Martin v. Löwisd6320502004-08-12 13:45:08 +000011508# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11510$as_echo_n "checking for socketpair... " >&6; }
11511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011512/* end confdefs.h. */
11513
11514#include <sys/types.h>
11515#include <sys/socket.h>
11516
11517int
11518main ()
11519{
11520void *x=socketpair
11521 ;
11522 return 0;
11523}
11524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011525if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011526
Matthias Kloseb9621712010-04-24 17:59:49 +000011527$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011528
Matthias Kloseb159a552010-04-25 21:00:44 +000011529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011530$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011531else
Matthias Kloseb9621712010-04-24 17:59:49 +000011532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11533$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011534
11535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011537
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011538# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11540$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011542/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011543#include <sys/types.h>
11544#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011545int
11546main ()
11547{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011548struct sockaddr x;
11549x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011550 ;
11551 return 0;
11552}
11553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011554if ac_fn_c_try_compile "$LINENO"; then :
11555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11556$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
Matthias Kloseb9621712010-04-24 17:59:49 +000011558$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011559
11560else
Matthias Kloseb9621712010-04-24 17:59:49 +000011561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11562$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011563
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011566
Guido van Rossumda88dad1995-01-26 00:46:29 +000011567va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11569$as_echo_n "checking whether va_list is an array... " >&6; }
11570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011572
11573#ifdef HAVE_STDARG_PROTOTYPES
11574#include <stdarg.h>
11575#else
11576#include <varargs.h>
11577#endif
11578
Martin v. Löwis11437992002-04-12 09:54:03 +000011579int
11580main ()
11581{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011582va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 ;
11584 return 0;
11585}
11586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011587if ac_fn_c_try_compile "$LINENO"; then :
11588
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011589else
Skip Montanaro6dead952003-09-25 14:50:04 +000011590
Martin v. Löwis11437992002-04-12 09:54:03 +000011591
Matthias Kloseb9621712010-04-24 17:59:49 +000011592$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011593
Guido van Rossumda88dad1995-01-26 00:46:29 +000011594 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011595
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11599$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011600
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011601# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011602
11603
Matthias Kloseb9621712010-04-24 17:59:49 +000011604ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Gregory P. Smith69140482012-01-16 02:05:55 -080011605if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011606
Matthias Kloseb9621712010-04-24 17:59:49 +000011607 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011608
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11610$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011611 OLD_CFLAGS=$CFLAGS
11612 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011614/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011615
11616# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011617
Martin v. Löwis11437992002-04-12 09:54:03 +000011618int
11619main ()
11620{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011621
11622 char *name;
11623 struct hostent *he, *res;
11624 char buffer[2048];
11625 int buflen = 2048;
11626 int h_errnop;
11627
11628 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011629
11630 ;
11631 return 0;
11632}
11633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011634if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011635
Matthias Kloseb9621712010-04-24 17:59:49 +000011636 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011637
Martin v. Löwis11437992002-04-12 09:54:03 +000011638
Matthias Kloseb9621712010-04-24 17:59:49 +000011639$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011640
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11642$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011643
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011644else
Skip Montanaro6dead952003-09-25 14:50:04 +000011645
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11647$as_echo "no" >&6; }
11648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11649$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011651/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011652
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011653# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011654
Martin v. Löwis11437992002-04-12 09:54:03 +000011655int
11656main ()
11657{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011658
11659 char *name;
11660 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011661 char buffer[2048];
11662 int buflen = 2048;
11663 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011664
Matthias Kloseb159a552010-04-25 21:00:44 +000011665 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011666
11667 ;
11668 return 0;
11669}
11670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011671if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011672
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011674
Martin v. Löwis11437992002-04-12 09:54:03 +000011675
Matthias Kloseb159a552010-04-25 21:00:44 +000011676$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011677
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11679$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011680
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011681else
Skip Montanaro6dead952003-09-25 14:50:04 +000011682
Matthias Kloseb9621712010-04-24 17:59:49 +000011683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11684$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11686$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11688/* end confdefs.h. */
11689
11690# include <netdb.h>
11691
11692int
11693main ()
11694{
11695
11696 char *name;
11697 struct hostent *he;
11698 struct hostent_data data;
11699
11700 (void) gethostbyname_r(name, he, &data);
11701
11702 ;
11703 return 0;
11704}
11705_ACEOF
11706if ac_fn_c_try_compile "$LINENO"; then :
11707
11708 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11709
11710
11711$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11712
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11714$as_echo "yes" >&6; }
11715
11716else
11717
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11719$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011720
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011723
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011726
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011729 CFLAGS=$OLD_CFLAGS
11730
11731else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011732
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 for ac_func in gethostbyname
11734do :
11735 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Gregory P. Smith69140482012-01-16 02:05:55 -080011736if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011737 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011738#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011739_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011740
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011741fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011742done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011743
Michael W. Hudson54241132001-12-07 15:38:26 +000011744
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011745fi
11746
Michael W. Hudson54241132001-12-07 15:38:26 +000011747
11748
11749
11750
11751
11752
Guido van Rossum627b2d71993-12-24 10:39:16 +000011753# checks for system services
11754# (none yet)
11755
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011756# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011757ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Gregory P. Smith69140482012-01-16 02:05:55 -080011758if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011759
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011760else
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11762$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011763if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011765else
Martin v. Löwis11437992002-04-12 09:54:03 +000011766 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011767LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011771/* Override any GCC internal prototype to avoid an error.
11772 Use char because int might match the return type of a GCC
11773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011774#ifdef __cplusplus
11775extern "C"
11776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011777char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011778int
11779main ()
11780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011781return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 ;
11783 return 0;
11784}
11785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011791rm -f core conftest.err conftest.$ac_objext \
11792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011793LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11796$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011797if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011798 cat >>confdefs.h <<_ACEOF
11799#define HAVE_LIBIEEE 1
11800_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011801
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011802 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011803
Guido van Rossum627b2d71993-12-24 10:39:16 +000011804fi
11805
Michael W. Hudson54241132001-12-07 15:38:26 +000011806
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011807fi
11808
Michael W. Hudson54241132001-12-07 15:38:26 +000011809
Guido van Rossum7f253911997-05-09 02:42:48 +000011810# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11812$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011814# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011815if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011816 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011817if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011818then
11819
Matthias Kloseb9621712010-04-24 17:59:49 +000011820$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011821
Matthias Kloseb9621712010-04-24 17:59:49 +000011822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11823$as_echo "yes" >&6; }
11824else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11825$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011826fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011827else
Matthias Kloseb9621712010-04-24 17:59:49 +000011828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11829$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011830fi
11831
Guido van Rossum7f253911997-05-09 02:42:48 +000011832
Guido van Rossum7f43da71994-08-01 12:15:30 +000011833# check for --with-libm=...
11834
Guido van Rossum563e7081996-09-10 18:20:48 +000011835case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011836Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011837*) LIBM=-lm
11838esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11840$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011842# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011843if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011844 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011845if test "$withval" = no
11846then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11848$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011849elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011850then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11852$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011853else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011854fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011855else
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11857$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011858fi
11859
Guido van Rossum7f43da71994-08-01 12:15:30 +000011860
11861# check for --with-libc=...
11862
Matthias Kloseb9621712010-04-24 17:59:49 +000011863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11864$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011866# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011867if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011868 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011869if test "$withval" = no
11870then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11872$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011873elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011874then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11876$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011877else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011878fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11881$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011882fi
11883
Guido van Rossum7f43da71994-08-01 12:15:30 +000011884
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011885# **************************************************
11886# * Check for various properties of floating point *
11887# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011888
Matthias Kloseb9621712010-04-24 17:59:49 +000011889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11890$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011891if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011892 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011893else
11894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011896 ac_cv_little_endian_double=no
11897else
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011899/* end confdefs.h. */
11900
11901#include <string.h>
11902int main() {
11903 double x = 9006104071832581.0;
11904 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11905 return 0;
11906 else
11907 return 1;
11908}
11909
11910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011911if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011912 ac_cv_little_endian_double=yes
11913else
Matthias Kloseb9621712010-04-24 17:59:49 +000011914 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11917 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011918fi
11919
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011920fi
11921
Matthias Kloseb9621712010-04-24 17:59:49 +000011922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11923$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011924if test "$ac_cv_little_endian_double" = yes
11925then
11926
Matthias Kloseb9621712010-04-24 17:59:49 +000011927$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011928
11929fi
11930
Matthias Kloseb9621712010-04-24 17:59:49 +000011931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11932$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011933if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011934 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011935else
11936
Matthias Kloseb9621712010-04-24 17:59:49 +000011937if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011938 ac_cv_big_endian_double=no
11939else
Matthias Kloseb9621712010-04-24 17:59:49 +000011940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011941/* end confdefs.h. */
11942
11943#include <string.h>
11944int main() {
11945 double x = 9006104071832581.0;
11946 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11947 return 0;
11948 else
11949 return 1;
11950}
11951
11952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011953if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011954 ac_cv_big_endian_double=yes
11955else
Matthias Kloseb9621712010-04-24 17:59:49 +000011956 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011958rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11959 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011960fi
11961
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011962fi
11963
Matthias Kloseb9621712010-04-24 17:59:49 +000011964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11965$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011966if test "$ac_cv_big_endian_double" = yes
11967then
11968
Matthias Kloseb9621712010-04-24 17:59:49 +000011969$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011970
11971fi
11972
11973# Some ARM platforms use a mixed-endian representation for doubles.
11974# While Python doesn't currently have full support for these platforms
11975# (see e.g., issue 1762561), we can at least make sure that float <-> string
11976# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11978$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011979if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011980 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011981else
11982
Matthias Kloseb9621712010-04-24 17:59:49 +000011983if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011984 ac_cv_mixed_endian_double=no
11985else
Matthias Kloseb9621712010-04-24 17:59:49 +000011986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011987/* end confdefs.h. */
11988
11989#include <string.h>
11990int main() {
11991 double x = 9006104071832581.0;
11992 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11993 return 0;
11994 else
11995 return 1;
11996}
11997
11998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011999if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012000 ac_cv_mixed_endian_double=yes
12001else
Matthias Kloseb9621712010-04-24 17:59:49 +000012002 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12005 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012006fi
12007
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012008fi
12009
Matthias Kloseb9621712010-04-24 17:59:49 +000012010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12011$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012012if test "$ac_cv_mixed_endian_double" = yes
12013then
12014
Matthias Kloseb9621712010-04-24 17:59:49 +000012015$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012016
12017fi
12018
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012019# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012020# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012021# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012022# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012023# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012024# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012025
12026# This inline assembler syntax may also work for suncc and icc,
12027# so we try it on all platforms.
12028
Matthias Kloseb9621712010-04-24 17:59:49 +000012029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12030$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012032/* end confdefs.h. */
12033
12034int
12035main ()
12036{
12037
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012038 unsigned short cw;
12039 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12040 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012041
12042 ;
12043 return 0;
12044}
12045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012046if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012047 have_gcc_asm_for_x87=yes
12048else
Matthias Kloseb9621712010-04-24 17:59:49 +000012049 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012050fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12053$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012054if test "$have_gcc_asm_for_x87" = yes
12055then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012056
Matthias Kloseb9621712010-04-24 17:59:49 +000012057$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012058
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012060
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012061# Detect whether system arithmetic is subject to x87-style double
12062# rounding issues. The result of this test has little meaning on non
12063# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12064# mode is round-to-nearest and double rounding issues are present, and
12065# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12067$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012068# $BASECFLAGS may affect the result
12069ac_save_cc="$CC"
12070CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012071if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012072 ac_cv_x87_double_rounding=no
12073else
Matthias Kloseb9621712010-04-24 17:59:49 +000012074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012075/* end confdefs.h. */
12076
12077#include <stdlib.h>
12078#include <math.h>
12079int main() {
12080 volatile double x, y, z;
12081 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12082 x = 0.99999999999999989; /* 1-2**-53 */
12083 y = 1./x;
12084 if (y != 1.)
12085 exit(0);
12086 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12087 x = 1e16;
12088 y = 2.99999;
12089 z = x + y;
12090 if (z != 1e16+4.)
12091 exit(0);
12092 /* both tests show evidence of double rounding */
12093 exit(1);
12094}
12095
12096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012097if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012098 ac_cv_x87_double_rounding=no
12099else
Matthias Kloseb9621712010-04-24 17:59:49 +000012100 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12103 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012104fi
12105
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012106CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12108$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012109if test "$ac_cv_x87_double_rounding" = yes
12110then
12111
Matthias Kloseb9621712010-04-24 17:59:49 +000012112$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012113
12114fi
12115
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012116# ************************************
12117# * Check for mathematical functions *
12118# ************************************
12119
12120LIBS_SAVE=$LIBS
12121LIBS="$LIBS $LIBM"
12122
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012123for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12124do :
12125 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12126ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012127if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012128 cat >>confdefs.h <<_ACEOF
12129#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12130_ACEOF
12131
12132fi
12133done
12134
12135for ac_func in hypot lgamma log1p round tgamma
12136do :
12137 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12138ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012139if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012140 cat >>confdefs.h <<_ACEOF
12141#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12142_ACEOF
12143
12144fi
12145done
12146
12147ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12148"
Gregory P. Smith69140482012-01-16 02:05:55 -080012149if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012150 ac_have_decl=1
12151else
12152 ac_have_decl=0
12153fi
12154
12155cat >>confdefs.h <<_ACEOF
12156#define HAVE_DECL_ISINF $ac_have_decl
12157_ACEOF
12158ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12159"
Gregory P. Smith69140482012-01-16 02:05:55 -080012160if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012161 ac_have_decl=1
12162else
12163 ac_have_decl=0
12164fi
12165
12166cat >>confdefs.h <<_ACEOF
12167#define HAVE_DECL_ISNAN $ac_have_decl
12168_ACEOF
12169ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12170"
Gregory P. Smith69140482012-01-16 02:05:55 -080012171if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012172 ac_have_decl=1
12173else
12174 ac_have_decl=0
12175fi
12176
12177cat >>confdefs.h <<_ACEOF
12178#define HAVE_DECL_ISFINITE $ac_have_decl
12179_ACEOF
12180
12181
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012182# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12183# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12185$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012186if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012188else
12189
Matthias Kloseb9621712010-04-24 17:59:49 +000012190if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012191 ac_cv_tanh_preserves_zero_sign=no
12192else
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012194/* end confdefs.h. */
12195
12196#include <math.h>
12197#include <stdlib.h>
12198int main() {
12199 /* return 0 if either negative zeros don't exist
12200 on this platform or if negative zeros exist
12201 and tanh(-0.) == -0. */
12202 if (atan2(0., -1.) == atan2(-0., -1.) ||
12203 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12204 else exit(1);
12205}
12206
12207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012208if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012209 ac_cv_tanh_preserves_zero_sign=yes
12210else
Matthias Kloseb9621712010-04-24 17:59:49 +000012211 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12214 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012215fi
12216
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012217fi
12218
Matthias Kloseb9621712010-04-24 17:59:49 +000012219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12220$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012221if test "$ac_cv_tanh_preserves_zero_sign" = yes
12222then
12223
Matthias Kloseb9621712010-04-24 17:59:49 +000012224$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012225
12226fi
12227
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012228if test "$ac_cv_func_log1p" = yes
12229then
12230 # On some versions of AIX, log1p(-0.) returns 0. instead of
12231 # -0. See issue #9920.
12232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12233$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012234 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012235 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012236else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012237
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012238 if test "$cross_compiling" = yes; then :
12239 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012240else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12242/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012243
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012244 #include <math.h>
12245 #include <stdlib.h>
12246 int main() {
12247 /* Fail if the signs of log1p(-0.) and -0. can be
12248 distinguished. */
12249 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12250 return 0;
12251 else
12252 return 1;
12253 }
12254
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012255_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012256if ac_fn_c_try_run "$LINENO"; then :
12257 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012258else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012259 ac_cv_log1p_drops_zero_sign=yes
12260fi
12261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12262 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012263fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012264
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012265fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012266
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12268$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12269fi
12270if test "$ac_cv_log1p_drops_zero_sign" = yes
12271then
12272
12273$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12274
12275fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012276
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012277LIBS=$LIBS_SAVE
12278
Mark Dickinsona614f042009-11-28 12:48:43 +000012279# For multiprocessing module, check that sem_open
12280# actually works. For FreeBSD versions <= 7.2,
12281# the kernel module that provides POSIX semaphores
12282# isn't loaded by default, so an attempt to call
12283# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12285$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012286if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012288else
Matthias Kloseb9621712010-04-24 17:59:49 +000012289 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012290 ac_cv_posix_semaphores_enabled=yes
12291else
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012293/* end confdefs.h. */
12294
12295#include <unistd.h>
12296#include <fcntl.h>
12297#include <stdio.h>
12298#include <semaphore.h>
12299#include <sys/stat.h>
12300
12301int main(void) {
12302 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12303 if (a == SEM_FAILED) {
12304 perror("sem_open");
12305 return 1;
12306 }
12307 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012308 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012309 return 0;
12310}
12311
12312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012313if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012314 ac_cv_posix_semaphores_enabled=yes
12315else
Matthias Kloseb9621712010-04-24 17:59:49 +000012316 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12319 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012320fi
12321
12322
Mark Dickinsona614f042009-11-28 12:48:43 +000012323fi
12324
Matthias Kloseb9621712010-04-24 17:59:49 +000012325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12326$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012327if test $ac_cv_posix_semaphores_enabled = no
12328then
12329
Matthias Kloseb9621712010-04-24 17:59:49 +000012330$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012331
12332fi
12333
Mark Dickinson10683072009-04-18 21:18:19 +000012334# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12336$as_echo_n "checking for broken sem_getvalue... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012337if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012339else
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012341 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012342else
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012344/* end confdefs.h. */
12345
12346#include <unistd.h>
12347#include <fcntl.h>
12348#include <stdio.h>
12349#include <semaphore.h>
12350#include <sys/stat.h>
12351
12352int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012353 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012354 int count;
12355 int res;
12356 if(a==SEM_FAILED){
12357 perror("sem_open");
12358 return 1;
12359
12360 }
12361 res = sem_getvalue(a, &count);
12362 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012363 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012364 return res==-1 ? 1 : 0;
12365}
12366
Mark Dickinson10683072009-04-18 21:18:19 +000012367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012368if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012369 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012370else
Matthias Kloseb9621712010-04-24 17:59:49 +000012371 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12374 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012375fi
12376
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012377
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012378fi
12379
Matthias Kloseb9621712010-04-24 17:59:49 +000012380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12381$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012382if test $ac_cv_broken_sem_getvalue = yes
12383then
12384
Matthias Kloseb9621712010-04-24 17:59:49 +000012385$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012386
12387fi
12388
Mark Dickinsonbd792642009-03-18 20:06:12 +000012389# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12391$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012392# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012393if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012394 enableval=$enable_big_digits; case $enable_big_digits in
12395yes)
12396 enable_big_digits=30 ;;
12397no)
12398 enable_big_digits=15 ;;
1239915|30)
12400 ;;
12401*)
Gregory P. Smith69140482012-01-16 02:05:55 -080012402 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 +000012403esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12405$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012406
12407cat >>confdefs.h <<_ACEOF
12408#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12409_ACEOF
12410
12411
12412else
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12414$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012415fi
12416
12417
Guido van Rossumef2255b2000-03-10 22:30:29 +000012418# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012419ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080012420if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012421
12422
Matthias Kloseb9621712010-04-24 17:59:49 +000012423$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012424
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012425 wchar_h="yes"
12426
Guido van Rossumef2255b2000-03-10 22:30:29 +000012427else
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012429
12430fi
12431
Michael W. Hudson54241132001-12-07 15:38:26 +000012432
Martin v. Löwis11437992002-04-12 09:54:03 +000012433
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012434# determine wchar_t size
12435if test "$wchar_h" = yes
12436then
Matthias Kloseb9621712010-04-24 17:59:49 +000012437 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012438# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12439# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12440# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12442$as_echo_n "checking size of wchar_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012443if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012444 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012445else
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12447"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012448
Martin v. Löwis11437992002-04-12 09:54:03 +000012449else
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 if test "$ac_cv_type_wchar_t" = yes; then
12451 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12452$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012453as_fn_error 77 "cannot compute sizeof (wchar_t)
Gregory P. Smith69140482012-01-16 02:05:55 -080012454See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455 else
12456 ac_cv_sizeof_wchar_t=0
12457 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012459
Martin v. Löwis11437992002-04-12 09:54:03 +000012460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12462$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463
12464
12465
Martin v. Löwis11437992002-04-12 09:54:03 +000012466cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012467#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012468_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012469
Michael W. Hudson54241132001-12-07 15:38:26 +000012470
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012471fi
12472
Matthias Kloseb9621712010-04-24 17:59:49 +000012473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12474$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012475have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012477/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012478
12479#include <tcl.h>
12480#if TCL_UTF_MAX != 6
12481# error "NOT UCS4_TCL"
12482#endif
12483int
12484main ()
12485{
12486
12487 ;
12488 return 0;
12489}
12490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012491if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012492
12493
Matthias Kloseb9621712010-04-24 17:59:49 +000012494$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012495
12496 have_ucs4_tcl=yes
12497
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12501$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012502
Skip Montanaro6dead952003-09-25 14:50:04 +000012503# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012504if test "$wchar_h" = yes
12505then
12506 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12508$as_echo_n "checking whether wchar_t is signed... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012509 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012511else
12512
Matthias Kloseb9621712010-04-24 17:59:49 +000012513 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012514 ac_cv_wchar_t_signed=yes
12515else
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012517/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012518
12519 #include <wchar.h>
12520 int main()
12521 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012522 /* Success: exit code 0 */
12523 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012524 }
12525
12526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012527if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012528 ac_cv_wchar_t_signed=yes
12529else
Matthias Kloseb9621712010-04-24 17:59:49 +000012530 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12533 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012534fi
12535
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012536fi
12537
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12539$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012540fi
12541
Matthias Kloseb9621712010-04-24 17:59:49 +000012542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12543$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012544
12545# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012546if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012547 withval=$with_wide_unicode;
12548if test "$withval" != no
12549then unicode_size="4"
12550else unicode_size="2"
12551fi
12552
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012553else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012554
Georg Brandl52d168a2008-01-07 18:10:24 +000012555case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012556 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012557 *) unicode_size="2" ;;
12558esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012559
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012560fi
12561
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012562
12563
Georg Brandl52d168a2008-01-07 18:10:24 +000012564case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012565 4)
12566 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12567
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012568 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012569 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012570 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012571 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012572esac
12573
Michael W. Hudson54241132001-12-07 15:38:26 +000012574
Martin v. Löwis11437992002-04-12 09:54:03 +000012575
Georg Brandl52d168a2008-01-07 18:10:24 +000012576# wchar_t is only usable if it maps to an unsigned type
12577if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012578 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012579then
12580 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012581
Matthias Kloseb9621712010-04-24 17:59:49 +000012582$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012583
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012585
Georg Brandl52d168a2008-01-07 18:10:24 +000012586elif test "$ac_cv_sizeof_short" = "$unicode_size"
12587then
12588 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012589 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012590
Georg Brandl52d168a2008-01-07 18:10:24 +000012591elif test "$ac_cv_sizeof_long" = "$unicode_size"
12592then
12593 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012594 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012595
Georg Brandl52d168a2008-01-07 18:10:24 +000012596else
12597 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12600$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012601
12602# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12604$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012605if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012607else
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 ac_cv_c_bigendian=unknown
12609 # See if we're dealing with a universal compiler.
12610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12611/* end confdefs.h. */
12612#ifndef __APPLE_CC__
12613 not a universal capable compiler
12614 #endif
12615 typedef int dummy;
12616
Skip Montanaro6dead952003-09-25 14:50:04 +000012617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012618if ac_fn_c_try_compile "$LINENO"; then :
12619
12620 # Check for potential -arch flags. It is not universal unless
12621 # there are at least two -arch flags with different values.
12622 ac_arch=
12623 ac_prev=
12624 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12625 if test -n "$ac_prev"; then
12626 case $ac_word in
12627 i?86 | x86_64 | ppc | ppc64)
12628 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12629 ac_arch=$ac_word
12630 else
12631 ac_cv_c_bigendian=universal
12632 break
12633 fi
12634 ;;
12635 esac
12636 ac_prev=
12637 elif test "x$ac_word" = "x-arch"; then
12638 ac_prev=arch
12639 fi
12640 done
12641fi
12642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12643 if test $ac_cv_c_bigendian = unknown; then
12644 # See if sys/param.h defines the BYTE_ORDER macro.
12645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012646/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012647#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012648 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012649
Martin v. Löwis11437992002-04-12 09:54:03 +000012650int
12651main ()
12652{
Matthias Kloseb9621712010-04-24 17:59:49 +000012653#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12654 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12655 && LITTLE_ENDIAN)
12656 bogus endian macros
12657 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012658
12659 ;
12660 return 0;
12661}
12662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012663if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012664 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012666/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012667#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012669
Martin v. Löwis11437992002-04-12 09:54:03 +000012670int
12671main ()
12672{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012673#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 not big endian
12675 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012676
12677 ;
12678 return 0;
12679}
12680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012681if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012682 ac_cv_c_bigendian=yes
12683else
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012687fi
12688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12689 fi
12690 if test $ac_cv_c_bigendian = unknown; then
12691 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012693/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012694#include <limits.h>
12695
Martin v. Löwis11437992002-04-12 09:54:03 +000012696int
12697main ()
12698{
Matthias Kloseb9621712010-04-24 17:59:49 +000012699#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12700 bogus endian macros
12701 #endif
12702
Martin v. Löwis11437992002-04-12 09:54:03 +000012703 ;
12704 return 0;
12705}
12706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012707if ac_fn_c_try_compile "$LINENO"; then :
12708 # It does; now see whether it defined to _BIG_ENDIAN or not.
12709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12710/* end confdefs.h. */
12711#include <limits.h>
12712
12713int
12714main ()
12715{
12716#ifndef _BIG_ENDIAN
12717 not big endian
12718 #endif
12719
12720 ;
12721 return 0;
12722}
12723_ACEOF
12724if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012725 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012726else
Matthias Kloseb9621712010-04-24 17:59:49 +000012727 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12730fi
12731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12732 fi
12733 if test $ac_cv_c_bigendian = unknown; then
12734 # Compile a test program.
12735 if test "$cross_compiling" = yes; then :
12736 # Try to guess by grepping values from an object file.
12737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12738/* end confdefs.h. */
12739short int ascii_mm[] =
12740 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12741 short int ascii_ii[] =
12742 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12743 int use_ascii (int i) {
12744 return ascii_mm[i] + ascii_ii[i];
12745 }
12746 short int ebcdic_ii[] =
12747 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12748 short int ebcdic_mm[] =
12749 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12750 int use_ebcdic (int i) {
12751 return ebcdic_mm[i] + ebcdic_ii[i];
12752 }
12753 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012754
Matthias Kloseb9621712010-04-24 17:59:49 +000012755int
12756main ()
12757{
12758return use_ascii (foo) == use_ebcdic (foo);
12759 ;
12760 return 0;
12761}
12762_ACEOF
12763if ac_fn_c_try_compile "$LINENO"; then :
12764 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12765 ac_cv_c_bigendian=yes
12766 fi
12767 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12768 if test "$ac_cv_c_bigendian" = unknown; then
12769 ac_cv_c_bigendian=no
12770 else
12771 # finding both strings is unlikely to happen, but who knows?
12772 ac_cv_c_bigendian=unknown
12773 fi
12774 fi
12775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012777else
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012779/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012781int
12782main ()
12783{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784
Matthias Kloseb9621712010-04-24 17:59:49 +000012785 /* Are we little or big endian? From Harbison&Steele. */
12786 union
12787 {
12788 long int l;
12789 char c[sizeof (long int)];
12790 } u;
12791 u.l = 1;
12792 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012793
12794 ;
12795 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012796}
Martin v. Löwis11437992002-04-12 09:54:03 +000012797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012798if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012799 ac_cv_c_bigendian=no
12800else
Matthias Kloseb9621712010-04-24 17:59:49 +000012801 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012806
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12810$as_echo "$ac_cv_c_bigendian" >&6; }
12811 case $ac_cv_c_bigendian in #(
12812 yes)
12813 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12814;; #(
12815 no)
12816 ;; #(
12817 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012818
Matthias Kloseb9621712010-04-24 17:59:49 +000012819$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012820
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 ;; #(
12822 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012823 as_fn_error $? "unknown endianness
Gregory P. Smith69140482012-01-16 02:05:55 -080012824 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012826
Michael W. Hudson54241132001-12-07 15:38:26 +000012827
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012828# ABI version string for Python extension modules. This appears between the
12829# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12830# from the following attributes which affect the ABI of this Python build (in
12831# this order):
12832#
12833# * The Python implementation (always 'cpython-' for us)
12834# * The major and minor version numbers
12835# * --with-pydebug (adds a 'd')
12836# * --with-pymalloc (adds a 'm')
12837# * --with-wide-unicode (adds a 'u')
12838#
12839# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012840# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12841# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012842
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12844$as_echo_n "checking ABIFLAGS... " >&6; }
12845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12846$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12848$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012849SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12851$as_echo "$SOABI" >&6; }
12852
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12854$as_echo_n "checking LDVERSION... " >&6; }
12855LDVERSION='$(VERSION)$(ABIFLAGS)'
12856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12857$as_echo "$LDVERSION" >&6; }
12858
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012859# SO is the extension of shared libraries `(including the dot!)
12860# -- usually .so, .sl on HP-UX, .dll on Cygwin
12861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12862$as_echo_n "checking SO... " >&6; }
12863if test -z "$SO"
12864then
12865 case $ac_sys_system in
12866 hp*|HP*)
12867 case `uname -m` in
12868 ia64) SO=.so;;
12869 *) SO=.sl;;
12870 esac
12871 ;;
12872 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012873 Linux*|GNU*)
12874 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012875 *) SO=.so;;
12876 esac
12877else
12878 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012879 echo
12880 echo '====================================================================='
12881 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012882 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012883 echo '+ Do you really mean to change the extension for shared libraries? +'
12884 echo '+ Continuing in 10 seconds to let you to ponder. +'
12885 echo '+ +'
12886 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012887 sleep 10
12888fi
12889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12890$as_echo "$SO" >&6; }
12891
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012892# Check whether right shifting a negative integer extends the sign bit
12893# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12895$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012896if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012897 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012898else
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
Matthias Kloseb9621712010-04-24 17:59:49 +000012900if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012901 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012902else
Matthias Kloseb9621712010-04-24 17:59:49 +000012903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012904/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012905
12906int main()
12907{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012908 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012909}
12910
Martin v. Löwis11437992002-04-12 09:54:03 +000012911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012912if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012913 ac_cv_rshift_extends_sign=yes
12914else
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12918 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012919fi
12920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012921fi
12922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12924$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012925if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012926then
Martin v. Löwis11437992002-04-12 09:54:03 +000012927
Matthias Kloseb9621712010-04-24 17:59:49 +000012928$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012929
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012930fi
12931
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012932# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12934$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012935if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012936 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012937else
Martin v. Löwis11437992002-04-12 09:54:03 +000012938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012940/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012941#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012942int
12943main ()
12944{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012945
12946 FILE *f = fopen("/dev/null", "r");
12947 flockfile(f);
12948 getc_unlocked(f);
12949 funlockfile(f);
12950
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 ;
12952 return 0;
12953}
12954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012955if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012956 ac_cv_have_getc_unlocked=yes
12957else
Matthias Kloseb9621712010-04-24 17:59:49 +000012958 ac_cv_have_getc_unlocked=no
12959fi
12960rm -f core conftest.err conftest.$ac_objext \
12961 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12965$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012966if test "$ac_cv_have_getc_unlocked" = yes
12967then
Martin v. Löwis11437992002-04-12 09:54:03 +000012968
Matthias Kloseb9621712010-04-24 17:59:49 +000012969$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012970
12971fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012972
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012973# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012974# save the value of LIBS so we don't actually link Python with readline
12975LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012976
Gregory P. Smith18820942008-09-07 06:24:49 +000012977# On some systems we need to link readline to a termcap compatible
12978# library. NOTE: Keep the precedence of listed libraries synchronised
12979# with setup.py.
12980py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12982$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012983for py_libtermcap in "" ncursesw ncurses curses termcap; do
12984 if test -z "$py_libtermcap"; then
12985 READLINE_LIBS="-lreadline"
12986 else
12987 READLINE_LIBS="-lreadline -l$py_libtermcap"
12988 fi
12989 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012991/* end confdefs.h. */
12992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012993/* Override any GCC internal prototype to avoid an error.
12994 Use char because int might match the return type of a GCC
12995 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012996#ifdef __cplusplus
12997extern "C"
12998#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012999char readline ();
13000int
13001main ()
13002{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013003return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013004 ;
13005 return 0;
13006}
13007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013008if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013009 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013011rm -f core conftest.err conftest.$ac_objext \
13012 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013013 if test $py_cv_lib_readline = yes; then
13014 break
13015 fi
13016done
13017# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13018#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013019if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13021$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013022else
Matthias Kloseb9621712010-04-24 17:59:49 +000013023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13024$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013025
Matthias Kloseb9621712010-04-24 17:59:49 +000013026$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013027
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013028fi
13029
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013030# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13032$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013033if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013034 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013035else
13036 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013037LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013039/* end confdefs.h. */
13040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013041/* Override any GCC internal prototype to avoid an error.
13042 Use char because int might match the return type of a GCC
13043 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013044#ifdef __cplusplus
13045extern "C"
13046#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013047char rl_callback_handler_install ();
13048int
13049main ()
13050{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013051return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013052 ;
13053 return 0;
13054}
13055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013056if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013057 ac_cv_lib_readline_rl_callback_handler_install=yes
13058else
Matthias Kloseb9621712010-04-24 17:59:49 +000013059 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013061rm -f core conftest.err conftest.$ac_objext \
13062 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013063LIBS=$ac_check_lib_save_LIBS
13064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13066$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013067if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013070
13071fi
13072
13073
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013074# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013076/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013077#include <readline/readline.h>
13078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013079if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013080 have_readline=yes
13081else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013082 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013083
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013084fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013085rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013086if test $have_readline = yes
13087then
Matthias Kloseb9621712010-04-24 17:59:49 +000013088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013089/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013090#include <readline/readline.h>
13091
13092_ACEOF
13093if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013097
13098fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013099rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013100
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013102/* end confdefs.h. */
13103#include <readline/readline.h>
13104
13105_ACEOF
13106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013107 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013108
Matthias Kloseb9621712010-04-24 17:59:49 +000013109$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013110
13111fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013112rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013113
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013114fi
13115
Martin v. Löwis0daad592001-09-30 21:09:59 +000013116# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13118$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013119if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013120 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013121else
Martin v. Löwis11437992002-04-12 09:54:03 +000013122 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013123LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013127/* Override any GCC internal prototype to avoid an error.
13128 Use char because int might match the return type of a GCC
13129 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013130#ifdef __cplusplus
13131extern "C"
13132#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013133char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013134int
13135main ()
13136{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013137return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013138 ;
13139 return 0;
13140}
13141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013142if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013143 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013144else
Matthias Kloseb9621712010-04-24 17:59:49 +000013145 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013147rm -f core conftest.err conftest.$ac_objext \
13148 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013149LIBS=$ac_check_lib_save_LIBS
13150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13152$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013153if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013156
Martin v. Löwis0daad592001-09-30 21:09:59 +000013157fi
13158
Michael W. Hudson54241132001-12-07 15:38:26 +000013159
Thomas Wouters89d996e2007-09-08 17:39:28 +000013160# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13162$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013163if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013164 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013165else
13166 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013167LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013169/* end confdefs.h. */
13170
13171/* Override any GCC internal prototype to avoid an error.
13172 Use char because int might match the return type of a GCC
13173 builtin and then its argument prototype would still apply. */
13174#ifdef __cplusplus
13175extern "C"
13176#endif
13177char rl_completion_display_matches_hook ();
13178int
13179main ()
13180{
13181return rl_completion_display_matches_hook ();
13182 ;
13183 return 0;
13184}
13185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013186if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013187 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13188else
Matthias Kloseb9621712010-04-24 17:59:49 +000013189 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013191rm -f core conftest.err conftest.$ac_objext \
13192 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013193LIBS=$ac_check_lib_save_LIBS
13194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13196$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013197if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013198
Matthias Kloseb9621712010-04-24 17:59:49 +000013199$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013200
13201fi
13202
13203
Martin v. Löwis0daad592001-09-30 21:09:59 +000013204# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13206$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013207if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013208 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013209else
Martin v. Löwis11437992002-04-12 09:54:03 +000013210 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013211LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013215/* Override any GCC internal prototype to avoid an error.
13216 Use char because int might match the return type of a GCC
13217 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013218#ifdef __cplusplus
13219extern "C"
13220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013221char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013222int
13223main ()
13224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013225return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 ;
13227 return 0;
13228}
13229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013230if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013231 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013232else
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013235rm -f core conftest.err conftest.$ac_objext \
13236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013237LIBS=$ac_check_lib_save_LIBS
13238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13240$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013241if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013244
Guido van Rossum353ae582001-07-10 16:45:32 +000013245fi
13246
Jack Jansendd19cf82001-12-06 22:36:17 +000013247
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013248# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013250/* end confdefs.h. */
13251#include <readline/readline.h>
13252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013253if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013254 have_readline=yes
13255else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013256 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013257
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013258fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013259rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013260if test $have_readline = yes
13261then
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013263/* end confdefs.h. */
13264#include <readline/readline.h>
13265
13266_ACEOF
13267if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013268 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013271
13272fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013273rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013274
13275fi
13276
Martin v. Löwis82bca632006-02-10 20:49:30 +000013277# End of readline checks: restore LIBS
13278LIBS=$LIBS_no_readline
13279
Matthias Kloseb9621712010-04-24 17:59:49 +000013280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13281$as_echo_n "checking for broken nice()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013282if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013284else
Martin v. Löwis11437992002-04-12 09:54:03 +000013285
Matthias Kloseb9621712010-04-24 17:59:49 +000013286if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013287 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013288else
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013290/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013291
13292int main()
13293{
13294 int val1 = nice(1);
13295 if (val1 != -1 && val1 == nice(2))
13296 exit(0);
13297 exit(1);
13298}
13299
Martin v. Löwis11437992002-04-12 09:54:03 +000013300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013301if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013302 ac_cv_broken_nice=yes
13303else
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13307 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013308fi
13309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013310fi
13311
Matthias Kloseb9621712010-04-24 17:59:49 +000013312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13313$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013314if test "$ac_cv_broken_nice" = yes
13315then
Martin v. Löwis11437992002-04-12 09:54:03 +000013316
Matthias Kloseb9621712010-04-24 17:59:49 +000013317$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013318
13319fi
13320
Matthias Kloseb9621712010-04-24 17:59:49 +000013321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13322$as_echo_n "checking for broken poll()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013323if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013325else
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013327 ac_cv_broken_poll=no
13328else
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013330/* end confdefs.h. */
13331
13332#include <poll.h>
13333
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013334int main()
13335{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013336 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013337 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013338
13339 close (42);
13340
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013341 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013342 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013343 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013344 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013345 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013346 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013347 return 1;
13348}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013349
13350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013351if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013352 ac_cv_broken_poll=yes
13353else
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13357 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013359
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013360fi
13361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13363$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013364if test "$ac_cv_broken_poll" = yes
13365then
13366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013368
13369fi
13370
Brett Cannon43802422005-02-10 20:48:03 +000013371# 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 +000013372# (which is not required by ISO C or UNIX spec) and/or if we support
13373# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013374ac_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 +000013375#include <$ac_cv_struct_tm>
13376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377"
Gregory P. Smith69140482012-01-16 02:05:55 -080013378if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013379
13380cat >>confdefs.h <<_ACEOF
13381#define HAVE_STRUCT_TM_TM_ZONE 1
13382_ACEOF
13383
13384
13385fi
13386
13387if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13388
Matthias Kloseb9621712010-04-24 17:59:49 +000013389$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013390
13391else
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13393"
Gregory P. Smith69140482012-01-16 02:05:55 -080013394if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013396else
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013398fi
13399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013400cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013401#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013402_ACEOF
13403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13405$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013406if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408else
Matthias Kloseb9621712010-04-24 17:59:49 +000013409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013410/* end confdefs.h. */
13411#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013412#if !HAVE_DECL_TZNAME
13413extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013414#endif
13415
13416int
13417main ()
13418{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013420 ;
13421 return 0;
13422}
13423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013424if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013425 ac_cv_var_tzname=yes
13426else
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013429rm -f core conftest.err conftest.$ac_objext \
13430 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13433$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013434 if test $ac_cv_var_tzname = yes; then
13435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013437
13438 fi
13439fi
13440
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013441
Martin v. Löwis1d459062005-03-14 21:23:33 +000013442# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13444$as_echo_n "checking for working tzset()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013445if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013447else
13448
Matthias Kloseb9621712010-04-24 17:59:49 +000013449if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013450 ac_cv_working_tzset=no
13451else
Matthias Kloseb9621712010-04-24 17:59:49 +000013452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013453/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013454
13455#include <stdlib.h>
13456#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013457#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013458
13459#if HAVE_TZNAME
13460extern char *tzname[];
13461#endif
13462
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013463int main()
13464{
Brett Cannon18367812003-09-19 00:59:16 +000013465 /* Note that we need to ensure that not only does tzset(3)
13466 do 'something' with localtime, but it works as documented
13467 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013468 This includes making sure that tzname is set properly if
13469 tm->tm_zone does not exist since it is the alternative way
13470 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013471
13472 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013473 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013474 */
13475
Martin v. Löwis1d459062005-03-14 21:23:33 +000013476 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013477 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13478
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013479 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013480 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013481 if (localtime(&groundhogday)->tm_hour != 0)
13482 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013483#if HAVE_TZNAME
13484 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13485 if (strcmp(tzname[0], "UTC") ||
13486 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13487 exit(1);
13488#endif
Brett Cannon18367812003-09-19 00:59:16 +000013489
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013490 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013491 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013492 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013493 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013494#if HAVE_TZNAME
13495 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13496 exit(1);
13497#endif
Brett Cannon18367812003-09-19 00:59:16 +000013498
13499 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13500 tzset();
13501 if (localtime(&groundhogday)->tm_hour != 11)
13502 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013503#if HAVE_TZNAME
13504 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13505 exit(1);
13506#endif
13507
13508#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013509 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13510 exit(1);
13511 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13512 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013513#endif
Brett Cannon18367812003-09-19 00:59:16 +000013514
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013515 exit(0);
13516}
13517
13518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013519if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013520 ac_cv_working_tzset=yes
13521else
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13525 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013526fi
13527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013528fi
13529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13531$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013532if test "$ac_cv_working_tzset" = yes
13533then
13534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013536
13537fi
13538
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013539# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13541$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013542if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013544else
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013546/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013547#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013548int
13549main ()
13550{
13551
13552struct stat st;
13553st.st_mtim.tv_nsec = 1;
13554
13555 ;
13556 return 0;
13557}
13558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013559if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013560 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013561else
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13565fi
13566
Matthias Kloseb9621712010-04-24 17:59:49 +000013567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13568$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013569if test "$ac_cv_stat_tv_nsec" = yes
13570then
13571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013573
13574fi
13575
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013576# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13578$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013579if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013583/* end confdefs.h. */
13584#include <sys/stat.h>
13585int
13586main ()
13587{
13588
13589struct stat st;
13590st.st_mtimespec.tv_nsec = 1;
13591
13592 ;
13593 return 0;
13594}
13595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013596if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013597 ac_cv_stat_tv_nsec2=yes
13598else
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13602fi
13603
Matthias Kloseb9621712010-04-24 17:59:49 +000013604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13605$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013606if test "$ac_cv_stat_tv_nsec2" = yes
13607then
13608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013610
13611fi
13612
Jack Jansen666b1e72001-10-31 12:11:48 +000013613# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13615$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013616if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013618else
Matthias Kloseb9621712010-04-24 17:59:49 +000013619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013620/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013621#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013622int
13623main ()
13624{
Jack Jansen666b1e72001-10-31 12:11:48 +000013625
13626 int rtn;
13627 rtn = mvwdelch(0,0,0);
13628
Martin v. Löwis11437992002-04-12 09:54:03 +000013629 ;
13630 return 0;
13631}
13632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013633if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013634 ac_cv_mvwdelch_is_expression=yes
13635else
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13639fi
13640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13642$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013643
13644if test "$ac_cv_mvwdelch_is_expression" = yes
13645then
Martin v. Löwis11437992002-04-12 09:54:03 +000013646
Matthias Kloseb9621712010-04-24 17:59:49 +000013647$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013648
13649fi
13650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13652$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013653if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013655else
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013657/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013658#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013659int
13660main ()
13661{
Jack Jansen666b1e72001-10-31 12:11:48 +000013662
13663 WINDOW *w;
13664 w->_flags = 0;
13665
Martin v. Löwis11437992002-04-12 09:54:03 +000013666 ;
13667 return 0;
13668}
13669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013670if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013671 ac_cv_window_has_flags=yes
13672else
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13676fi
13677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13679$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013680
Jack Jansen666b1e72001-10-31 12:11:48 +000013681
13682if test "$ac_cv_window_has_flags" = yes
13683then
Martin v. Löwis11437992002-04-12 09:54:03 +000013684
Matthias Kloseb9621712010-04-24 17:59:49 +000013685$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013686
13687fi
13688
Matthias Kloseb9621712010-04-24 17:59:49 +000013689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13690$as_echo_n "checking for is_term_resized... " >&6; }
13691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013692/* end confdefs.h. */
13693#include <curses.h>
13694int
13695main ()
13696{
13697void *x=is_term_resized
13698 ;
13699 return 0;
13700}
13701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013703
Matthias Kloseb9621712010-04-24 17:59:49 +000013704$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013705
Matthias Kloseb159a552010-04-25 21:00:44 +000013706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013707$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013708else
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13710$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013711
13712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13716$as_echo_n "checking for resize_term... " >&6; }
13717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013718/* end confdefs.h. */
13719#include <curses.h>
13720int
13721main ()
13722{
13723void *x=resize_term
13724 ;
13725 return 0;
13726}
13727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013728if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013731
Matthias Kloseb159a552010-04-25 21:00:44 +000013732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013733$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013734else
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13736$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013737
13738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13740
Matthias Kloseb9621712010-04-24 17:59:49 +000013741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13742$as_echo_n "checking for resizeterm... " >&6; }
13743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013744/* end confdefs.h. */
13745#include <curses.h>
13746int
13747main ()
13748{
13749void *x=resizeterm
13750 ;
13751 return 0;
13752}
13753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013754if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013755
Matthias Kloseb9621712010-04-24 17:59:49 +000013756$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013757
Matthias Kloseb159a552010-04-25 21:00:44 +000013758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013759$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013760else
Matthias Kloseb9621712010-04-24 17:59:49 +000013761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13762$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013763
13764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13766
Matthias Kloseb9621712010-04-24 17:59:49 +000013767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13768$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013769
13770if test -r /dev/ptmx
13771then
Matthias Kloseb9621712010-04-24 17:59:49 +000013772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13773$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013774
Matthias Kloseb9621712010-04-24 17:59:49 +000013775$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013776
Thomas Wouters89f507f2006-12-13 04:49:30 +000013777else
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13779$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013780fi
13781
Matthias Kloseb9621712010-04-24 17:59:49 +000013782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13783$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013784
13785if test -r /dev/ptc
13786then
Matthias Kloseb9621712010-04-24 17:59:49 +000013787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13788$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013789
Matthias Kloseb9621712010-04-24 17:59:49 +000013790$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013791
Thomas Wouters89f507f2006-12-13 04:49:30 +000013792else
Matthias Kloseb9621712010-04-24 17:59:49 +000013793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13794$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013795fi
13796
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013797if test "$have_long_long" = yes
13798then
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13800$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013801 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013802 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013803else
Matthias Kloseb9621712010-04-24 17:59:49 +000013804 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013805 ac_cv_have_long_long_format=no
13806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013808/* end confdefs.h. */
13809
13810 #include <stdio.h>
13811 #include <stddef.h>
13812 #include <string.h>
13813
13814 #ifdef HAVE_SYS_TYPES_H
13815 #include <sys/types.h>
13816 #endif
13817
13818 int main()
13819 {
13820 char buffer[256];
13821
13822 if (sprintf(buffer, "%lld", (long long)123) < 0)
13823 return 1;
13824 if (strcmp(buffer, "123"))
13825 return 1;
13826
13827 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13828 return 1;
13829 if (strcmp(buffer, "-123"))
13830 return 1;
13831
13832 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13833 return 1;
13834 if (strcmp(buffer, "123"))
13835 return 1;
13836
13837 return 0;
13838 }
13839
13840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013841if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013842 ac_cv_have_long_long_format=yes
13843else
Matthias Kloseb9621712010-04-24 17:59:49 +000013844 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013848fi
13849
13850
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013851fi
13852
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13854$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013855fi
13856
Mark Dickinson89d7d412009-12-31 20:50:59 +000013857if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013858then
13859
Matthias Kloseb9621712010-04-24 17:59:49 +000013860$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013861
13862fi
13863
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013864if test $ac_sys_system = Darwin
13865then
13866 LIBS="$LIBS -framework CoreFoundation"
13867fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013868
Matthias Kloseb9621712010-04-24 17:59:49 +000013869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13870$as_echo_n "checking for %zd printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013871if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013873else
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013875 ac_cv_have_size_t_format="cross -- assuming yes"
13876
Thomas Wouters477c8d52006-05-27 19:21:47 +000013877else
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013879/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013880
Thomas Wouters477c8d52006-05-27 19:21:47 +000013881#include <stdio.h>
13882#include <stddef.h>
13883#include <string.h>
13884
Christian Heimes2c181612007-12-17 20:04:13 +000013885#ifdef HAVE_SYS_TYPES_H
13886#include <sys/types.h>
13887#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013888
13889#ifdef HAVE_SSIZE_T
13890typedef ssize_t Py_ssize_t;
13891#elif SIZEOF_VOID_P == SIZEOF_LONG
13892typedef long Py_ssize_t;
13893#else
13894typedef int Py_ssize_t;
13895#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013896
Christian Heimes2c181612007-12-17 20:04:13 +000013897int main()
13898{
13899 char buffer[256];
13900
Thomas Wouters477c8d52006-05-27 19:21:47 +000013901 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13902 return 1;
13903
Thomas Wouters89f507f2006-12-13 04:49:30 +000013904 if (strcmp(buffer, "123"))
13905 return 1;
13906
13907 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13908 return 1;
13909
13910 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013911 return 1;
13912
13913 return 0;
13914}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013915
Thomas Wouters477c8d52006-05-27 19:21:47 +000013916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013917if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013918 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013919else
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013924fi
13925
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13928$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013929if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013930
Matthias Kloseb9621712010-04-24 17:59:49 +000013931$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013932
13933fi
13934
Matthias Kloseb9621712010-04-24 17:59:49 +000013935ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013936#ifdef HAVE_SYS_TYPES_H
13937#include <sys/types.h>
13938#endif
13939#ifdef HAVE_SYS_SOCKET_H
13940#include <sys/socket.h>
13941#endif
13942
Matthias Kloseb9621712010-04-24 17:59:49 +000013943"
Gregory P. Smith69140482012-01-16 02:05:55 -080013944if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013945
Martin v. Löwis11437992002-04-12 09:54:03 +000013946else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013947
Matthias Kloseb9621712010-04-24 17:59:49 +000013948$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013949
13950fi
13951
Michael W. Hudson54241132001-12-07 15:38:26 +000013952
Matthias Kloseb9621712010-04-24 17:59:49 +000013953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13954$as_echo_n "checking for broken mbstowcs... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013955if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013957else
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013959 ac_cv_broken_mbstowcs=no
13960else
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013962/* end confdefs.h. */
13963
13964#include<stdlib.h>
13965int main() {
13966 size_t len = -1;
13967 const char *str = "text";
13968 len = mbstowcs(NULL, str, 0);
13969 return (len != 4);
13970}
13971
13972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013973if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013974 ac_cv_broken_mbstowcs=no
13975else
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13979 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013980fi
13981
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013982fi
13983
Matthias Kloseb9621712010-04-24 17:59:49 +000013984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13985$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013986if test "$ac_cv_broken_mbstowcs" = yes
13987then
13988
Matthias Kloseb9621712010-04-24 17:59:49 +000013989$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013990
13991fi
13992
Antoine Pitrou042b1282010-08-13 21:15:58 +000013993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13994$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013995if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013996 $as_echo_n "(cached) " >&6
13997else
13998 if test "$cross_compiling" = yes; then :
13999 ac_cv_computed_gotos=no
14000else
14001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14002/* end confdefs.h. */
14003
14004int main(int argc, char **argv)
14005{
14006 static void *targets[1] = { &&LABEL1 };
14007 goto LABEL2;
14008LABEL1:
14009 return 0;
14010LABEL2:
14011 goto *targets[0];
14012 return 1;
14013}
14014
14015_ACEOF
14016if ac_fn_c_try_run "$LINENO"; then :
14017 ac_cv_computed_gotos=yes
14018else
14019 ac_cv_computed_gotos=no
14020fi
14021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14022 conftest.$ac_objext conftest.beam conftest.$ac_ext
14023fi
14024
14025fi
14026
14027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14028$as_echo "$ac_cv_computed_gotos" >&6; }
14029if test "$ac_cv_computed_gotos" = yes
14030then
14031
14032$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14033
14034fi
14035
Antoine Pitroub52ec782009-01-25 16:34:23 +000014036# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14038$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014039
14040# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014041if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014042 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014043if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014044then
14045
Matthias Kloseb9621712010-04-24 17:59:49 +000014046$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014047
Matthias Kloseb9621712010-04-24 17:59:49 +000014048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14049$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014050fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014051if test "$withval" = no
14052then
14053
14054$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14055
Matthias Kloseb9621712010-04-24 17:59:49 +000014056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14057$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014058fi
14059
Antoine Pitrou042b1282010-08-13 21:15:58 +000014060else
14061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14062$as_echo "no value specified" >&6; }
14063fi
14064
Antoine Pitroub52ec782009-01-25 16:34:23 +000014065
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014066case $ac_sys_system in
14067AIX*)
14068
14069$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14070 ;;
14071esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014072
Michael W. Hudson54241132001-12-07 15:38:26 +000014073
Jesus Cea6a792292010-05-03 21:18:48 +000014074case $ac_sys_system in
Gregory P. Smith69140482012-01-16 02:05:55 -080014075 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 +000014076esac
14077
Gregory P. Smith138fa432010-12-13 08:00:52 +000014078ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Gregory P. Smith69140482012-01-16 02:05:55 -080014079if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000014080
14081$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
14082
14083fi
Jesus Cea6a792292010-05-03 21:18:48 +000014084
14085
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014086
14087
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014088for h in `(cd $srcdir;echo Python/thread_*.h)`
14089do
14090 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14091done
14092
Michael W. Hudson54241132001-12-07 15:38:26 +000014093
Neal Norwitzd24499d2005-12-18 21:36:39 +000014094SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14096$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014097for dir in $SRCDIRS; do
14098 if test ! -d $dir; then
14099 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014100 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014101done
Matthias Kloseb9621712010-04-24 17:59:49 +000014102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14103$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014104
Guido van Rossum627b2d71993-12-24 10:39:16 +000014105# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014106ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014107
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014108ac_config_files="$ac_config_files Modules/ld_so_aix"
14109
Martin v. Löwis11437992002-04-12 09:54:03 +000014110cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014111# This file is a shell script that caches the results of configure
14112# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014113# scripts and configure runs, see configure's option --config-cache.
14114# It is not useful on other systems. If it contains results you don't
14115# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014116#
Martin v. Löwis11437992002-04-12 09:54:03 +000014117# config.status only pays attention to the cache file if you give it
14118# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014119#
Skip Montanaro6dead952003-09-25 14:50:04 +000014120# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014121# loading this file, other *unset* `ac_cv_foo' will be assigned the
14122# following values.
14123
14124_ACEOF
14125
Guido van Rossumf78abae1997-01-21 22:02:36 +000014126# The following way of writing the cache mishandles newlines in values,
14127# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014128# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014129# Ultrix sh set writes to stderr and can't be redirected directly,
14130# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014131(
14132 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14133 eval ac_val=\$$ac_var
14134 case $ac_val in #(
14135 *${as_nl}*)
14136 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014137 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14138$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014139 esac
14140 case $ac_var in #(
14141 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014142 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14143 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014144 esac ;;
14145 esac
14146 done
14147
Martin v. Löwis11437992002-04-12 09:54:03 +000014148 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14150 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 # `set' does not quote correctly, so add quotes: double-quote
14152 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014153 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014154 "s/'/'\\\\''/g;
14155 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014157 *)
14158 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014161 esac |
14162 sort
14163) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014164 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014168 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14169 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14171 :end' >>confcache
14172if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14173 if test -w "$cache_file"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014174 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014175 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14176$as_echo "$as_me: updating cache $cache_file" >&6;}
Gregory P. Smith69140482012-01-16 02:05:55 -080014177 if test ! -f "$cache_file" || test -h "$cache_file"; then
14178 cat confcache >"$cache_file"
14179 else
14180 case $cache_file in #(
14181 */* | ?:*)
14182 mv -f confcache "$cache_file"$$ &&
14183 mv -f "$cache_file"$$ "$cache_file" ;; #(
14184 *)
14185 mv -f confcache "$cache_file" ;;
14186 esac
14187 fi
14188 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014189 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14191$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014192 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014193fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014194rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014195
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014196test "x$prefix" = xNONE && prefix=$ac_default_prefix
14197# Let make expand exec_prefix.
14198test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014199
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014200DEFS=-DHAVE_CONFIG_H
14201
Skip Montanaro6dead952003-09-25 14:50:04 +000014202ac_libobjs=
14203ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014204U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014205for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14206 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014207 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014208 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014209 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14210 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014211 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14212 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014213done
14214LIBOBJS=$ac_libobjs
14215
14216LTLIBOBJS=$ac_ltlibobjs
14217
14218
Martin v. Löwis11437992002-04-12 09:54:03 +000014219
Matthias Kloseb9621712010-04-24 17:59:49 +000014220
Gregory P. Smith69140482012-01-16 02:05:55 -080014221: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014222ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014223ac_clean_files_save=$ac_clean_files
14224ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014225{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14226$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14227as_write_fail=0
14228cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014229#! $SHELL
14230# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014231# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014232# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014233# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014234
Martin v. Löwis11437992002-04-12 09:54:03 +000014235debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014236ac_cs_recheck=false
14237ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014238
Matthias Kloseb9621712010-04-24 17:59:49 +000014239SHELL=\${CONFIG_SHELL-$SHELL}
14240export SHELL
14241_ASEOF
14242cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14243## -------------------- ##
14244## M4sh Initialization. ##
14245## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247# Be more Bourne compatible
14248DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014249if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 emulate sh
14251 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014252 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014253 # is contrary to our usage. Disable this feature.
14254 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014256else
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 case `(set -o) 2>/dev/null` in #(
14258 *posix*) :
14259 set -o posix ;; #(
14260 *) :
14261 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014262esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014263fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014264
14265
Matthias Kloseb9621712010-04-24 17:59:49 +000014266as_nl='
14267'
14268export as_nl
14269# Printing a long string crashes Solaris 7 /usr/bin/printf.
14270as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14271as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14272as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14273# Prefer a ksh shell builtin over an external printf program on Solaris,
14274# but without wasting forks for bash or zsh.
14275if test -z "$BASH_VERSION$ZSH_VERSION" \
14276 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14277 as_echo='print -r --'
14278 as_echo_n='print -rn --'
14279elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14280 as_echo='printf %s\n'
14281 as_echo_n='printf %s'
14282else
14283 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14284 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14285 as_echo_n='/usr/ucb/echo -n'
14286 else
14287 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14288 as_echo_n_body='eval
14289 arg=$1;
14290 case $arg in #(
14291 *"$as_nl"*)
14292 expr "X$arg" : "X\\(.*\\)$as_nl";
14293 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14294 esac;
14295 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14296 '
14297 export as_echo_n_body
14298 as_echo_n='sh -c $as_echo_n_body as_echo'
14299 fi
14300 export as_echo_body
14301 as_echo='sh -c $as_echo_body as_echo'
14302fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
14304# The user is always right.
14305if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014306 PATH_SEPARATOR=:
14307 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14308 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14309 PATH_SEPARATOR=';'
14310 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014311fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014313
14314# IFS
14315# We need space, tab and new line, in precisely that order. Quoting is
14316# there to prevent editors from complaining about space-tab.
14317# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14318# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014319IFS=" "" $as_nl"
14320
14321# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080014322as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014323case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014324 *[\\/]* ) as_myself=$0 ;;
14325 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014326for as_dir in $PATH
14327do
14328 IFS=$as_save_IFS
14329 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014330 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14331 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334 ;;
14335esac
14336# We did not find ourselves, most probably we were run as `sh COMMAND'
14337# in which case we are not to be found in the path.
14338if test "x$as_myself" = x; then
14339 as_myself=$0
14340fi
14341if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014342 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14343 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014344fi
14345
Matthias Kloseb9621712010-04-24 17:59:49 +000014346# Unset variables that we do not need and which cause bugs (e.g. in
14347# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14348# suppresses any "Segmentation fault" message there. '((' could
14349# trigger a bug in pdksh 5.2.14.
14350for as_var in BASH_ENV ENV MAIL MAILPATH
14351do eval test x\${$as_var+set} = xset \
14352 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353done
14354PS1='$ '
14355PS2='> '
14356PS4='+ '
14357
14358# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014359LC_ALL=C
14360export LC_ALL
14361LANGUAGE=C
14362export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363
Matthias Kloseb9621712010-04-24 17:59:49 +000014364# CDPATH.
14365(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14366
14367
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014368# as_fn_error STATUS ERROR [LINENO LOG_FD]
14369# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014370# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14371# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014372# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014373as_fn_error ()
14374{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014375 as_status=$1; test $as_status -eq 0 && as_status=1
14376 if test "$4"; then
14377 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14378 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014380 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 as_fn_exit $as_status
14382} # as_fn_error
14383
14384
14385# as_fn_set_status STATUS
14386# -----------------------
14387# Set $? to STATUS, without forking.
14388as_fn_set_status ()
14389{
14390 return $1
14391} # as_fn_set_status
14392
14393# as_fn_exit STATUS
14394# -----------------
14395# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14396as_fn_exit ()
14397{
14398 set +e
14399 as_fn_set_status $1
14400 exit $1
14401} # as_fn_exit
14402
14403# as_fn_unset VAR
14404# ---------------
14405# Portably unset VAR.
14406as_fn_unset ()
14407{
14408 { eval $1=; unset $1;}
14409}
14410as_unset=as_fn_unset
14411# as_fn_append VAR VALUE
14412# ----------------------
14413# Append the text in VALUE to the end of the definition contained in VAR. Take
14414# advantage of any shell optimizations that allow amortized linear growth over
14415# repeated appends, instead of the typical quadratic growth present in naive
14416# implementations.
14417if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14418 eval 'as_fn_append ()
14419 {
14420 eval $1+=\$2
14421 }'
14422else
14423 as_fn_append ()
14424 {
14425 eval $1=\$$1\$2
14426 }
14427fi # as_fn_append
14428
14429# as_fn_arith ARG...
14430# ------------------
14431# Perform arithmetic evaluation on the ARGs, and store the result in the
14432# global $as_val. Take advantage of shells that can avoid forks. The arguments
14433# must be portable across $(()) and expr.
14434if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14435 eval 'as_fn_arith ()
14436 {
14437 as_val=$(( $* ))
14438 }'
14439else
14440 as_fn_arith ()
14441 {
14442 as_val=`expr "$@" || test $? -eq 1`
14443 }
14444fi # as_fn_arith
14445
14446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014447if expr a : '\(a\)' >/dev/null 2>&1 &&
14448 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14449 as_expr=expr
14450else
14451 as_expr=false
14452fi
14453
14454if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14455 as_basename=basename
14456else
14457 as_basename=false
14458fi
14459
Matthias Kloseb9621712010-04-24 17:59:49 +000014460if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14461 as_dirname=dirname
14462else
14463 as_dirname=false
14464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466as_me=`$as_basename -- "$0" ||
14467$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14468 X"$0" : 'X\(//\)$' \| \
14469 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014470$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471 sed '/^.*\/\([^/][^/]*\)\/*$/{
14472 s//\1/
14473 q
14474 }
14475 /^X\/\(\/\/\)$/{
14476 s//\1/
14477 q
14478 }
14479 /^X\/\(\/\).*/{
14480 s//\1/
14481 q
14482 }
14483 s/.*/./; q'`
14484
Matthias Kloseb9621712010-04-24 17:59:49 +000014485# Avoid depending upon Character Ranges.
14486as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14487as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14488as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14489as_cr_digits='0123456789'
14490as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014491
14492ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014493case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014496 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 xy) ECHO_C='\c';;
14498 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14499 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014500 esac;;
14501*)
14502 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014503esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014504
Martin v. Löwis11437992002-04-12 09:54:03 +000014505rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506if test -d conf$$.dir; then
14507 rm -f conf$$.dir/conf$$.file
14508else
14509 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014512if (echo >conf$$.file) 2>/dev/null; then
14513 if ln -s conf$$.file conf$$ 2>/dev/null; then
14514 as_ln_s='ln -s'
14515 # ... but there are two gotchas:
14516 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14517 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014518 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014520 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 elif ln conf$$.file conf$$ 2>/dev/null; then
14522 as_ln_s=ln
14523 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014524 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014526else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014527 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000014528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014529rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14530rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532
14533# as_fn_mkdir_p
14534# -------------
14535# Create "$as_dir" as a directory, including parents if necessary.
14536as_fn_mkdir_p ()
14537{
14538
14539 case $as_dir in #(
14540 -*) as_dir=./$as_dir;;
14541 esac
14542 test -d "$as_dir" || eval $as_mkdir_p || {
14543 as_dirs=
14544 while :; do
14545 case $as_dir in #(
14546 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14547 *) as_qdir=$as_dir;;
14548 esac
14549 as_dirs="'$as_qdir' $as_dirs"
14550 as_dir=`$as_dirname -- "$as_dir" ||
14551$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14552 X"$as_dir" : 'X\(//\)[^/]' \| \
14553 X"$as_dir" : 'X\(//\)$' \| \
14554 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14555$as_echo X"$as_dir" |
14556 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14557 s//\1/
14558 q
14559 }
14560 /^X\(\/\/\)[^/].*/{
14561 s//\1/
14562 q
14563 }
14564 /^X\(\/\/\)$/{
14565 s//\1/
14566 q
14567 }
14568 /^X\(\/\).*/{
14569 s//\1/
14570 q
14571 }
14572 s/.*/./; q'`
14573 test -d "$as_dir" && break
14574 done
14575 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014576 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014577
14578
14579} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014580if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014581 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014582else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014583 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014584 as_mkdir_p=false
14585fi
14586
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014587
14588# as_fn_executable_p FILE
14589# -----------------------
14590# Test if FILE is an executable regular file.
14591as_fn_executable_p ()
14592{
14593 test -f "$1" && test -x "$1"
14594} # as_fn_executable_p
14595as_test_x='test -x'
14596as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014597
14598# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014599as_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 +000014600
14601# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014602as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014603
14604
Martin v. Löwis11437992002-04-12 09:54:03 +000014605exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014606## ----------------------------------- ##
14607## Main body of $CONFIG_STATUS script. ##
14608## ----------------------------------- ##
14609_ASEOF
14610test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014611
Matthias Kloseb9621712010-04-24 17:59:49 +000014612cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14613# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014614# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615# values after options handling.
14616ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014617This file was extended by python $as_me 3.2, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014618generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014619
14620 CONFIG_FILES = $CONFIG_FILES
14621 CONFIG_HEADERS = $CONFIG_HEADERS
14622 CONFIG_LINKS = $CONFIG_LINKS
14623 CONFIG_COMMANDS = $CONFIG_COMMANDS
14624 $ $0 $@
14625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626on `(hostname || uname -n) 2>/dev/null | sed 1q`
14627"
14628
Martin v. Löwis11437992002-04-12 09:54:03 +000014629_ACEOF
14630
Matthias Kloseb9621712010-04-24 17:59:49 +000014631case $ac_config_files in *"
14632"*) set x $ac_config_files; shift; ac_config_files=$*;;
14633esac
14634
14635case $ac_config_headers in *"
14636"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14637esac
14638
14639
14640cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014641# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014642config_files="$ac_config_files"
14643config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014645_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014646
Matthias Kloseb9621712010-04-24 17:59:49 +000014647cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014648ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014649\`$as_me' instantiates files and other configuration actions
14650from templates according to the current configuration. Unless the files
14651and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014652
Matthias Kloseb9621712010-04-24 17:59:49 +000014653Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014654
14655 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014657 --config print configuration, then exit
14658 -q, --quiet, --silent
14659 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014660 -d, --debug don't remove temporary files
14661 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014662 --file=FILE[:TEMPLATE]
14663 instantiate the configuration file FILE
14664 --header=FILE[:TEMPLATE]
14665 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014666
14667Configuration files:
14668$config_files
14669
14670Configuration headers:
14671$config_headers
14672
Matthias Kloseb9621712010-04-24 17:59:49 +000014673Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014676cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14677ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014678ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014679python config.status 3.2
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014680configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014682
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014683Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014684This config.status script is free software; the Free Software Foundation
14685gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686
14687ac_pwd='$ac_pwd'
14688srcdir='$srcdir'
14689INSTALL='$INSTALL'
Trent Nelsona45afca2012-08-30 14:32:02 +000014690MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000014691test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014692_ACEOF
14693
Matthias Kloseb9621712010-04-24 17:59:49 +000014694cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14695# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014696ac_need_defaults=:
14697while test $# != 0
14698do
14699 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014700 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014701 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14702 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014703 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014704 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014705 --*=)
14706 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14707 ac_optarg=
14708 ac_shift=:
14709 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014710 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014711 ac_option=$1
14712 ac_optarg=$2
14713 ac_shift=shift
14714 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014715 esac
14716
Skip Montanaro6dead952003-09-25 14:50:04 +000014717 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014718 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014719 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14720 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014721 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 $as_echo "$ac_cs_version"; exit ;;
14723 --config | --confi | --conf | --con | --co | --c )
14724 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014725 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014726 debug=: ;;
14727 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014728 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 case $ac_optarg in
14730 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014731 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 esac
14733 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014734 ac_need_defaults=false;;
14735 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014736 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 case $ac_optarg in
14738 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14739 esac
14740 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014741 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014742 --he | --h)
14743 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014744 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014745Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014746 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014747 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014748 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14749 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14750 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014751
14752 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014753 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014754Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014755
Matthias Kloseb9621712010-04-24 17:59:49 +000014756 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014757 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014758
14759 esac
14760 shift
14761done
14762
Skip Montanaro6dead952003-09-25 14:50:04 +000014763ac_configure_extra_args=
14764
14765if $ac_cs_silent; then
14766 exec 6>/dev/null
14767 ac_configure_extra_args="$ac_configure_extra_args --silent"
14768fi
14769
14770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014772if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014773 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000014774 shift
14775 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14776 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014778 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014779fi
14780
Martin v. Löwis11437992002-04-12 09:54:03 +000014781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014782cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783exec 5>>config.log
14784{
14785 echo
14786 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14787## Running $as_me. ##
14788_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014793cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014794_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014795
Matthias Kloseb9621712010-04-24 17:59:49 +000014796cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797
14798# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014799for ac_config_target in $ac_config_targets
14800do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014801 case $ac_config_target in
14802 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14803 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14804 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014805 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14806 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14808 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014809 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014810 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811
Gregory P. Smith69140482012-01-16 02:05:55 -080014812 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014813 esac
14814done
14815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014816
Martin v. Löwis11437992002-04-12 09:54:03 +000014817# If the user did not use the arguments to specify the items to instantiate,
14818# then the envvar interface is used. Set only those that are not.
14819# We use the long form for the default assignment because of an extremely
14820# bizarre bug on SunOS 4.1.3.
14821if $ac_need_defaults; then
14822 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14823 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14824fi
14825
Skip Montanaro6dead952003-09-25 14:50:04 +000014826# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014828# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014829# Hook for its removal unless debugging.
14830# Note that there is a small window in which the directory will not be cleaned:
14831# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014832$debug ||
14833{
Gregory P. Smith69140482012-01-16 02:05:55 -080014834 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014835 trap 'exit_status=$?
Gregory P. Smith69140482012-01-16 02:05:55 -080014836 : "${ac_tmp:=$tmp}"
14837 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014839 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014840}
Martin v. Löwis11437992002-04-12 09:54:03 +000014841# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014842
Martin v. Löwis11437992002-04-12 09:54:03 +000014843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014844 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Gregory P. Smith69140482012-01-16 02:05:55 -080014845 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014846} ||
14847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848 tmp=./conf$$-$RANDOM
14849 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014850} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080014851ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014852
Matthias Kloseb9621712010-04-24 17:59:49 +000014853# Set up the scripts for CONFIG_FILES section.
14854# No need to generate them if there are no CONFIG_FILES.
14855# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014856if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858
14859ac_cr=`echo X | tr X '\015'`
14860# On cygwin, bash can eat \r inside `` if the user requested igncr.
14861# But we know of no other shell where ac_cr would be empty at this
14862# point, so we can use a bashism as a fallback.
14863if test "x$ac_cr" = x; then
14864 eval ac_cr=\$\'\\r\'
14865fi
14866ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14867if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014868 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014869else
14870 ac_cs_awk_cr=$ac_cr
14871fi
14872
Gregory P. Smith69140482012-01-16 02:05:55 -080014873echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014874_ACEOF
14875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876
Matthias Kloseb9621712010-04-24 17:59:49 +000014877{
14878 echo "cat >conf$$subs.awk <<_ACEOF" &&
14879 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14880 echo "_ACEOF"
14881} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014882 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14883ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014884ac_delim='%!_!# '
14885for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014886 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014887 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014888
Matthias Kloseb9621712010-04-24 17:59:49 +000014889 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14890 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891 break
14892 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014893 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894 else
14895 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014896 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897done
Matthias Kloseb9621712010-04-24 17:59:49 +000014898rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899
Matthias Kloseb9621712010-04-24 17:59:49 +000014900cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Gregory P. Smith69140482012-01-16 02:05:55 -080014901cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014903sed -n '
14904h
14905s/^/S["/; s/!.*/"]=/
14906p
14907g
14908s/^[^!]*!//
14909:repl
14910t repl
14911s/'"$ac_delim"'$//
14912t delim
14913:nl
14914h
14915s/\(.\{148\}\)..*/\1/
14916t more1
14917s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14918p
14919n
14920b repl
14921:more1
14922s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14923p
14924g
14925s/.\{148\}//
14926t nl
14927:delim
14928h
14929s/\(.\{148\}\)..*/\1/
14930t more2
14931s/["\\]/\\&/g; s/^/"/; s/$/"/
14932p
14933b
14934:more2
14935s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14936p
14937g
14938s/.\{148\}//
14939t delim
14940' <conf$$subs.awk | sed '
14941/^[^""]/{
14942 N
14943 s/\n//
14944}
14945' >>$CONFIG_STATUS || ac_write_fail=1
14946rm -f conf$$subs.awk
14947cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14948_ACAWK
Gregory P. Smith69140482012-01-16 02:05:55 -080014949cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014950 for (key in S) S_is_set[key] = 1
14951 FS = ""
14952
14953}
14954{
14955 line = $ 0
14956 nfields = split(line, field, "@")
14957 substed = 0
14958 len = length(field[1])
14959 for (i = 2; i < nfields; i++) {
14960 key = field[i]
14961 keylen = length(key)
14962 if (S_is_set[key]) {
14963 value = S[key]
14964 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14965 len += length(value) + length(field[++i])
14966 substed = 1
14967 } else
14968 len += 1 + keylen
14969 }
14970
14971 print line
14972}
14973
14974_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014976cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14977if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14978 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14979else
14980 cat
Gregory P. Smith69140482012-01-16 02:05:55 -080014981fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014982 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014983_ACEOF
14984
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014985# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14986# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987# trailing colons and then remove the whole line if VPATH becomes empty
14988# (actually we leave an empty line to preserve line numbers).
14989if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014990 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14991h
14992s///
14993s/^/:/
14994s/[ ]*$/:/
14995s/:\$(srcdir):/:/g
14996s/:\${srcdir}:/:/g
14997s/:@srcdir@:/:/g
14998s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015000x
15001s/\(=[ ]*\).*/\1/
15002G
15003s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004s/^[^=]*=[ ]*$//
15005}'
15006fi
15007
Matthias Kloseb9621712010-04-24 17:59:49 +000015008cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015009fi # test -n "$CONFIG_FILES"
15010
Matthias Kloseb9621712010-04-24 17:59:49 +000015011# Set up the scripts for CONFIG_HEADERS section.
15012# No need to generate them if there are no CONFIG_HEADERS.
15013# This happens for instance with `./config.status Makefile'.
15014if test -n "$CONFIG_HEADERS"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080015015cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015016BEGIN {
15017_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019# Transform confdefs.h into an awk script `defines.awk', embedded as
15020# here-document in config.status, that substitutes the proper values into
15021# config.h.in to produce config.h.
15022
15023# Create a delimiter string that does not exist in confdefs.h, to ease
15024# handling of long lines.
15025ac_delim='%!_!# '
15026for ac_last_try in false false :; do
Gregory P. Smith69140482012-01-16 02:05:55 -080015027 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15028 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015029 break
15030 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015031 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015032 else
15033 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15034 fi
15035done
15036
15037# For the awk script, D is an array of macro values keyed by name,
15038# likewise P contains macro parameters if any. Preserve backslash
15039# newline sequences.
15040
15041ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15042sed -n '
15043s/.\{148\}/&'"$ac_delim"'/g
15044t rset
15045:rset
15046s/^[ ]*#[ ]*define[ ][ ]*/ /
15047t def
15048d
15049:def
15050s/\\$//
15051t bsnl
15052s/["\\]/\\&/g
15053s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15054D["\1"]=" \3"/p
15055s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15056d
15057:bsnl
15058s/["\\]/\\&/g
15059s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15060D["\1"]=" \3\\\\\\n"\\/p
15061t cont
15062s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15063t cont
15064d
15065:cont
15066n
15067s/.\{148\}/&'"$ac_delim"'/g
15068t clear
15069:clear
15070s/\\$//
15071t bsnlc
15072s/["\\]/\\&/g; s/^/"/; s/$/"/p
15073d
15074:bsnlc
15075s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15076b cont
15077' <confdefs.h | sed '
15078s/'"$ac_delim"'/"\\\
15079"/g' >>$CONFIG_STATUS || ac_write_fail=1
15080
15081cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15082 for (key in D) D_is_set[key] = 1
15083 FS = ""
15084}
15085/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15086 line = \$ 0
15087 split(line, arg, " ")
15088 if (arg[1] == "#") {
15089 defundef = arg[2]
15090 mac1 = arg[3]
15091 } else {
15092 defundef = substr(arg[1], 2)
15093 mac1 = arg[2]
15094 }
15095 split(mac1, mac2, "(") #)
15096 macro = mac2[1]
15097 prefix = substr(line, 1, index(line, defundef) - 1)
15098 if (D_is_set[macro]) {
15099 # Preserve the white space surrounding the "#".
15100 print prefix "define", macro P[macro] D[macro]
15101 next
15102 } else {
15103 # Replace #undef with comments. This is necessary, for example,
15104 # in the case of _POSIX_SOURCE, which is predefined and required
15105 # on some systems where configure will not decide to define it.
15106 if (defundef == "undef") {
15107 print "/*", prefix defundef, macro, "*/"
15108 next
15109 }
15110 }
15111}
15112{ print }
15113_ACAWK
15114_ACEOF
15115cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015116 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015117fi # test -n "$CONFIG_HEADERS"
15118
15119
15120eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15121shift
15122for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123do
15124 case $ac_tag in
15125 :[FHLC]) ac_mode=$ac_tag; continue;;
15126 esac
15127 case $ac_mode$ac_tag in
15128 :[FHL]*:*);;
Gregory P. Smith69140482012-01-16 02:05:55 -080015129 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015130 :[FH]-) ac_tag=-:-;;
15131 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15132 esac
15133 ac_save_IFS=$IFS
15134 IFS=:
15135 set x $ac_tag
15136 IFS=$ac_save_IFS
15137 shift
15138 ac_file=$1
15139 shift
15140
15141 case $ac_mode in
15142 :L) ac_source=$1;;
15143 :[FH])
15144 ac_file_inputs=
15145 for ac_f
15146 do
15147 case $ac_f in
Gregory P. Smith69140482012-01-16 02:05:55 -080015148 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015149 *) # Look for the file first in the build tree, then in the source tree
15150 # (if the path is not absolute). The absolute path cannot be DOS-style,
15151 # because $ac_f cannot contain `:'.
15152 test -f "$ac_f" ||
15153 case $ac_f in
15154 [\\/$]*) false;;
15155 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15156 esac ||
Gregory P. Smith69140482012-01-16 02:05:55 -080015157 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015158 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15160 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015161 done
15162
15163 # Let's still pretend it is `configure' which instantiates (i.e., don't
15164 # use $as_me), people would be surprised to read:
15165 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015166 configure_input='Generated from '`
15167 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15168 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015169 if test x"$ac_file" != x-; then
15170 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15172$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015173 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015174 # Neutralize special characters interpreted by sed in replacement strings.
15175 case $configure_input in #(
15176 *\&* | *\|* | *\\* )
15177 ac_sed_conf_input=`$as_echo "$configure_input" |
15178 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15179 *) ac_sed_conf_input=$configure_input;;
15180 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181
15182 case $ac_tag in
Gregory P. Smith69140482012-01-16 02:05:55 -080015183 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15184 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015185 esac
15186 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 esac
15188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015189 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015190$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015191 X"$ac_file" : 'X\(//\)[^/]' \| \
15192 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015194$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015195 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15196 s//\1/
15197 q
15198 }
15199 /^X\(\/\/\)[^/].*/{
15200 s//\1/
15201 q
15202 }
15203 /^X\(\/\/\)$/{
15204 s//\1/
15205 q
15206 }
15207 /^X\(\/\).*/{
15208 s//\1/
15209 q
15210 }
15211 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015213 ac_builddir=.
15214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215case "$ac_dir" in
15216.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15217*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015219 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015220 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221 case $ac_top_builddir_sub in
15222 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15223 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15224 esac ;;
15225esac
15226ac_abs_top_builddir=$ac_pwd
15227ac_abs_builddir=$ac_pwd$ac_dir_suffix
15228# for backward compatibility:
15229ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015230
15231case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015232 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015233 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015234 ac_top_srcdir=$ac_top_builddir_sub
15235 ac_abs_top_srcdir=$ac_pwd ;;
15236 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015237 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238 ac_top_srcdir=$srcdir
15239 ac_abs_top_srcdir=$srcdir ;;
15240 *) # Relative name.
15241 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15242 ac_top_srcdir=$ac_top_build_prefix$srcdir
15243 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015244esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015246
Martin v. Löwis11437992002-04-12 09:54:03 +000015247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015248 case $ac_mode in
15249 :F)
15250 #
15251 # CONFIG_FILE
15252 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015253
15254 case $INSTALL in
15255 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015256 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015257 esac
Trent Nelsona45afca2012-08-30 14:32:02 +000015258 ac_MKDIR_P=$MKDIR_P
15259 case $MKDIR_P in
15260 [\\/$]* | ?:[\\/]* ) ;;
15261 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15262 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015263_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015264
Matthias Kloseb9621712010-04-24 17:59:49 +000015265cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015266# If the template does not know about datarootdir, expand it.
15267# FIXME: This hack should be removed a few years after 2.60.
15268ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015269ac_sed_dataroot='
15270/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015271 p
15272 q
15273}
15274/@datadir@/p
15275/@docdir@/p
15276/@infodir@/p
15277/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015278/@mandir@/p'
15279case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280*datarootdir*) ac_datarootdir_seen=yes;;
15281*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15283$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015285cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015286 ac_datarootdir_hack='
15287 s&@datadir@&$datadir&g
15288 s&@docdir@&$docdir&g
15289 s&@infodir@&$infodir&g
15290 s&@localedir@&$localedir&g
15291 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015292 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015293esac
15294_ACEOF
15295
15296# Neutralize VPATH when `$srcdir' = `.'.
15297# Shell code in configure.ac might set extrasub.
15298# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015299cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15300ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015301$extrasub
15302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015303cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015304:t
15305/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015306s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015308s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015309s&@srcdir@&$ac_srcdir&;t t
15310s&@abs_srcdir@&$ac_abs_srcdir&;t t
15311s&@top_srcdir@&$ac_top_srcdir&;t t
15312s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15313s&@builddir@&$ac_builddir&;t t
15314s&@abs_builddir@&$ac_abs_builddir&;t t
15315s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15316s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsona45afca2012-08-30 14:32:02 +000015317s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015318$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015319"
Gregory P. Smith69140482012-01-16 02:05:55 -080015320eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15321 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015323test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Gregory P. Smith69140482012-01-16 02:05:55 -080015324 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15325 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15326 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 { $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 +000015328which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015329$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015330which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015331
Gregory P. Smith69140482012-01-16 02:05:55 -080015332 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015333 case $ac_file in
Gregory P. Smith69140482012-01-16 02:05:55 -080015334 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15335 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015336 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015337 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015338 ;;
15339 :H)
15340 #
15341 # CONFIG_HEADER
15342 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015343 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015344 {
15345 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015346 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15347 } >"$ac_tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015348 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080015349 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015350 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15351$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015352 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015353 rm -f "$ac_file"
Gregory P. Smith69140482012-01-16 02:05:55 -080015354 mv "$ac_tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015355 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015356 fi
15357 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015358 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015359 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015360 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015361 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015362 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015364
15365 esac
15366
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015367
15368 case $ac_file$ac_mode in
15369 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15370
15371 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372done # for ac_tag
15373
Guido van Rossum627b2d71993-12-24 10:39:16 +000015374
Matthias Kloseb9621712010-04-24 17:59:49 +000015375as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015376_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015377ac_clean_files=$ac_clean_files_save
15378
Matthias Kloseb9621712010-04-24 17:59:49 +000015379test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015380 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015381
Martin v. Löwis11437992002-04-12 09:54:03 +000015382
15383# configure is writing to config.log, and then calls config.status.
15384# config.status does its own redirection, appending to config.log.
15385# Unfortunately, on DOS this fails, as config.log is still kept open
15386# by configure, so config.status won't be able to write to it; its
15387# output is simply discarded. So we exec the FD to /dev/null,
15388# effectively closing config.log, so it can be properly (re)opened and
15389# appended to by config.status. When coming back to configure, we
15390# need to make the FD available again.
15391if test "$no_create" != yes; then
15392 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015393 ac_config_status_args=
15394 test "$silent" = yes &&
15395 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015396 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015397 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015398 exec 5>>config.log
15399 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15400 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015401 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015402fi
15403if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15404 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15405$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015406fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015407
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015408
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015409echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015410if test ! -f Modules/Setup
15411then
15412 cp $srcdir/Modules/Setup.dist Modules/Setup
15413fi
15414
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015415echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015416if test ! -f Modules/Setup.local
15417then
15418 echo "# Edit this file for local setup changes" >Modules/Setup.local
15419fi
15420
15421echo "creating Makefile"
15422$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15423 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015424 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015425mv config.c Modules