blob: b107bf2923a7abacb8ac522ee435e3c2d8abdb1d [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
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700629EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000630SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
648LIBFFI_INCLUDEDIR
649PKG_CONFIG
650SHLIBS
651CFLAGSFORSHARED
652LINKFORSHARED
653CCSHARED
654BLDSHARED
655LDCXXSHARED
656LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700657SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000658LIBTOOL_CRUFT
659OTHER_LIBTOOL_OPT
660UNIVERSAL_ARCH_FLAGS
661BASECFLAGS
662OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000663ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LN
Trent Nelsona45afca2012-08-30 14:32:02 +0000665MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000666INSTALL_DATA
667INSTALL_SCRIPT
668INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200669PYTHON
670ASDLGEN
Georg Brandl1ca2e792011-03-05 20:51:24 +0100671HAS_HG
672HGBRANCH
673HGTAG
674HGVERSION
Trent Nelson9effe692012-10-16 08:41:32 -0400675BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000676SVNVERSION
677ARFLAGS
678AR
679RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000680USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000681GNULD
682LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000683LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000684RUNSHARED
685INSTSONAME
686LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000687PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000688BLDLIBRARY
689DLLLIBRARY
690LDLIBRARY
691LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100692MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000693BUILDEXEEXT
694EGREP
695GREP
696CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200697NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000698MAINCC
699CXX
700OBJEXT
701EXEEXT
702ac_ct_CC
703CPPFLAGS
704LDFLAGS
705CFLAGS
706CC
707EXPORT_MACOSX_DEPLOYMENT_TARGET
708CONFIGURE_MACOSX_DEPLOYMENT_TARGET
709SGI_ABI
710MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000711FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000712FRAMEWORKUNIXTOOLSPREFIX
713FRAMEWORKALTINSTALLLAST
714FRAMEWORKALTINSTALLFIRST
715FRAMEWORKINSTALLLAST
716FRAMEWORKINSTALLFIRST
717PYTHONFRAMEWORKINSTALLDIR
718PYTHONFRAMEWORKPREFIX
719PYTHONFRAMEWORKDIR
720PYTHONFRAMEWORKIDENTIFIER
721PYTHONFRAMEWORK
722LIPO_32BIT_FLAGS
723ARCH_RUN_32BIT
724UNIVERSALSDK
725CONFIG_ARGS
726SOVERSION
727VERSION
728target_alias
729host_alias
730build_alias
731LIBS
732ECHO_T
733ECHO_N
734ECHO_C
735DEFS
736mandir
737localedir
738libdir
739psdir
740pdfdir
741dvidir
742htmldir
743infodir
744docdir
745oldincludedir
746includedir
747localstatedir
748sharedstatedir
749sysconfdir
750datadir
751datarootdir
752libexecdir
753sbindir
754bindir
755program_transform_name
756prefix
757exec_prefix
758PACKAGE_URL
759PACKAGE_BUGREPORT
760PACKAGE_STRING
761PACKAGE_VERSION
762PACKAGE_TARNAME
763PACKAGE_NAME
764PATH_SEPARATOR
765SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000766ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000767ac_user_opts='
768enable_option_checking
769enable_universalsdk
770with_universal_archs
771with_framework_name
772enable_framework
773with_gcc
774with_cxx_main
775with_suffix
776enable_shared
777enable_profiling
778with_pydebug
779with_libs
780with_system_expat
781with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000782enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000783with_dbmliborder
784with_signal_module
785with_dec_threads
786with_threads
787with_thread
788enable_ipv6
789with_doc_strings
790with_tsc
791with_pymalloc
792with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000793with_fpectl
794with_libm
795with_libc
796enable_big_digits
797with_wide_unicode
798with_computed_gotos
799'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000800 ac_precious_vars='build_alias
801host_alias
802target_alias
803CC
804CFLAGS
805LDFLAGS
806LIBS
807CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000808CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809
Guido van Rossum627b2d71993-12-24 10:39:16 +0000810
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000812ac_init_help=
813ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000814ac_unrecognized_opts=
815ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816# The variables have the same names as the options, with
817# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000818cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000821no_recursion=
822prefix=NONE
823program_prefix=NONE
824program_suffix=NONE
825program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830x_includes=NONE
831x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000832
833# Installation directory options.
834# These are left unexpanded so users can "make install exec_prefix=/foo"
835# and all the variables that are supposed to be based on exec_prefix
836# by default will actually change.
837# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839bindir='${exec_prefix}/bin'
840sbindir='${exec_prefix}/sbin'
841libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842datarootdir='${prefix}/share'
843datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844sysconfdir='${prefix}/etc'
845sharedstatedir='${prefix}/com'
846localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000847includedir='${prefix}/include'
848oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
850infodir='${datarootdir}/info'
851htmldir='${docdir}'
852dvidir='${docdir}'
853pdfdir='${docdir}'
854psdir='${docdir}'
855libdir='${exec_prefix}/lib'
856localedir='${datarootdir}/locale'
857mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863 # If the previous option needs an argument, assign it.
864 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000865 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866 ac_prev=
867 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000868 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000871 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
872 *=) ac_optarg= ;;
873 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876 # Accept the important Cygnus configure options, so we can diagnose typos.
877
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000878 case $ac_dashdash$ac_option in
879 --)
880 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882 -bindir | --bindir | --bindi | --bind | --bin | --bi)
883 ac_prev=bindir ;;
884 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886
887 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000892 -cache-file | --cache-file | --cache-fil | --cache-fi \
893 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
894 ac_prev=cache_file ;;
895 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
896 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 cache_file=$ac_optarg ;;
898
899 --config-cache | -C)
900 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000903 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000905 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
908 | --dataroo | --dataro | --datar)
909 ac_prev=datarootdir ;;
910 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
911 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
912 datarootdir=$ac_optarg ;;
913
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000915 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000917 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000918 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000919 ac_useropt_orig=$ac_useropt
920 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
921 case $ac_user_opts in
922 *"
923"enable_$ac_useropt"
924"*) ;;
925 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
926 ac_unrecognized_sep=', ';;
927 esac
928 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929
930 -docdir | --docdir | --docdi | --doc | --do)
931 ac_prev=docdir ;;
932 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
933 docdir=$ac_optarg ;;
934
935 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
936 ac_prev=dvidir ;;
937 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
938 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
940 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000941 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000943 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000944 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000945 ac_useropt_orig=$ac_useropt
946 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
947 case $ac_user_opts in
948 *"
949"enable_$ac_useropt"
950"*) ;;
951 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
952 ac_unrecognized_sep=', ';;
953 esac
954 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
957 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
958 | --exec | --exe | --ex)
959 ac_prev=exec_prefix ;;
960 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
961 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
962 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000963 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
965 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Obsolete; use --with-gas.
967 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 -help | --help | --hel | --he | -h)
970 ac_init_help=long ;;
971 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
972 ac_init_help=recursive ;;
973 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
974 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
982 ac_prev=htmldir ;;
983 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
984 | --ht=*)
985 htmldir=$ac_optarg ;;
986
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987 -includedir | --includedir | --includedi | --included | --include \
988 | --includ | --inclu | --incl | --inc)
989 ac_prev=includedir ;;
990 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
991 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000993
994 -infodir | --infodir | --infodi | --infod | --info | --inf)
995 ac_prev=infodir ;;
996 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998
999 -libdir | --libdir | --libdi | --libd)
1000 ac_prev=libdir ;;
1001 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003
1004 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1005 | --libexe | --libex | --libe)
1006 ac_prev=libexecdir ;;
1007 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1008 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001011 -localedir | --localedir | --localedi | --localed | --locale)
1012 ac_prev=localedir ;;
1013 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1014 localedir=$ac_optarg ;;
1015
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001017 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018 ac_prev=localstatedir ;;
1019 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001020 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
1023 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1024 ac_prev=mandir ;;
1025 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001029 # Obsolete; use --without-fp.
1030 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
1032 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034 no_create=yes ;;
1035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001036 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1037 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1038 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1041 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1042 | --oldin | --oldi | --old | --ol | --o)
1043 ac_prev=oldincludedir ;;
1044 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1045 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1046 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1050 ac_prev=prefix ;;
1051 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
1054 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1055 | --program-pre | --program-pr | --program-p)
1056 ac_prev=program_prefix ;;
1057 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1058 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
1061 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1062 | --program-suf | --program-su | --program-s)
1063 ac_prev=program_suffix ;;
1064 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1065 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -program-transform-name | --program-transform-name \
1069 | --program-transform-nam | --program-transform-na \
1070 | --program-transform-n | --program-transform- \
1071 | --program-transform | --program-transfor \
1072 | --program-transfo | --program-transf \
1073 | --program-trans | --program-tran \
1074 | --progr-tra | --program-tr | --program-t)
1075 ac_prev=program_transform_name ;;
1076 -program-transform-name=* | --program-transform-name=* \
1077 | --program-transform-nam=* | --program-transform-na=* \
1078 | --program-transform-n=* | --program-transform-=* \
1079 | --program-transform=* | --program-transfor=* \
1080 | --program-transfo=* | --program-transf=* \
1081 | --program-trans=* | --program-tran=* \
1082 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001085 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1086 ac_prev=pdfdir ;;
1087 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1088 pdfdir=$ac_optarg ;;
1089
1090 -psdir | --psdir | --psdi | --psd | --ps)
1091 ac_prev=psdir ;;
1092 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1093 psdir=$ac_optarg ;;
1094
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1096 | -silent | --silent | --silen | --sile | --sil)
1097 silent=yes ;;
1098
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1100 ac_prev=sbindir ;;
1101 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1102 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001104
1105 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1106 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1107 | --sharedst | --shareds | --shared | --share | --shar \
1108 | --sha | --sh)
1109 ac_prev=sharedstatedir ;;
1110 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1111 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1112 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1113 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001116 -site | --site | --sit)
1117 ac_prev=site ;;
1118 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001120
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1122 ac_prev=srcdir ;;
1123 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001126 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1127 | --syscon | --sysco | --sysc | --sys | --sy)
1128 ac_prev=sysconfdir ;;
1129 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1130 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001132
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
1138 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1139 verbose=yes ;;
1140
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 -version | --version | --versio | --versi | --vers | -V)
1142 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
1144 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001145 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001146 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001147 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001148 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001149 ac_useropt_orig=$ac_useropt
1150 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1151 case $ac_user_opts in
1152 *"
1153"with_$ac_useropt"
1154"*) ;;
1155 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1156 ac_unrecognized_sep=', ';;
1157 esac
1158 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
1160 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001162 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001164 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 ac_useropt_orig=$ac_useropt
1166 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1167 case $ac_user_opts in
1168 *"
1169"with_$ac_useropt"
1170"*) ;;
1171 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1172 ac_unrecognized_sep=', ';;
1173 esac
1174 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176 --x)
1177 # Obsolete; use --with-x.
1178 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
1180 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1181 | --x-incl | --x-inc | --x-in | --x-i)
1182 ac_prev=x_includes ;;
1183 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1184 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
1187 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1188 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1189 ac_prev=x_libraries ;;
1190 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1191 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001194 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1195Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 ;;
1197
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 *=*)
1199 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1200 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 case $ac_envvar in #(
1202 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001203 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001205 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 export $ac_envvar ;;
1207
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001208 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Gregory P. Smith69140482012-01-16 02:05:55 -08001213 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214 ;;
1215
1216 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217done
1218
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001221 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222fi
1223
Matthias Kloseb9621712010-04-24 17:59:49 +00001224if test -n "$ac_unrecognized_opts"; then
1225 case $enable_option_checking in
1226 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001227 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1229 esac
1230fi
1231
1232# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001233for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1234 datadir sysconfdir sharedstatedir localstatedir includedir \
1235 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1236 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001238 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001239 # Remove trailing slashes.
1240 case $ac_val in
1241 */ )
1242 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1243 eval $ac_var=\$ac_val;;
1244 esac
1245 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247 [\\/$]* | ?:[\\/]* ) continue;;
1248 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001250 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001251done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001252
Martin v. Löwis11437992002-04-12 09:54:03 +00001253# There might be people who depend on the old broken behavior: `$host'
1254# used to hold the argument of --host etc.
1255# FIXME: To remove some day.
1256build=$build_alias
1257host=$host_alias
1258target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001259
Martin v. Löwis11437992002-04-12 09:54:03 +00001260# FIXME: To remove some day.
1261if test "x$host_alias" != x; then
1262 if test "x$build_alias" = x; then
1263 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 elif test "x$build_alias" != "x$host_alias"; then
1265 cross_compiling=yes
1266 fi
1267fi
1268
1269ac_tool_prefix=
1270test -n "$host_alias" && ac_tool_prefix=$host_alias-
1271
1272test "$silent" = yes && exec 6>/dev/null
1273
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275ac_pwd=`pwd` && test -n "$ac_pwd" &&
1276ac_ls_di=`ls -di .` &&
1277ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001278 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001280 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281
1282
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283# Find the source files, if location was not specified.
1284if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001287 ac_confdir=`$as_dirname -- "$as_myself" ||
1288$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1289 X"$as_myself" : 'X\(//\)[^/]' \| \
1290 X"$as_myself" : 'X\(//\)$' \| \
1291 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1292$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1294 s//\1/
1295 q
1296 }
1297 /^X\(\/\/\)[^/].*/{
1298 s//\1/
1299 q
1300 }
1301 /^X\(\/\/\)$/{
1302 s//\1/
1303 q
1304 }
1305 /^X\(\/\).*/{
1306 s//\1/
1307 q
1308 }
1309 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312 srcdir=..
1313 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001314else
1315 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001317if test ! -r "$srcdir/$ac_unique_file"; then
1318 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001319 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001321ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1322ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001323 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001324 pwd)`
1325# When building in place, set srcdir=.
1326if test "$ac_abs_confdir" = "$ac_pwd"; then
1327 srcdir=.
1328fi
1329# Remove unnecessary trailing slashes from srcdir.
1330# Double slashes in file names in object file debugging info
1331# mess up M-x gdb in Emacs.
1332case $srcdir in
1333*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1334esac
1335for ac_var in $ac_precious_vars; do
1336 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1337 eval ac_env_${ac_var}_value=\$${ac_var}
1338 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1339 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1340done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001341
Martin v. Löwis11437992002-04-12 09:54:03 +00001342#
1343# Report the --help message.
1344#
1345if test "$ac_init_help" = "long"; then
1346 # Omit some internal or obsolete options to make the list less imposing.
1347 # This message is too long to be a string in the A/UX 3.1 sh.
1348 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001349\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001350
1351Usage: $0 [OPTION]... [VAR=VALUE]...
1352
1353To assign environment variables (e.g., CC, CFLAGS...), specify them as
1354VAR=VALUE. See below for descriptions of some of the useful variables.
1355
1356Defaults for the options are specified in brackets.
1357
1358Configuration:
1359 -h, --help display this help and exit
1360 --help=short display options specific to this package
1361 --help=recursive display the short help of all the included packages
1362 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001363 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001364 --cache-file=FILE cache test results in FILE [disabled]
1365 -C, --config-cache alias for \`--cache-file=config.cache'
1366 -n, --no-create do not create output files
1367 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1368
Martin v. Löwis11437992002-04-12 09:54:03 +00001369Installation directories:
1370 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001371 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001373 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001374
1375By default, \`make install' will install all the files in
1376\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1377an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1378for instance \`--prefix=\$HOME'.
1379
1380For better control, use the options below.
1381
1382Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001383 --bindir=DIR user executables [EPREFIX/bin]
1384 --sbindir=DIR system admin executables [EPREFIX/sbin]
1385 --libexecdir=DIR program executables [EPREFIX/libexec]
1386 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1387 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1388 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1389 --libdir=DIR object code libraries [EPREFIX/lib]
1390 --includedir=DIR C header files [PREFIX/include]
1391 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1392 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1393 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1394 --infodir=DIR info documentation [DATAROOTDIR/info]
1395 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1396 --mandir=DIR man documentation [DATAROOTDIR/man]
1397 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1398 --htmldir=DIR html documentation [DOCDIR]
1399 --dvidir=DIR dvi documentation [DOCDIR]
1400 --pdfdir=DIR pdf documentation [DOCDIR]
1401 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001402_ACEOF
1403
1404 cat <<\_ACEOF
1405_ACEOF
1406fi
1407
1408if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001409 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001410 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001411 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 cat <<\_ACEOF
1413
1414Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001415 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1417 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001418 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001419 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --enable-framework[=INSTALLDIR]
1421 Build (MacOSX|Darwin) framework
1422 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001423 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001424 --enable-loadable-sqlite-extensions
1425 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --enable-ipv6 Enable ipv6 (with ipv4) support
1427 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001428 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001429 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001430
1431Optional Packages:
1432 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1433 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001434 --with-universal-archs=ARCH
1435 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001436 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001437 --with-framework-name=FRAMEWORK
1438 specify an alternate name of the framework built
1439 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001441 --with-cxx-main=<compiler>
1442 compile main() and link python executable with C++
1443 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001444 --with-suffix=.exe set executable suffix
1445 --with-pydebug build with Py_DEBUG defined
1446 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001447 --with-system-expat build pyexpat module using an installed expat
1448 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001449 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001450 --with-dbmliborder=db1:db2:...
1451 order to check db backends for dbm. Valid value is a
1452 colon separated string with the backend names
1453 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --with-signal-module disable/enable signal module
1455 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1456 --with(out)-threads[=DIRECTORY]
1457 disable/enable thread support
1458 --with(out)-thread[=DIRECTORY]
1459 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001461 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001463 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001464 --with-fpectl enable SIGFPE catching
1465 --with-libm=STRING math library
1466 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001467 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001468 --with(out)-computed-gotos
1469 Use computed gotos in evaluation loop (enabled by
1470 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001471
1472Some influential environment variables:
1473 CC C compiler command
1474 CFLAGS C compiler flags
1475 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1476 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001478 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 CPP C preprocessor
1481
1482Use these variables to override the choices made by `configure' or to help
1483it to find libraries and programs with nonstandard names/locations.
1484
Georg Brandle2e15612009-05-20 18:25:10 +00001485Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001486_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001488fi
1489
1490if test "$ac_init_help" = "recursive"; then
1491 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001493 test -d "$ac_dir" ||
1494 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1495 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 ac_builddir=.
1497
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001498case "$ac_dir" in
1499.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1500*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001501 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001503 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 case $ac_top_builddir_sub in
1505 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1506 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1507 esac ;;
1508esac
1509ac_abs_top_builddir=$ac_pwd
1510ac_abs_builddir=$ac_pwd$ac_dir_suffix
1511# for backward compatibility:
1512ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001513
1514case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 ac_top_srcdir=$ac_top_builddir_sub
1518 ac_abs_top_srcdir=$ac_pwd ;;
1519 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 ac_top_srcdir=$srcdir
1522 ac_abs_top_srcdir=$srcdir ;;
1523 *) # Relative name.
1524 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1525 ac_top_srcdir=$ac_top_build_prefix$srcdir
1526 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001527esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 cd "$ac_dir" || { ac_status=$?; continue; }
1531 # Check for guested configure.
1532 if test -f "$ac_srcdir/configure.gnu"; then
1533 echo &&
1534 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1535 elif test -f "$ac_srcdir/configure"; then
1536 echo &&
1537 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001539 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001540 fi || ac_status=$?
1541 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001542 done
1543fi
1544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001545test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001546if $ac_init_version; then
1547 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001548python configure 3.2
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001549generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001551Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001552This configure script is free software; the Free Software Foundation
1553gives unlimited permission to copy, distribute and modify it.
1554_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001557
1558## ------------------------ ##
1559## Autoconf initialization. ##
1560## ------------------------ ##
1561
1562# ac_fn_c_try_compile LINENO
1563# --------------------------
1564# Try to compile conftest.$ac_ext, and return whether this succeeded.
1565ac_fn_c_try_compile ()
1566{
1567 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1568 rm -f conftest.$ac_objext
1569 if { { ac_try="$ac_compile"
1570case "(($ac_try" in
1571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1572 *) ac_try_echo=$ac_try;;
1573esac
1574eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1575$as_echo "$ac_try_echo"; } >&5
1576 (eval "$ac_compile") 2>conftest.err
1577 ac_status=$?
1578 if test -s conftest.err; then
1579 grep -v '^ *+' conftest.err >conftest.er1
1580 cat conftest.er1 >&5
1581 mv -f conftest.er1 conftest.err
1582 fi
1583 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1584 test $ac_status = 0; } && {
1585 test -z "$ac_c_werror_flag" ||
1586 test ! -s conftest.err
1587 } && test -s conftest.$ac_objext; then :
1588 ac_retval=0
1589else
1590 $as_echo "$as_me: failed program was:" >&5
1591sed 's/^/| /' conftest.$ac_ext >&5
1592
1593 ac_retval=1
1594fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001595 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001596 as_fn_set_status $ac_retval
1597
1598} # ac_fn_c_try_compile
1599
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001600# ac_fn_c_try_link LINENO
1601# -----------------------
1602# Try to link conftest.$ac_ext, and return whether this succeeded.
1603ac_fn_c_try_link ()
1604{
1605 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1606 rm -f conftest.$ac_objext conftest$ac_exeext
1607 if { { ac_try="$ac_link"
1608case "(($ac_try" in
1609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1610 *) ac_try_echo=$ac_try;;
1611esac
1612eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1613$as_echo "$ac_try_echo"; } >&5
1614 (eval "$ac_link") 2>conftest.err
1615 ac_status=$?
1616 if test -s conftest.err; then
1617 grep -v '^ *+' conftest.err >conftest.er1
1618 cat conftest.er1 >&5
1619 mv -f conftest.er1 conftest.err
1620 fi
1621 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1622 test $ac_status = 0; } && {
1623 test -z "$ac_c_werror_flag" ||
1624 test ! -s conftest.err
1625 } && test -s conftest$ac_exeext && {
1626 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627 test -x conftest$ac_exeext
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001628 }; then :
1629 ac_retval=0
1630else
1631 $as_echo "$as_me: failed program was:" >&5
1632sed 's/^/| /' conftest.$ac_ext >&5
1633
1634 ac_retval=1
1635fi
1636 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1637 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1638 # interfere with the next link command; also delete a directory that is
1639 # left behind by Apple's compiler. We do this before executing the actions.
1640 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001641 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001642 as_fn_set_status $ac_retval
1643
1644} # ac_fn_c_try_link
1645
Matthias Kloseb9621712010-04-24 17:59:49 +00001646# ac_fn_c_try_cpp LINENO
1647# ----------------------
1648# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1649ac_fn_c_try_cpp ()
1650{
1651 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1652 if { { ac_try="$ac_cpp conftest.$ac_ext"
1653case "(($ac_try" in
1654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1655 *) ac_try_echo=$ac_try;;
1656esac
1657eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1658$as_echo "$ac_try_echo"; } >&5
1659 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1660 ac_status=$?
1661 if test -s conftest.err; then
1662 grep -v '^ *+' conftest.err >conftest.er1
1663 cat conftest.er1 >&5
1664 mv -f conftest.er1 conftest.err
1665 fi
1666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001667 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001668 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1669 test ! -s conftest.err
1670 }; then :
1671 ac_retval=0
1672else
1673 $as_echo "$as_me: failed program was:" >&5
1674sed 's/^/| /' conftest.$ac_ext >&5
1675
1676 ac_retval=1
1677fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001678 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001679 as_fn_set_status $ac_retval
1680
1681} # ac_fn_c_try_cpp
1682
1683# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1684# -------------------------------------------------------
1685# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1686# the include files in INCLUDES and setting the cache variable VAR
1687# accordingly.
1688ac_fn_c_check_header_mongrel ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Gregory P. Smith69140482012-01-16 02:05:55 -08001691 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1693$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001694if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001695 $as_echo_n "(cached) " >&6
1696fi
1697eval ac_res=\$$3
1698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1699$as_echo "$ac_res" >&6; }
1700else
1701 # Is the header compilable?
1702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1703$as_echo_n "checking $2 usability... " >&6; }
1704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1705/* end confdefs.h. */
1706$4
1707#include <$2>
1708_ACEOF
1709if ac_fn_c_try_compile "$LINENO"; then :
1710 ac_header_compiler=yes
1711else
1712 ac_header_compiler=no
1713fi
1714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1716$as_echo "$ac_header_compiler" >&6; }
1717
1718# Is the header present?
1719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1720$as_echo_n "checking $2 presence... " >&6; }
1721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1722/* end confdefs.h. */
1723#include <$2>
1724_ACEOF
1725if ac_fn_c_try_cpp "$LINENO"; then :
1726 ac_header_preproc=yes
1727else
1728 ac_header_preproc=no
1729fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001730rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1732$as_echo "$ac_header_preproc" >&6; }
1733
1734# So? What about this header?
1735case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1736 yes:no: )
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1738$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1740$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1741 ;;
1742 no:yes:* )
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1744$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1746$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1747 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1748$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1750$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1752$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001753( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001754## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001755## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001756 ) | sed "s/^/$as_me: WARNING: /" >&2
1757 ;;
1758esac
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1760$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001761if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 $as_echo_n "(cached) " >&6
1763else
1764 eval "$3=\$ac_header_compiler"
1765fi
1766eval ac_res=\$$3
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1768$as_echo "$ac_res" >&6; }
1769fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001770 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001771
1772} # ac_fn_c_check_header_mongrel
1773
1774# ac_fn_c_try_run LINENO
1775# ----------------------
1776# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1777# that executables *can* be run.
1778ac_fn_c_try_run ()
1779{
1780 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1781 if { { ac_try="$ac_link"
1782case "(($ac_try" in
1783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784 *) ac_try_echo=$ac_try;;
1785esac
1786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787$as_echo "$ac_try_echo"; } >&5
1788 (eval "$ac_link") 2>&5
1789 ac_status=$?
1790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1791 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1792 { { case "(($ac_try" in
1793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1794 *) ac_try_echo=$ac_try;;
1795esac
1796eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1797$as_echo "$ac_try_echo"; } >&5
1798 (eval "$ac_try") 2>&5
1799 ac_status=$?
1800 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1801 test $ac_status = 0; }; }; then :
1802 ac_retval=0
1803else
1804 $as_echo "$as_me: program exited with status $ac_status" >&5
1805 $as_echo "$as_me: failed program was:" >&5
1806sed 's/^/| /' conftest.$ac_ext >&5
1807
1808 ac_retval=$ac_status
1809fi
1810 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001811 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001812 as_fn_set_status $ac_retval
1813
1814} # ac_fn_c_try_run
1815
1816# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1817# -------------------------------------------------------
1818# Tests whether HEADER exists and can be compiled using the include files in
1819# INCLUDES, setting the cache variable VAR accordingly.
1820ac_fn_c_check_header_compile ()
1821{
1822 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1824$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001825if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001826 $as_echo_n "(cached) " >&6
1827else
1828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1829/* end confdefs.h. */
1830$4
1831#include <$2>
1832_ACEOF
1833if ac_fn_c_try_compile "$LINENO"; then :
1834 eval "$3=yes"
1835else
1836 eval "$3=no"
1837fi
1838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1839fi
1840eval ac_res=\$$3
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1842$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001843 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001844
1845} # ac_fn_c_check_header_compile
1846
Matthias Kloseb9621712010-04-24 17:59:49 +00001847# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1848# -------------------------------------------
1849# Tests whether TYPE exists after having included INCLUDES, setting cache
1850# variable VAR accordingly.
1851ac_fn_c_check_type ()
1852{
1853 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1855$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001856if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001857 $as_echo_n "(cached) " >&6
1858else
1859 eval "$3=no"
1860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1861/* end confdefs.h. */
1862$4
1863int
1864main ()
1865{
1866if (sizeof ($2))
1867 return 0;
1868 ;
1869 return 0;
1870}
1871_ACEOF
1872if ac_fn_c_try_compile "$LINENO"; then :
1873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1874/* end confdefs.h. */
1875$4
1876int
1877main ()
1878{
1879if (sizeof (($2)))
1880 return 0;
1881 ;
1882 return 0;
1883}
1884_ACEOF
1885if ac_fn_c_try_compile "$LINENO"; then :
1886
1887else
1888 eval "$3=yes"
1889fi
1890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1891fi
1892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1893fi
1894eval ac_res=\$$3
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1896$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001898
1899} # ac_fn_c_check_type
1900
1901# ac_fn_c_find_uintX_t LINENO BITS VAR
1902# ------------------------------------
1903# Finds an unsigned integer type with width BITS, setting cache variable VAR
1904# accordingly.
1905ac_fn_c_find_uintX_t ()
1906{
1907 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1909$as_echo_n "checking for uint$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001910if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001911 $as_echo_n "(cached) " >&6
1912else
1913 eval "$3=no"
1914 # Order is important - never check a type that is potentially smaller
1915 # than half of the expected target width.
1916 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1917 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1919/* end confdefs.h. */
1920$ac_includes_default
1921int
1922main ()
1923{
1924static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001925test_array [0] = 0;
1926return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001927
1928 ;
1929 return 0;
1930}
1931_ACEOF
1932if ac_fn_c_try_compile "$LINENO"; then :
1933 case $ac_type in #(
1934 uint$2_t) :
1935 eval "$3=yes" ;; #(
1936 *) :
1937 eval "$3=\$ac_type" ;;
1938esac
1939fi
1940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001941 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001942
1943else
1944 break
1945fi
1946 done
1947fi
1948eval ac_res=\$$3
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1950$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001951 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001952
1953} # ac_fn_c_find_uintX_t
1954
1955# ac_fn_c_find_intX_t LINENO BITS VAR
1956# -----------------------------------
1957# Finds a signed integer type with width BITS, setting cache variable VAR
1958# accordingly.
1959ac_fn_c_find_intX_t ()
1960{
1961 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1963$as_echo_n "checking for int$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001964if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001965 $as_echo_n "(cached) " >&6
1966else
1967 eval "$3=no"
1968 # Order is important - never check a type that is potentially smaller
1969 # than half of the expected target width.
1970 for ac_type in int$2_t 'int' 'long int' \
1971 'long long int' 'short int' 'signed char'; do
1972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1973/* end confdefs.h. */
1974$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001975 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001976int
1977main ()
1978{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001979static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001980test_array [0] = 0;
1981return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001982
1983 ;
1984 return 0;
1985}
1986_ACEOF
1987if ac_fn_c_try_compile "$LINENO"; then :
1988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989/* end confdefs.h. */
1990$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001991 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001992int
1993main ()
1994{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001995static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001996 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001997test_array [0] = 0;
1998return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
2000 ;
2001 return 0;
2002}
2003_ACEOF
2004if ac_fn_c_try_compile "$LINENO"; then :
2005
2006else
2007 case $ac_type in #(
2008 int$2_t) :
2009 eval "$3=yes" ;; #(
2010 *) :
2011 eval "$3=\$ac_type" ;;
2012esac
2013fi
2014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2015fi
2016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002017 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019else
2020 break
2021fi
2022 done
2023fi
2024eval ac_res=\$$3
2025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2026$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002027 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002028
2029} # ac_fn_c_find_intX_t
2030
2031# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2032# --------------------------------------------
2033# Tries to find the compile-time value of EXPR in a program that includes
2034# INCLUDES, setting VAR accordingly. Returns whether the value could be
2035# computed
2036ac_fn_c_compute_int ()
2037{
2038 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039 if test "$cross_compiling" = yes; then
2040 # Depending upon the size, compute the lo and hi bounds.
2041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_lo=0 ac_mid=0
2057 while :; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002065test_array [0] = 0;
2066return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_hi=$ac_mid; break
2074else
2075 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2076 if test $ac_lo -le $ac_mid; then
2077 ac_lo= ac_hi=
2078 break
2079 fi
2080 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 done
2084else
2085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086/* end confdefs.h. */
2087$4
2088int
2089main ()
2090{
2091static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002092test_array [0] = 0;
2093return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002094
2095 ;
2096 return 0;
2097}
2098_ACEOF
2099if ac_fn_c_try_compile "$LINENO"; then :
2100 ac_hi=-1 ac_mid=-1
2101 while :; do
2102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h. */
2104$4
2105int
2106main ()
2107{
2108static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002109test_array [0] = 0;
2110return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_lo=$ac_mid; break
2118else
2119 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2120 if test $ac_mid -le $ac_hi; then
2121 ac_lo= ac_hi=
2122 break
2123 fi
2124 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2125fi
2126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2127 done
2128else
2129 ac_lo= ac_hi=
2130fi
2131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132fi
2133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2134# Binary search between lo and hi bounds.
2135while test "x$ac_lo" != "x$ac_hi"; do
2136 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138/* end confdefs.h. */
2139$4
2140int
2141main ()
2142{
2143static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002144test_array [0] = 0;
2145return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_compile "$LINENO"; then :
2152 ac_hi=$ac_mid
2153else
2154 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2155fi
2156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2157done
2158case $ac_lo in #((
2159?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2160'') ac_retval=1 ;;
2161esac
2162 else
2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164/* end confdefs.h. */
2165$4
2166static long int longval () { return $2; }
2167static unsigned long int ulongval () { return $2; }
2168#include <stdio.h>
2169#include <stdlib.h>
2170int
2171main ()
2172{
2173
2174 FILE *f = fopen ("conftest.val", "w");
2175 if (! f)
2176 return 1;
2177 if (($2) < 0)
2178 {
2179 long int i = longval ();
2180 if (i != ($2))
2181 return 1;
2182 fprintf (f, "%ld", i);
2183 }
2184 else
2185 {
2186 unsigned long int i = ulongval ();
2187 if (i != ($2))
2188 return 1;
2189 fprintf (f, "%lu", i);
2190 }
2191 /* Do not output a trailing newline, as this causes \r\n confusion
2192 on some platforms. */
2193 return ferror (f) || fclose (f) != 0;
2194
2195 ;
2196 return 0;
2197}
2198_ACEOF
2199if ac_fn_c_try_run "$LINENO"; then :
2200 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2201else
2202 ac_retval=1
2203fi
2204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2205 conftest.$ac_objext conftest.beam conftest.$ac_ext
2206rm -f conftest.val
2207
2208 fi
Gregory P. Smith69140482012-01-16 02:05:55 -08002209 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002210 as_fn_set_status $ac_retval
2211
2212} # ac_fn_c_compute_int
2213
2214# ac_fn_c_check_func LINENO FUNC VAR
2215# ----------------------------------
2216# Tests whether FUNC exists, setting the cache variable VAR accordingly
2217ac_fn_c_check_func ()
2218{
2219 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2221$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002222if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002223 $as_echo_n "(cached) " >&6
2224else
2225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2226/* end confdefs.h. */
2227/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2228 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2229#define $2 innocuous_$2
2230
2231/* System header to define __stub macros and hopefully few prototypes,
2232 which can conflict with char $2 (); below.
2233 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2234 <limits.h> exists even on freestanding compilers. */
2235
2236#ifdef __STDC__
2237# include <limits.h>
2238#else
2239# include <assert.h>
2240#endif
2241
2242#undef $2
2243
2244/* Override any GCC internal prototype to avoid an error.
2245 Use char because int might match the return type of a GCC
2246 builtin and then its argument prototype would still apply. */
2247#ifdef __cplusplus
2248extern "C"
2249#endif
2250char $2 ();
2251/* The GNU C library defines this for functions which it implements
2252 to always fail with ENOSYS. Some functions are actually named
2253 something starting with __ and the normal name is an alias. */
2254#if defined __stub_$2 || defined __stub___$2
2255choke me
2256#endif
2257
2258int
2259main ()
2260{
2261return $2 ();
2262 ;
2263 return 0;
2264}
2265_ACEOF
2266if ac_fn_c_try_link "$LINENO"; then :
2267 eval "$3=yes"
2268else
2269 eval "$3=no"
2270fi
2271rm -f core conftest.err conftest.$ac_objext \
2272 conftest$ac_exeext conftest.$ac_ext
2273fi
2274eval ac_res=\$$3
2275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2276$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002277 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002278
2279} # ac_fn_c_check_func
2280
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002281# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2282# ---------------------------------------------
2283# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2284# accordingly.
2285ac_fn_c_check_decl ()
2286{
2287 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2288 as_decl_name=`echo $2|sed 's/ *(.*//'`
2289 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2291$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2292if eval \${$3+:} false; then :
2293 $as_echo_n "(cached) " >&6
2294else
2295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h. */
2297$4
2298int
2299main ()
2300{
2301#ifndef $as_decl_name
2302#ifdef __cplusplus
2303 (void) $as_decl_use;
2304#else
2305 (void) $as_decl_name;
2306#endif
2307#endif
2308
2309 ;
2310 return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_compile "$LINENO"; then :
2314 eval "$3=yes"
2315else
2316 eval "$3=no"
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319fi
2320eval ac_res=\$$3
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2322$as_echo "$ac_res" >&6; }
2323 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2324
2325} # ac_fn_c_check_decl
2326
Matthias Kloseb9621712010-04-24 17:59:49 +00002327# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2328# ----------------------------------------------------
2329# Tries to find if the field MEMBER exists in type AGGR, after including
2330# INCLUDES, setting cache variable VAR accordingly.
2331ac_fn_c_check_member ()
2332{
2333 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2335$as_echo_n "checking for $2.$3... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002336if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002337 $as_echo_n "(cached) " >&6
2338else
2339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2340/* end confdefs.h. */
2341$5
2342int
2343main ()
2344{
2345static $2 ac_aggr;
2346if (ac_aggr.$3)
2347return 0;
2348 ;
2349 return 0;
2350}
2351_ACEOF
2352if ac_fn_c_try_compile "$LINENO"; then :
2353 eval "$4=yes"
2354else
2355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356/* end confdefs.h. */
2357$5
2358int
2359main ()
2360{
2361static $2 ac_aggr;
2362if (sizeof ac_aggr.$3)
2363return 0;
2364 ;
2365 return 0;
2366}
2367_ACEOF
2368if ac_fn_c_try_compile "$LINENO"; then :
2369 eval "$4=yes"
2370else
2371 eval "$4=no"
2372fi
2373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2374fi
2375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2376fi
2377eval ac_res=\$$4
2378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2379$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002380 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002381
2382} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002384This file contains any messages produced by compilers while
2385running configure, to aid debugging if configure makes a mistake.
2386
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002387It was created by python $as_me 3.2, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002388generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002389
2390 $ $0 $@
2391
2392_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002394{
2395cat <<_ASUNAME
2396## --------- ##
2397## Platform. ##
2398## --------- ##
2399
2400hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2401uname -m = `(uname -m) 2>/dev/null || echo unknown`
2402uname -r = `(uname -r) 2>/dev/null || echo unknown`
2403uname -s = `(uname -s) 2>/dev/null || echo unknown`
2404uname -v = `(uname -v) 2>/dev/null || echo unknown`
2405
2406/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2407/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2408
2409/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2410/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2411/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002412/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002413/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2414/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2415/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2416
2417_ASUNAME
2418
2419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2420for as_dir in $PATH
2421do
2422 IFS=$as_save_IFS
2423 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 $as_echo "PATH: $as_dir"
2425 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002426IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002427
2428} >&5
2429
2430cat >&5 <<_ACEOF
2431
2432
2433## ----------- ##
2434## Core tests. ##
2435## ----------- ##
2436
2437_ACEOF
2438
2439
2440# Keep a trace of the command line.
2441# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002442# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002443# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002444# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002445ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002446ac_configure_args0=
2447ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002448ac_must_keep_next=false
2449for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002450do
Skip Montanaro6dead952003-09-25 14:50:04 +00002451 for ac_arg
2452 do
2453 case $ac_arg in
2454 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2455 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2456 | -silent | --silent | --silen | --sile | --sil)
2457 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002460 esac
2461 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002463 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002464 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002465 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002466 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002467 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002468 case $ac_arg in
2469 *=* | --config-cache | -C | -disable-* | --disable-* \
2470 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2471 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2472 | -with-* | --with-* | -without-* | --without-* | --x)
2473 case "$ac_configure_args0 " in
2474 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2475 esac
2476 ;;
2477 -* ) ac_must_keep_next=true ;;
2478 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002479 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002481 ;;
2482 esac
2483 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002484done
Matthias Kloseb9621712010-04-24 17:59:49 +00002485{ ac_configure_args0=; unset ac_configure_args0;}
2486{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002487
2488# When interrupted or exit'd, cleanup temporary files, and complete
2489# config.log. We remove comments because anyway the quotes in there
2490# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491# WARNING: Use '\'' to represent an apostrophe within the trap.
2492# 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 +00002493trap 'exit_status=$?
2494 # Save into config.log some information that might help in debugging.
2495 {
2496 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002497
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002498 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002499## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002500## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002501 echo
2502 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503(
2504 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2505 eval ac_val=\$$ac_var
2506 case $ac_val in #(
2507 *${as_nl}*)
2508 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2510$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 esac
2512 case $ac_var in #(
2513 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2515 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 esac ;;
2517 esac
2518 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2521 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 "s/'\''/'\''\\\\'\'''\''/g;
2524 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2525 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002526 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002528 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 esac |
2530 sort
2531)
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002533
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002534 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002535## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002536## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002537 echo
2538 for ac_var in $ac_subst_vars
2539 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 eval ac_val=\$$ac_var
2541 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002542 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002545 done | sort
2546 echo
2547
2548 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002549 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002551## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002552 echo
2553 for ac_var in $ac_subst_files
2554 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555 eval ac_val=\$$ac_var
2556 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002557 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002559 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002560 done | sort
2561 echo
2562 fi
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002565 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002566## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002567## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002570 echo
2571 fi
2572 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002573 $as_echo "$as_me: caught signal $ac_signal"
2574 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002575 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576 rm -f core *.core core.conftest.* &&
2577 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002580for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002581 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002582done
2583ac_signal=0
2584
2585# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002587
Matthias Kloseb9621712010-04-24 17:59:49 +00002588$as_echo "/* confdefs.h */" > confdefs.h
2589
Martin v. Löwis11437992002-04-12 09:54:03 +00002590# Predefined preprocessor variables.
2591
2592cat >>confdefs.h <<_ACEOF
2593#define PACKAGE_NAME "$PACKAGE_NAME"
2594_ACEOF
2595
Martin v. Löwis11437992002-04-12 09:54:03 +00002596cat >>confdefs.h <<_ACEOF
2597#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2598_ACEOF
2599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600cat >>confdefs.h <<_ACEOF
2601#define PACKAGE_VERSION "$PACKAGE_VERSION"
2602_ACEOF
2603
Martin v. Löwis11437992002-04-12 09:54:03 +00002604cat >>confdefs.h <<_ACEOF
2605#define PACKAGE_STRING "$PACKAGE_STRING"
2606_ACEOF
2607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608cat >>confdefs.h <<_ACEOF
2609#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2610_ACEOF
2611
Matthias Kloseb9621712010-04-24 17:59:49 +00002612cat >>confdefs.h <<_ACEOF
2613#define PACKAGE_URL "$PACKAGE_URL"
2614_ACEOF
2615
Martin v. Löwis11437992002-04-12 09:54:03 +00002616
2617# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002618# Prefer an explicitly selected file to automatically selected ones.
2619ac_site_file1=NONE
2620ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002622 # We do not want a PATH search for config.site.
2623 case $CONFIG_SITE in #((
2624 -*) ac_site_file1=./$CONFIG_SITE;;
2625 */*) ac_site_file1=$CONFIG_SITE;;
2626 *) ac_site_file1=./$CONFIG_SITE;;
2627 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 ac_site_file1=$prefix/share/config.site
2630 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631else
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 ac_site_file1=$ac_default_prefix/share/config.site
2633 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002635for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636do
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 test "x$ac_site_file" = xNONE && continue
2638 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2640$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002642 . "$ac_site_file" \
2643 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2645as_fn_error $? "failed to load site script $ac_site_file
Gregory P. Smith69140482012-01-16 02:05:55 -08002646See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002647 fi
2648done
2649
2650if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 # Some versions of bash will fail to source /dev/null (special files
2652 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2653 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2655$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2658 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 esac
2660 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002661else
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2663$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 >$cache_file
2665fi
2666
2667# Check that the precious variables saved in the cache have kept the same
2668# value.
2669ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2672 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2674 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 case $ac_old_set,$ac_new_set in
2676 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2678$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 +00002679 ac_cache_corrupted=: ;;
2680 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2682$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 ac_cache_corrupted=: ;;
2684 ,);;
2685 *)
2686 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002687 # differences in whitespace do not lead to failure.
2688 ac_old_val_w=`echo x $ac_old_val`
2689 ac_new_val_w=`echo x $ac_new_val`
2690 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2691 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2692$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2693 ac_cache_corrupted=:
2694 else
2695 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2696$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2697 eval $ac_var=\$ac_old_val
2698 fi
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2700$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2702$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 fi;;
2704 esac
2705 # Pass precious variables to config.status.
2706 if test "$ac_new_set" = set; then
2707 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002708 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 *) ac_arg=$ac_var=$ac_new_val ;;
2710 esac
2711 case " $ac_configure_args " in
2712 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002713 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 esac
2715 fi
2716done
2717if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002718 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2719$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2720 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2721$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002722 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002724## -------------------- ##
2725## Main body of script. ##
2726## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002727
Guido van Rossum7f43da71994-08-01 12:15:30 +00002728ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002729ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002730ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2731ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2732ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002733
Guido van Rossum627b2d71993-12-24 10:39:16 +00002734
Michael W. Hudson54241132001-12-07 15:38:26 +00002735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002736ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002737
2738
Martin v. Löwis11437992002-04-12 09:54:03 +00002739
Benjamin Petersond23f8222009-04-05 19:13:16 +00002740if test "$prefix" != "/"; then
2741 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2742fi
2743
2744
Martin v. Löwis11437992002-04-12 09:54:03 +00002745
2746
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002747# We don't use PACKAGE_ variables, and they cause conflicts
2748# with other autoconf-based packages that include Python.h
2749grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2750rm confdefs.h
2751mv confdefs.h.new confdefs.h
2752
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002753
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002754VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002755
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002756# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002757
2758SOVERSION=1.0
2759
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002760# The later defininition of _XOPEN_SOURCE disables certain features
2761# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2762
Matthias Kloseb9621712010-04-24 17:59:49 +00002763$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002764
2765
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002766# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2767# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2768# them.
2769
Matthias Kloseb9621712010-04-24 17:59:49 +00002770$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002771
2772
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002773# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2774# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2775# them.
2776
Matthias Kloseb9621712010-04-24 17:59:49 +00002777$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002778
2779
Martin v. Löwisd6320502004-08-12 13:45:08 +00002780# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2781# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2782
Matthias Kloseb9621712010-04-24 17:59:49 +00002783$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002784
2785
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002786# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2787# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2788# them.
2789
Matthias Kloseb9621712010-04-24 17:59:49 +00002790$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002791
2792
2793
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002794define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002795
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002796# Arguments passed to configure.
2797
2798CONFIG_ARGS="$ac_configure_args"
2799
Matthias Kloseb9621712010-04-24 17:59:49 +00002800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2801$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002802# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002803if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002804 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002805 case $enableval in
2806 yes)
2807 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002808 if test ! -d "${enableval}"
2809 then
2810 enableval=/
2811 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002812 ;;
2813 esac
2814 case $enableval in
2815 no)
2816 UNIVERSALSDK=
2817 enable_universalsdk=
2818 ;;
2819 *)
2820 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002821 if test ! -d "${UNIVERSALSDK}"
2822 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002823 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002824 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002825 ;;
2826 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002827
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002828
Thomas Wouters477c8d52006-05-27 19:21:47 +00002829else
2830
2831 UNIVERSALSDK=
2832 enable_universalsdk=
2833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002834fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002835
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002836if test -n "${UNIVERSALSDK}"
2837then
Matthias Kloseb9621712010-04-24 17:59:49 +00002838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2839$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002840else
Matthias Kloseb9621712010-04-24 17:59:49 +00002841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2842$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002843fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002845
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002846
2847
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002848UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002849
Matthias Kloseb9621712010-04-24 17:59:49 +00002850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2851$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002852
2853# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002854if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002855 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2857$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002858 UNIVERSAL_ARCHS="$withval"
2859
2860else
2861
Matthias Kloseb9621712010-04-24 17:59:49 +00002862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2863$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002864
2865fi
2866
2867
2868
2869
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002870
2871# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002872if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002873 withval=$with_framework_name;
2874 PYTHONFRAMEWORK=${withval}
2875 PYTHONFRAMEWORKDIR=${withval}.framework
2876 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2877
2878else
2879
2880 PYTHONFRAMEWORK=Python
2881 PYTHONFRAMEWORKDIR=Python.framework
2882 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2883
2884fi
2885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002886# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002887if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002888 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002889 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002891 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002892 esac
2893 case $enableval in
2894 no)
2895 PYTHONFRAMEWORK=
2896 PYTHONFRAMEWORKDIR=no-framework
2897 PYTHONFRAMEWORKPREFIX=
2898 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002899 FRAMEWORKINSTALLFIRST=
2900 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002901 FRAMEWORKALTINSTALLFIRST=
2902 FRAMEWORKALTINSTALLLAST=
2903 if test "x${prefix}" = "xNONE"; then
2904 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2905 else
2906 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2907 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002908 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002909 ;;
2910 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002911 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002912 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002913 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002914 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002915 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2916 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002917 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002918
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002919 if test "x${prefix}" = "xNONE" ; then
2920 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002921
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002922 else
2923 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2924 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002925
2926 case "${enableval}" in
2927 /System*)
2928 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2929 if test "${prefix}" = "NONE" ; then
2930 # See below
2931 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2932 fi
2933 ;;
2934
2935 /Library*)
2936 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2937 ;;
2938
2939 */Library/Frameworks)
2940 MDIR="`dirname "${enableval}"`"
2941 MDIR="`dirname "${MDIR}"`"
2942 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2943
2944 if test "${prefix}" = "NONE"; then
2945 # User hasn't specified the
2946 # --prefix option, but wants to install
2947 # the framework in a non-default location,
2948 # ensure that the compatibility links get
2949 # installed relative to that prefix as well
2950 # instead of in /usr/local.
2951 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2952 fi
2953 ;;
2954
2955 *)
2956 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2957 ;;
2958 esac
2959
Jack Jansen127e56e2001-09-11 14:41:54 +00002960 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002961
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002962 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002963 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002964 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002966 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002967
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002968 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2969
2970 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2971
Jack Jansene578a632001-08-15 01:27:14 +00002972 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002973
Guido van Rossum563e7081996-09-10 18:20:48 +00002974else
Martin v. Löwis11437992002-04-12 09:54:03 +00002975
Jack Jansene578a632001-08-15 01:27:14 +00002976 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002977 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002978 PYTHONFRAMEWORKPREFIX=
2979 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002980 FRAMEWORKINSTALLFIRST=
2981 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002982 FRAMEWORKALTINSTALLFIRST=
2983 FRAMEWORKALTINSTALLLAST=
2984 if test "x${prefix}" = "xNONE" ; then
2985 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2986 else
2987 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2988 fi
Jack Jansene578a632001-08-15 01:27:14 +00002989 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002990
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002991
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002992fi
2993
Thomas Wouters477c8d52006-05-27 19:21:47 +00002994
2995
Michael W. Hudson54241132001-12-07 15:38:26 +00002996
2997
2998
2999
Jack Jansene578a632001-08-15 01:27:14 +00003000
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003001
3002
3003
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003004
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003005
Jack Jansene578a632001-08-15 01:27:14 +00003006##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003007## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003008## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003009##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003010# Set name for machine-dependent library files
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3013$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003014if test -z "$MACHDEP"
3015then
Guido van Rossum563e7081996-09-10 18:20:48 +00003016 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003017 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003018 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003019 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003020 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003021 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003022 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003023 ac_md_system=`echo $ac_sys_system |
3024 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3025 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003026 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003027 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003028
Guido van Rossum07397971997-04-29 21:49:50 +00003029 case $MACHDEP in
Victor Stinner0c17d0d2011-08-20 14:01:05 +02003030 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003031 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003032 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003033 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003034 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003035 esac
3036fi
Guido van Rossum91922671997-10-09 20:24:13 +00003037
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003038# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3039# disable features if it is defined, without any means to access these
3040# features as extensions. For these systems, we skip the definition of
3041# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3042# some feature, make sure there is no alternative way to access this
3043# feature. Also, when using wildcards, make sure you have verified the
3044# need for not defining _XOPEN_SOURCE on all systems matching the
3045# wildcard, and that the wildcard does not include future systems
3046# (which may remove their limitations).
3047case $ac_sys_system/$ac_sys_release in
3048 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3049 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003050 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003051 # In addition, Stefan Krah confirms that issue #1244610 exists through
3052 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003053 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003054 define_xopen_source=no
3055 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3056 # also defined. This can be overridden by defining _BSD_SOURCE
3057 # As this has a different meaning on Linux, only define it on OpenBSD
3058
Matthias Kloseb9621712010-04-24 17:59:49 +00003059$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003060
3061 ;;
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003062 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003063 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3064 # also defined. This can be overridden by defining _BSD_SOURCE
3065 # As this has a different meaning on Linux, only define it on OpenBSD
3066
Matthias Kloseb9621712010-04-24 17:59:49 +00003067$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003068
3069 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003070 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3071 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3072 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003073 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 +00003074 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003075 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3076 # request to enable features supported by the standard as a request
3077 # to disable features not supported by the standard. The best way
3078 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3079 # entirely and define __EXTENSIONS__ instead.
3080 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003081 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003082 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3083 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003084 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003085 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003086 define_xopen_source=no;;
3087 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003088 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003089 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003090 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003091 # On FreeBSD 4, the math functions C89 does not cover are never defined
3092 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3093 FreeBSD/4.*)
3094 define_xopen_source=no;;
3095 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3096 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3097 # identifies itself as Darwin/7.*
3098 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3099 # disables platform specific features beyond repair.
3100 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3101 # has no effect, don't bother defining them
3102 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003103 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003104 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003105 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003106 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3107 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3108 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003109 AIX/4)
3110 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003111 AIX/5)
3112 if test `uname -r` -eq 1; then
3113 define_xopen_source=no
3114 fi
3115 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003116 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3117 # defining NI_NUMERICHOST.
3118 QNX/6.3.2)
3119 define_xopen_source=no
3120 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003121
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003122esac
3123
3124if test $define_xopen_source = yes
3125then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003126
Matthias Kloseb9621712010-04-24 17:59:49 +00003127$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003128
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003129
3130 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3131 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3132 # several APIs are not declared. Since this is also needed in some
3133 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003134
Matthias Kloseb9621712010-04-24 17:59:49 +00003135$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003136
3137
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003138
Matthias Kloseb9621712010-04-24 17:59:49 +00003139$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003140
3141
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003142fi
3143
Guido van Rossum91922671997-10-09 20:24:13 +00003144#
3145# SGI compilers allow the specification of the both the ABI and the
3146# ISA on the command line. Depending on the values of these switches,
3147# different and often incompatable code will be generated.
3148#
3149# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3150# thus supply support for various ABI/ISA combinations. The MACHDEP
3151# variable is also adjusted.
3152#
3153
3154if test ! -z "$SGI_ABI"
3155then
3156 CC="cc $SGI_ABI"
3157 LDFLAGS="$SGI_ABI $LDFLAGS"
3158 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3161$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003162
Jack Jansen6b08a402004-06-03 12:41:45 +00003163# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3164# it may influence the way we can build extensions, so distutils
3165# needs to check it
3166
Thomas Wouters477c8d52006-05-27 19:21:47 +00003167
Jack Jansen6b08a402004-06-03 12:41:45 +00003168CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003169EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003170
Matthias Kloseb9621712010-04-24 17:59:49 +00003171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3172$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003173ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3175$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003176
Guido van Rossum627b2d71993-12-24 10:39:16 +00003177# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003178
3179# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3180# for debug/optimization stuff. BASECFLAGS is for flags that are required
3181# just to get things to compile and link. Users are free to override OPT
3182# when running configure or make. The build should not break if they do.
3183# BASECFLAGS should generally not be messed with, however.
3184
3185# XXX shouldn't some/most/all of this code be merged with the stuff later
3186# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3188$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003189
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003191if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003193 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003194 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003195 without_gcc=yes;;
3196 yes) CC=gcc
3197 without_gcc=no;;
3198 *) CC=$withval
3199 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003200 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003201else
Martin v. Löwis11437992002-04-12 09:54:03 +00003202
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003203 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003204 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003205 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003206 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003207 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003208fi
3209
Matthias Kloseb9621712010-04-24 17:59:49 +00003210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3211$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003212
Guido van Rossum8b131c51995-03-09 14:10:13 +00003213# If the user switches compilers, we can't believe the cache
3214if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3215then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003216 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003217(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003218fi
3219
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003220# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3221# when the compiler supports them, but we don't always want -O2, and
3222# we set -g later.
3223if test -z "$CFLAGS"; then
3224 CFLAGS=
3225fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003226ac_ext=c
3227ac_cpp='$CPP $CPPFLAGS'
3228ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3229ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3230ac_compiler_gnu=$ac_cv_c_compiler_gnu
3231if test -n "$ac_tool_prefix"; then
3232 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3233set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3235$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003236if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003237 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003238else
3239 if test -n "$CC"; then
3240 ac_cv_prog_CC="$CC" # Let the user override the test.
3241else
Martin v. Löwis11437992002-04-12 09:54:03 +00003242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3243for as_dir in $PATH
3244do
3245 IFS=$as_save_IFS
3246 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003247 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003248 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003249 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003250 $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 +00003251 break 2
3252 fi
3253done
Matthias Kloseb9621712010-04-24 17:59:49 +00003254 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003255IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003256
Jack Jansendd19cf82001-12-06 22:36:17 +00003257fi
3258fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003259CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003260if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3262$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003263else
Matthias Kloseb9621712010-04-24 17:59:49 +00003264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3265$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003266fi
3267
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003268
Martin v. Löwis11437992002-04-12 09:54:03 +00003269fi
3270if test -z "$ac_cv_prog_CC"; then
3271 ac_ct_CC=$CC
3272 # Extract the first word of "gcc", so it can be a program name with args.
3273set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3275$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003276if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003277 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003278else
3279 if test -n "$ac_ct_CC"; then
3280 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3281else
3282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3283for as_dir in $PATH
3284do
3285 IFS=$as_save_IFS
3286 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003287 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003288 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003289 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003290 $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 +00003291 break 2
3292 fi
3293done
Matthias Kloseb9621712010-04-24 17:59:49 +00003294 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003295IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003296
3297fi
3298fi
3299ac_ct_CC=$ac_cv_prog_ac_ct_CC
3300if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3302$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003303else
Matthias Kloseb9621712010-04-24 17:59:49 +00003304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3305$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003306fi
3307
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003308 if test "x$ac_ct_CC" = x; then
3309 CC=""
3310 else
3311 case $cross_compiling:$ac_tool_warned in
3312yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003313{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3314$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003315ac_tool_warned=yes ;;
3316esac
3317 CC=$ac_ct_CC
3318 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003319else
3320 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003321fi
3322
Jack Jansendd19cf82001-12-06 22:36:17 +00003323if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003324 if test -n "$ac_tool_prefix"; then
3325 # 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 +00003326set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3328$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003329if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003330 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003331else
3332 if test -n "$CC"; then
3333 ac_cv_prog_CC="$CC" # Let the user override the test.
3334else
Martin v. Löwis11437992002-04-12 09:54:03 +00003335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3336for as_dir in $PATH
3337do
3338 IFS=$as_save_IFS
3339 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003340 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003341 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003342 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003343 $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 +00003344 break 2
3345 fi
3346done
Matthias Kloseb9621712010-04-24 17:59:49 +00003347 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003348IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003349
3350fi
3351fi
3352CC=$ac_cv_prog_CC
3353if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3355$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003356else
Matthias Kloseb9621712010-04-24 17:59:49 +00003357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3358$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003359fi
3360
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003361
Martin v. Löwis11437992002-04-12 09:54:03 +00003362 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003363fi
3364if test -z "$CC"; then
3365 # Extract the first word of "cc", so it can be a program name with args.
3366set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3368$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003369if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003370 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003371else
3372 if test -n "$CC"; then
3373 ac_cv_prog_CC="$CC" # Let the user override the test.
3374else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003375 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3377for as_dir in $PATH
3378do
3379 IFS=$as_save_IFS
3380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003381 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003382 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003383 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3384 ac_prog_rejected=yes
3385 continue
3386 fi
3387 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003388 $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 +00003389 break 2
3390 fi
3391done
Matthias Kloseb9621712010-04-24 17:59:49 +00003392 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003393IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003394
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003395if test $ac_prog_rejected = yes; then
3396 # We found a bogon in the path, so make sure we never use it.
3397 set dummy $ac_cv_prog_CC
3398 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003399 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003400 # We chose a different compiler from the bogus one.
3401 # However, it has the same basename, so the bogon will be chosen
3402 # first if we set CC to just the basename; use the full file name.
3403 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003404 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003405 fi
3406fi
3407fi
3408fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003409CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003410if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3412$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003413else
Matthias Kloseb9621712010-04-24 17:59:49 +00003414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3415$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003416fi
3417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003418
Martin v. Löwis11437992002-04-12 09:54:03 +00003419fi
3420if test -z "$CC"; then
3421 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003422 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 do
3424 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3425set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3427$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003428if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003429 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003430else
3431 if test -n "$CC"; then
3432 ac_cv_prog_CC="$CC" # Let the user override the test.
3433else
Martin v. Löwis11437992002-04-12 09:54:03 +00003434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3435for as_dir in $PATH
3436do
3437 IFS=$as_save_IFS
3438 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003440 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003442 $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 +00003443 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003444 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003445done
Matthias Kloseb9621712010-04-24 17:59:49 +00003446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003448
3449fi
3450fi
3451CC=$ac_cv_prog_CC
3452if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3454$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003455else
Matthias Kloseb9621712010-04-24 17:59:49 +00003456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3457$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003458fi
3459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 test -n "$CC" && break
3462 done
3463fi
3464if test -z "$CC"; then
3465 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003467do
3468 # Extract the first word of "$ac_prog", so it can be a program name with args.
3469set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3471$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003472if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003473 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003474else
3475 if test -n "$ac_ct_CC"; then
3476 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3477else
3478as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3479for as_dir in $PATH
3480do
3481 IFS=$as_save_IFS
3482 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003483 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003484 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003486 $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 +00003487 break 2
3488 fi
3489done
Matthias Kloseb9621712010-04-24 17:59:49 +00003490 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003492
Martin v. Löwis11437992002-04-12 09:54:03 +00003493fi
3494fi
3495ac_ct_CC=$ac_cv_prog_ac_ct_CC
3496if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3498$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003499else
Matthias Kloseb9621712010-04-24 17:59:49 +00003500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3501$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003502fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504
Martin v. Löwis11437992002-04-12 09:54:03 +00003505 test -n "$ac_ct_CC" && break
3506done
Michael W. Hudson54241132001-12-07 15:38:26 +00003507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003508 if test "x$ac_ct_CC" = x; then
3509 CC=""
3510 else
3511 case $cross_compiling:$ac_tool_warned in
3512yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003513{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3514$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003515ac_tool_warned=yes ;;
3516esac
3517 CC=$ac_ct_CC
3518 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003519fi
3520
3521fi
3522
3523
Matthias Kloseb9621712010-04-24 17:59:49 +00003524test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3525$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003526as_fn_error $? "no acceptable C compiler found in \$PATH
Gregory P. Smith69140482012-01-16 02:05:55 -08003527See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003528
3529# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003530$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3531set X $ac_compile
3532ac_compiler=$2
3533for ac_option in --version -v -V -qversion; do
3534 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535case "(($ac_try" in
3536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3537 *) ac_try_echo=$ac_try;;
3538esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003539eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3540$as_echo "$ac_try_echo"; } >&5
3541 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003542 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003543 if test -s conftest.err; then
3544 sed '10a\
3545... rest of stderr output deleted ...
3546 10q' conftest.err >conftest.er1
3547 cat conftest.er1 >&5
3548 fi
3549 rm -f conftest.er1 conftest.err
3550 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3551 test $ac_status = 0; }
3552done
Martin v. Löwis11437992002-04-12 09:54:03 +00003553
Matthias Kloseb9621712010-04-24 17:59:49 +00003554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003555/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003556
Martin v. Löwis11437992002-04-12 09:54:03 +00003557int
3558main ()
3559{
3560
3561 ;
3562 return 0;
3563}
3564_ACEOF
3565ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003566ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003567# Try to create an executable without -o first, disregard a.out.
3568# It will help us diagnose broken compilers, and finding out an intuition
3569# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3571$as_echo_n "checking whether the C compiler works... " >&6; }
3572ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3573
3574# The possible output files:
3575ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003577ac_rmfiles=
3578for ac_file in $ac_files
3579do
3580 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003581 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003582 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3583 esac
3584done
3585rm -f $ac_rmfiles
3586
Matthias Kloseb9621712010-04-24 17:59:49 +00003587if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003588case "(($ac_try" in
3589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3590 *) ac_try_echo=$ac_try;;
3591esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003592eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3593$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003594 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3597 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3599# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3600# in a Makefile. We should not override ac_cv_exeext if it was cached,
3601# so that the user can short-circuit this test for compilers unknown to
3602# Autoconf.
3603for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003604do
3605 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003608 ;;
3609 [ab].out )
3610 # We found the default executable, but exeext='' is most
3611 # certainly right.
3612 break;;
3613 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615 then :; else
3616 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3617 fi
3618 # We set ac_cv_exeext here because the later test for it is not
3619 # safe: cross compilers may not add the suffix if given an `-o'
3620 # argument, so we may need to know it at that point already.
3621 # Even if this section looks crufty: it has the advantage of
3622 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003623 break;;
3624 * )
3625 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 esac
3627done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628test "$ac_cv_exeext" = no && ac_cv_exeext=
3629
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003630else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631 ac_file=''
3632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003633if test -z "$ac_file"; then :
3634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3635$as_echo "no" >&6; }
3636$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003637sed 's/^/| /' conftest.$ac_ext >&5
3638
Matthias Kloseb9621712010-04-24 17:59:49 +00003639{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3640$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003641as_fn_error 77 "C compiler cannot create executables
Gregory P. Smith69140482012-01-16 02:05:55 -08003642See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003643else
3644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3645$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3648$as_echo_n "checking for C compiler default output file name... " >&6; }
3649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3650$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003651ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003652
Matthias Kloseb9621712010-04-24 17:59:49 +00003653rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003654ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3656$as_echo_n "checking for suffix of executables... " >&6; }
3657if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003658case "(($ac_try" in
3659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3660 *) ac_try_echo=$ac_try;;
3661esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3663$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003665 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3667 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003668 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3669# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3670# work properly (i.e., refer to `conftest.exe'), while it won't with
3671# `rm'.
3672for ac_file in conftest.exe conftest conftest.*; do
3673 test -f "$ac_file" || continue
3674 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003676 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3677 break;;
3678 * ) break;;
3679 esac
3680done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003681else
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003684as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Gregory P. Smith69140482012-01-16 02:05:55 -08003685See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003687rm -f conftest conftest$ac_cv_exeext
3688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3689$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003690
3691rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003692EXEEXT=$ac_cv_exeext
3693ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3695/* end confdefs.h. */
3696#include <stdio.h>
3697int
3698main ()
3699{
3700FILE *f = fopen ("conftest.out", "w");
3701 return ferror (f) || fclose (f) != 0;
3702
3703 ;
3704 return 0;
3705}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003707ac_clean_files="$ac_clean_files conftest.out"
3708# Check that the compiler produces executables we can run. If not, either
3709# the compiler is broken, or we cross compile.
3710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3711$as_echo_n "checking whether we are cross compiling... " >&6; }
3712if test "$cross_compiling" != yes; then
3713 { { ac_try="$ac_link"
3714case "(($ac_try" in
3715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3716 *) ac_try_echo=$ac_try;;
3717esac
3718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3719$as_echo "$ac_try_echo"; } >&5
3720 (eval "$ac_link") 2>&5
3721 ac_status=$?
3722 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3723 test $ac_status = 0; }
3724 if { ac_try='./conftest$ac_cv_exeext'
3725 { { case "(($ac_try" in
3726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3727 *) ac_try_echo=$ac_try;;
3728esac
3729eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3730$as_echo "$ac_try_echo"; } >&5
3731 (eval "$ac_try") 2>&5
3732 ac_status=$?
3733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3734 test $ac_status = 0; }; }; then
3735 cross_compiling=no
3736 else
3737 if test "$cross_compiling" = maybe; then
3738 cross_compiling=yes
3739 else
3740 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3741$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003742as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003743If you meant to cross compile, use \`--host'.
Gregory P. Smith69140482012-01-16 02:05:55 -08003744See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 fi
3746 fi
3747fi
3748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3749$as_echo "$cross_compiling" >&6; }
3750
3751rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3752ac_clean_files=$ac_clean_files_save
3753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3754$as_echo_n "checking for suffix of object files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003755if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 $as_echo_n "(cached) " >&6
3757else
3758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003759/* end confdefs.h. */
3760
3761int
3762main ()
3763{
3764
3765 ;
3766 return 0;
3767}
3768_ACEOF
3769rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003770if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771case "(($ac_try" in
3772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3773 *) ac_try_echo=$ac_try;;
3774esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003775eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3776$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003778 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3780 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003781 for ac_file in conftest.o conftest.obj conftest.*; do
3782 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003785 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3786 break;;
3787 esac
3788done
3789else
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003791sed 's/^/| /' conftest.$ac_ext >&5
3792
Matthias Kloseb9621712010-04-24 17:59:49 +00003793{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3794$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003795as_fn_error $? "cannot compute suffix of object files: cannot compile
Gregory P. Smith69140482012-01-16 02:05:55 -08003796See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003797fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003798rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3801$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003802OBJEXT=$ac_cv_objext
3803ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3805$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003806if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003808else
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003811
Martin v. Löwis11437992002-04-12 09:54:03 +00003812int
3813main ()
3814{
3815#ifndef __GNUC__
3816 choke me
3817#endif
3818
3819 ;
3820 return 0;
3821}
3822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003823if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003824 ac_compiler_gnu=yes
3825else
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003829ac_cv_c_compiler_gnu=$ac_compiler_gnu
3830
3831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3833$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3834if test $ac_compiler_gnu = yes; then
3835 GCC=yes
3836else
3837 GCC=
3838fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003839ac_test_CFLAGS=${CFLAGS+set}
3840ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3842$as_echo_n "checking whether $CC accepts -g... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003843if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003845else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846 ac_save_c_werror_flag=$ac_c_werror_flag
3847 ac_c_werror_flag=yes
3848 ac_cv_prog_cc_g=no
3849 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003852
Martin v. Löwis11437992002-04-12 09:54:03 +00003853int
3854main ()
3855{
3856
3857 ;
3858 return 0;
3859}
3860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003861if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003862 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003863else
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 CFLAGS=""
3865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866/* end confdefs.h. */
3867
3868int
3869main ()
3870{
3871
3872 ;
3873 return 0;
3874}
3875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003876if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003877
Matthias Kloseb9621712010-04-24 17:59:49 +00003878else
3879 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882/* end confdefs.h. */
3883
3884int
3885main ()
3886{
3887
3888 ;
3889 return 0;
3890}
3891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003892if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3900 ac_c_werror_flag=$ac_save_c_werror_flag
3901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3903$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003904if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003905 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003906elif test $ac_cv_prog_cc_g = yes; then
3907 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003908 CFLAGS="-g -O2"
3909 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003910 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003911 fi
3912else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003913 if test "$GCC" = yes; then
3914 CFLAGS="-O2"
3915 else
3916 CFLAGS=
3917 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3920$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003921if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003922 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003923else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003925ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003927/* end confdefs.h. */
3928#include <stdarg.h>
3929#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003930struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00003931/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3932struct buf { int x; };
3933FILE * (*rcsopen) (struct buf *, struct stat *, int);
3934static char *e (p, i)
3935 char **p;
3936 int i;
3937{
3938 return p[i];
3939}
3940static char *f (char * (*g) (char **, int), char **p, ...)
3941{
3942 char *s;
3943 va_list v;
3944 va_start (v,p);
3945 s = g (p, va_arg (v,int));
3946 va_end (v);
3947 return s;
3948}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003949
3950/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3951 function prototypes and stuff, but not '\xHH' hex character constants.
3952 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003953 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003954 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3955 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003957int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3958
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3960 inside strings and character constants. */
3961#define FOO(x) 'x'
3962int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3963
Skip Montanaro6dead952003-09-25 14:50:04 +00003964int test (int i, double x);
3965struct s1 {int (*f) (int a);};
3966struct s2 {int (*f) (double a);};
3967int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3968int argc;
3969char **argv;
3970int
3971main ()
3972{
3973return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3974 ;
3975 return 0;
3976}
3977_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3979 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003980do
3981 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003982 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985rm -f core conftest.err conftest.$ac_objext
3986 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003987done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003989CC=$ac_save_CC
3990
3991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992# AC_CACHE_VAL
3993case "x$ac_cv_prog_cc_c89" in
3994 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3996$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3999$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004000 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004001 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4003$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004004esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004005if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004006
Matthias Kloseb9621712010-04-24 17:59:49 +00004007fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004008
Martin v. Löwis11437992002-04-12 09:54:03 +00004009ac_ext=c
4010ac_cpp='$CPP $CPPFLAGS'
4011ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4012ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4013ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004014
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004015
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004016
4017
Matthias Kloseb9621712010-04-24 17:59:49 +00004018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4019$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004022if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004023 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004024
4025 case $withval in
4026 no) with_cxx_main=no
4027 MAINCC='$(CC)';;
4028 yes) with_cxx_main=yes
4029 MAINCC='$(CXX)';;
4030 *) with_cxx_main=yes
4031 MAINCC=$withval
4032 if test -z "$CXX"
4033 then
4034 CXX=$withval
4035 fi;;
4036 esac
4037else
4038
4039 with_cxx_main=no
4040 MAINCC='$(CC)'
4041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004042fi
4043
Matthias Kloseb9621712010-04-24 17:59:49 +00004044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4045$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004046
4047preset_cxx="$CXX"
4048if test -z "$CXX"
4049then
4050 case "$CC" in
4051 gcc) # Extract the first word of "g++", so it can be a program name with args.
4052set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4054$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004055if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004056 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004057else
4058 case $CXX in
4059 [\\/]* | ?:[\\/]*)
4060 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4061 ;;
4062 *)
4063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4064for as_dir in notfound
4065do
4066 IFS=$as_save_IFS
4067 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004068 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004069 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004070 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004072 break 2
4073 fi
4074done
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004077
4078 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4079 ;;
4080esac
4081fi
4082CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004083if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4085$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004086else
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4088$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004090
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004091 ;;
4092 cc) # Extract the first word of "c++", so it can be a program name with args.
4093set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4095$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004096if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004098else
4099 case $CXX in
4100 [\\/]* | ?:[\\/]*)
4101 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4102 ;;
4103 *)
4104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4105for as_dir in notfound
4106do
4107 IFS=$as_save_IFS
4108 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004111 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004113 break 2
4114 fi
4115done
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004118
4119 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4120 ;;
4121esac
4122fi
4123CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004124if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4126$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004127else
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4129$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004132 ;;
4133 esac
4134 if test "$CXX" = "notfound"
4135 then
4136 CXX=""
4137 fi
4138fi
4139if test -z "$CXX"
4140then
4141 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4142do
4143 # Extract the first word of "$ac_prog", so it can be a program name with args.
4144set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4146$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004147if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004149else
4150 if test -n "$CXX"; then
4151 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4152else
4153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4154for as_dir in $PATH
4155do
4156 IFS=$as_save_IFS
4157 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004159 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004160 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004162 break 2
4163 fi
4164done
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004166IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004167
4168fi
4169fi
4170CXX=$ac_cv_prog_CXX
4171if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4173$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004174else
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4176$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004177fi
4178
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004179
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004180 test -n "$CXX" && break
4181done
4182test -n "$CXX" || CXX="notfound"
4183
4184 if test "$CXX" = "notfound"
4185 then
4186 CXX=""
4187 fi
4188fi
4189if test "$preset_cxx" != "$CXX"
4190then
Matthias Kloseb9621712010-04-24 17:59:49 +00004191 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004192
4193 By default, distutils will build C++ extension modules with \"$CXX\".
4194 If this is not intended, then set CXX on the configure command line.
4195 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004196$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004197
4198 By default, distutils will build C++ extension modules with \"$CXX\".
4199 If this is not intended, then set CXX on the configure command line.
4200 " >&2;}
4201fi
4202
4203
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4205$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4206save_LDFLAGS="$LDFLAGS"
4207LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004208
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4210/* end confdefs.h. */
4211
4212int
4213main ()
4214{
4215
4216 ;
4217 return 0;
4218}
4219_ACEOF
4220if ac_fn_c_try_link "$LINENO"; then :
4221 NO_AS_NEEDED="-Wl,--no-as-needed"
4222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4223$as_echo "yes" >&6; }
4224else
4225 NO_AS_NEEDED=""
4226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4227$as_echo "no" >&6; }
4228fi
4229rm -f core conftest.err conftest.$ac_objext \
4230 conftest$ac_exeext conftest.$ac_ext
4231LDFLAGS="$save_LDFLAGS"
4232
4233
4234
4235# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004236ac_ext=c
4237ac_cpp='$CPP $CPPFLAGS'
4238ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4239ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4240ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4242$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004243# On Suns, sometimes $CPP names a directory.
4244if test -n "$CPP" && test -d "$CPP"; then
4245 CPP=
4246fi
4247if test -z "$CPP"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08004248 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004249 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004250else
Martin v. Löwis11437992002-04-12 09:54:03 +00004251 # Double quotes because CPP needs to be expanded
4252 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4253 do
4254 ac_preproc_ok=false
4255for ac_c_preproc_warn_flag in '' yes
4256do
4257 # Use a header file that comes with gcc, so configuring glibc
4258 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004259 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4260 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004261 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004262 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004264/* end confdefs.h. */
4265#ifdef __STDC__
4266# include <limits.h>
4267#else
4268# include <assert.h>
4269#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004270 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004272if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004273
Matthias Kloseb9621712010-04-24 17:59:49 +00004274else
Martin v. Löwis11437992002-04-12 09:54:03 +00004275 # Broken: fails on valid input.
4276continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004277fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004278rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004279
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004284#include <ac_nonexistent.h>
4285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004286if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004287 # Broken: success on invalid input.
4288continue
4289else
Martin v. Löwis11437992002-04-12 09:54:03 +00004290 # Passes both tests.
4291ac_preproc_ok=:
4292break
4293fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004294rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004295
4296done
4297# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004298rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004299if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004300 break
4301fi
4302
4303 done
4304 ac_cv_prog_CPP=$CPP
4305
4306fi
4307 CPP=$ac_cv_prog_CPP
4308else
4309 ac_cv_prog_CPP=$CPP
4310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4312$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004313ac_preproc_ok=false
4314for ac_c_preproc_warn_flag in '' yes
4315do
4316 # Use a header file that comes with gcc, so configuring glibc
4317 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004318 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4319 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004320 # On the NeXT, cc -E runs the code through the compiler's parser,
4321 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004323/* end confdefs.h. */
4324#ifdef __STDC__
4325# include <limits.h>
4326#else
4327# include <assert.h>
4328#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004329 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004331if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004332
Matthias Kloseb9621712010-04-24 17:59:49 +00004333else
Martin v. Löwis11437992002-04-12 09:54:03 +00004334 # Broken: fails on valid input.
4335continue
4336fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004337rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004338
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004340 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004343#include <ac_nonexistent.h>
4344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004345if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004346 # Broken: success on invalid input.
4347continue
4348else
Martin v. Löwis11437992002-04-12 09:54:03 +00004349 # Passes both tests.
4350ac_preproc_ok=:
4351break
4352fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004353rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004354
4355done
4356# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004357rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004358if $ac_preproc_ok; then :
4359
Martin v. Löwis11437992002-04-12 09:54:03 +00004360else
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4362$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004363as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Gregory P. Smith69140482012-01-16 02:05:55 -08004364See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004365fi
4366
4367ac_ext=c
4368ac_cpp='$CPP $CPPFLAGS'
4369ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4370ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4371ac_compiler_gnu=$ac_cv_c_compiler_gnu
4372
4373
Matthias Kloseb9621712010-04-24 17:59:49 +00004374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4375$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004376if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004378else
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004381 # Loop through the user's path and test for each of PROGNAME-LIST
4382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4384do
4385 IFS=$as_save_IFS
4386 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 for ac_prog in grep ggrep; do
4388 for ac_exec_ext in '' $ac_executable_extensions; do
4389 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004390 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004391# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 # Check for GNU $ac_path_GREP
4393case `"$ac_path_GREP" --version 2>&1` in
4394*GNU*)
4395 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4396*)
4397 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004398 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004399 while :
4400 do
4401 cat "conftest.in" "conftest.in" >"conftest.tmp"
4402 mv "conftest.tmp" "conftest.in"
4403 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004405 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4406 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4409 # Best one so far, save it but keep looking for a better one
4410 ac_cv_path_GREP="$ac_path_GREP"
4411 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004412 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004413 # 10*(2^10) chars as input seems more than enough
4414 test $ac_count -gt 10 && break
4415 done
4416 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4417esac
4418
Matthias Kloseb9621712010-04-24 17:59:49 +00004419 $ac_path_GREP_found && break 3
4420 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004422 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004423IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004424 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004425 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 +00004426 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004427else
4428 ac_cv_path_GREP=$GREP
4429fi
4430
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4433$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004434 GREP="$ac_cv_path_GREP"
4435
4436
Matthias Kloseb9621712010-04-24 17:59:49 +00004437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4438$as_echo_n "checking for egrep... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004439if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004440 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004441else
4442 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4443 then ac_cv_path_EGREP="$GREP -E"
4444 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004446 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004447 # Loop through the user's path and test for each of PROGNAME-LIST
4448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004449for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4450do
4451 IFS=$as_save_IFS
4452 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004453 for ac_prog in egrep; do
4454 for ac_exec_ext in '' $ac_executable_extensions; do
4455 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004456 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004457# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004458 # Check for GNU $ac_path_EGREP
4459case `"$ac_path_EGREP" --version 2>&1` in
4460*GNU*)
4461 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4462*)
4463 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004465 while :
4466 do
4467 cat "conftest.in" "conftest.in" >"conftest.tmp"
4468 mv "conftest.tmp" "conftest.in"
4469 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004470 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004471 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4472 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004473 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004474 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4475 # Best one so far, save it but keep looking for a better one
4476 ac_cv_path_EGREP="$ac_path_EGREP"
4477 ac_path_EGREP_max=$ac_count
4478 fi
4479 # 10*(2^10) chars as input seems more than enough
4480 test $ac_count -gt 10 && break
4481 done
4482 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4483esac
4484
Matthias Kloseb9621712010-04-24 17:59:49 +00004485 $ac_path_EGREP_found && break 3
4486 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004487 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004488 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004489IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004490 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004491 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 +00004492 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004493else
4494 ac_cv_path_EGREP=$EGREP
4495fi
4496
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004497 fi
4498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4500$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004501 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004502
4503
Matthias Kloseb9621712010-04-24 17:59:49 +00004504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4505$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004506if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004507 $as_echo_n "(cached) " >&6
4508else
4509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004510/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004511#include <stdlib.h>
4512#include <stdarg.h>
4513#include <string.h>
4514#include <float.h>
4515
4516int
4517main ()
4518{
4519
4520 ;
4521 return 0;
4522}
4523_ACEOF
4524if ac_fn_c_try_compile "$LINENO"; then :
4525 ac_cv_header_stdc=yes
4526else
4527 ac_cv_header_stdc=no
4528fi
4529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4530
4531if test $ac_cv_header_stdc = yes; then
4532 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4534/* end confdefs.h. */
4535#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004536
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004537_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004538if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004539 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004540
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004541else
Matthias Kloseb9621712010-04-24 17:59:49 +00004542 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004543fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004544rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004545
Matthias Kloseb9621712010-04-24 17:59:49 +00004546fi
4547
4548if test $ac_cv_header_stdc = yes; then
4549 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4551/* end confdefs.h. */
4552#include <stdlib.h>
4553
4554_ACEOF
4555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4556 $EGREP "free" >/dev/null 2>&1; then :
4557
4558else
4559 ac_cv_header_stdc=no
4560fi
4561rm -f conftest*
4562
4563fi
4564
4565if test $ac_cv_header_stdc = yes; then
4566 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4567 if test "$cross_compiling" = yes; then :
4568 :
4569else
4570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4571/* end confdefs.h. */
4572#include <ctype.h>
4573#include <stdlib.h>
4574#if ((' ' & 0x0FF) == 0x020)
4575# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4576# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4577#else
4578# define ISLOWER(c) \
4579 (('a' <= (c) && (c) <= 'i') \
4580 || ('j' <= (c) && (c) <= 'r') \
4581 || ('s' <= (c) && (c) <= 'z'))
4582# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4583#endif
4584
4585#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4586int
4587main ()
4588{
4589 int i;
4590 for (i = 0; i < 256; i++)
4591 if (XOR (islower (i), ISLOWER (i))
4592 || toupper (i) != TOUPPER (i))
4593 return 2;
4594 return 0;
4595}
4596_ACEOF
4597if ac_fn_c_try_run "$LINENO"; then :
4598
4599else
4600 ac_cv_header_stdc=no
4601fi
4602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4603 conftest.$ac_objext conftest.beam conftest.$ac_ext
4604fi
4605
4606fi
4607fi
4608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4609$as_echo "$ac_cv_header_stdc" >&6; }
4610if test $ac_cv_header_stdc = yes; then
4611
4612$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4613
4614fi
4615
4616# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4617for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4618 inttypes.h stdint.h unistd.h
4619do :
4620 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4621ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4622"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004623if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004624 cat >>confdefs.h <<_ACEOF
4625#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4626_ACEOF
4627
4628fi
4629
4630done
4631
4632
4633
4634 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 -08004635if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004636 MINIX=yes
4637else
4638 MINIX=
4639fi
4640
4641
4642 if test "$MINIX" = yes; then
4643
4644$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4645
4646
4647$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4648
4649
4650$as_echo "#define _MINIX 1" >>confdefs.h
4651
4652 fi
4653
4654
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4656$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004657if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004658 $as_echo_n "(cached) " >&6
4659else
4660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4661/* end confdefs.h. */
4662
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004663# define __EXTENSIONS__ 1
4664 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00004665int
4666main ()
4667{
4668
4669 ;
4670 return 0;
4671}
4672_ACEOF
4673if ac_fn_c_try_compile "$LINENO"; then :
4674 ac_cv_safe_to_define___extensions__=yes
4675else
4676 ac_cv_safe_to_define___extensions__=no
4677fi
4678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4679fi
4680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4681$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4682 test $ac_cv_safe_to_define___extensions__ = yes &&
4683 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4684
4685 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4686
4687 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4688
4689 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4690
4691 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4692
4693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004694
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004695# Check for unsupported systems
4696case $ac_sys_system/$ac_sys_release in
4697atheos*|Linux*/1*)
4698 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4699 echo See README for details.
4700 exit 1;;
4701esac
4702
4703
Matthias Kloseb9621712010-04-24 17:59:49 +00004704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4705$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004706
4707# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004708if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004709 withval=$with_suffix;
4710 case $withval in
4711 no) EXEEXT=;;
4712 yes) EXEEXT=.exe;;
4713 *) EXEEXT=$withval;;
4714 esac
4715fi
4716
Matthias Kloseb9621712010-04-24 17:59:49 +00004717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4718$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719
4720# Test whether we're running on a non-case-sensitive system, in which
4721# case we give a warning if no ext is given
4722
Matthias Kloseb9621712010-04-24 17:59:49 +00004723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4724$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004725if test ! -d CaseSensitiveTestDir; then
4726mkdir CaseSensitiveTestDir
4727fi
4728
4729if test -d casesensitivetestdir
4730then
Matthias Kloseb9621712010-04-24 17:59:49 +00004731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4732$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004733 BUILDEXEEXT=.exe
4734else
Matthias Kloseb9621712010-04-24 17:59:49 +00004735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4736$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004737 BUILDEXEEXT=$EXEEXT
4738fi
4739rmdir CaseSensitiveTestDir
4740
4741case $MACHDEP in
4742bsdos*)
4743 case $CC in
4744 gcc) CC="$CC -D_HAVE_BSDI";;
4745 esac;;
4746esac
4747
4748case $ac_sys_system in
4749hp*|HP*)
4750 case $CC in
4751 cc|*/cc) CC="$CC -Ae";;
4752 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753esac
4754
doko@python.org3e6e2ac2013-01-25 13:12:29 +01004755MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4756
4757
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758
4759
Matthias Kloseb9621712010-04-24 17:59:49 +00004760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4761$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004762if test -z "$LIBRARY"
4763then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004764 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4767$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004768
4769# LDLIBRARY is the name of the library to link against (as opposed to the
4770# name of the library into which to insert object files). BLDLIBRARY is also
4771# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4772# is blank as the main program is not linked directly against LDLIBRARY.
4773# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4774# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4775# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4776# DLLLIBRARY is the shared (i.e., DLL) library.
4777#
4778# RUNSHARED is used to run shared python without installed libraries
4779#
4780# INSTSONAME is the name of the shared library that will be use to install
4781# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004782#
4783# LDVERSION is the shared library version number, normally the Python version
4784# with the ABI build flags appended.
4785
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004786
4787
4788
4789
4790
4791
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004792
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004793LDLIBRARY="$LIBRARY"
4794BLDLIBRARY='$(LDLIBRARY)'
4795INSTSONAME='$(LDLIBRARY)'
4796DLLLIBRARY=''
4797LDLIBRARYDIR=''
4798RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004799LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004800
4801# LINKCC is the command that links the python executable -- default is $(CC).
4802# If CXX is set, and if it is needed to link a main function that was
4803# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4804# python might then depend on the C++ runtime
4805# This is altered for AIX in order to build the export list before
4806# linking.
4807
Matthias Kloseb9621712010-04-24 17:59:49 +00004808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4809$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004810if test -z "$LINKCC"
4811then
4812 LINKCC='$(PURIFY) $(MAINCC)'
4813 case $ac_sys_system in
4814 AIX*)
4815 exp_extra="\"\""
4816 if test $ac_sys_release -ge 5 -o \
4817 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4818 exp_extra="."
4819 fi
4820 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004821 QNX*)
4822 # qcc must be used because the other compilers do not
4823 # support -N.
4824 LINKCC=qcc;;
4825 esac
4826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4828$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004829
4830# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4831# make sure we default having it set to "no": this is used by
4832# distutils.unixccompiler to know if it should add --enable-new-dtags
4833# to linker command lines, and failing to detect GNU ld simply results
4834# in the same bahaviour as before.
4835
Matthias Kloseb9621712010-04-24 17:59:49 +00004836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4837$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004838ac_prog=ld
4839if test "$GCC" = yes; then
4840 ac_prog=`$CC -print-prog-name=ld`
4841fi
4842case `"$ac_prog" -V 2>&1 < /dev/null` in
4843 *GNU*)
4844 GNULD=yes;;
4845 *)
4846 GNULD=no;;
4847esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4849$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4852$as_echo_n "checking for inline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004853if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004854 $as_echo_n "(cached) " >&6
4855else
4856 ac_cv_c_inline=no
4857for ac_kw in inline __inline__ __inline; do
4858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4859/* end confdefs.h. */
4860#ifndef __cplusplus
4861typedef int foo_t;
4862static $ac_kw foo_t static_foo () {return 0; }
4863$ac_kw foo_t foo () {return 0; }
4864#endif
4865
4866_ACEOF
4867if ac_fn_c_try_compile "$LINENO"; then :
4868 ac_cv_c_inline=$ac_kw
4869fi
4870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4871 test "$ac_cv_c_inline" != no && break
4872done
4873
4874fi
4875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4876$as_echo "$ac_cv_c_inline" >&6; }
4877
4878case $ac_cv_c_inline in
4879 inline | yes) ;;
4880 *)
4881 case $ac_cv_c_inline in
4882 no) ac_val=;;
4883 *) ac_val=$ac_cv_c_inline;;
4884 esac
4885 cat >>confdefs.h <<_ACEOF
4886#ifndef __cplusplus
4887#define inline $ac_val
4888#endif
4889_ACEOF
4890 ;;
4891esac
4892
4893if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004894
4895$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004896
4897
4898fi
4899
4900
Matthias Kloseb9621712010-04-24 17:59:49 +00004901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4902$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004903# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004904if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004905 enableval=$enable_shared;
4906fi
4907
4908
4909if test -z "$enable_shared"
4910then
4911 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004912 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913 enable_shared="yes";;
4914 *)
4915 enable_shared="no";;
4916 esac
4917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4919$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004920
Matthias Kloseb9621712010-04-24 17:59:49 +00004921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4922$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004923# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004924if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 enableval=$enable_profiling; ac_save_cc="$CC"
4926 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004927 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 ac_enable_profiling="no"
4929else
Matthias Kloseb9621712010-04-24 17:59:49 +00004930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931/* end confdefs.h. */
4932int main() { return 0; }
4933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004934if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935 ac_enable_profiling="yes"
4936else
Matthias Kloseb9621712010-04-24 17:59:49 +00004937 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4940 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004941fi
4942
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943 CC="$ac_save_cc"
4944fi
4945
Matthias Kloseb9621712010-04-24 17:59:49 +00004946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4947$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948
4949case "$ac_enable_profiling" in
4950 "yes")
4951 BASECFLAGS="-pg $BASECFLAGS"
4952 LDFLAGS="-pg $LDFLAGS"
4953 ;;
4954esac
4955
Matthias Kloseb9621712010-04-24 17:59:49 +00004956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4957$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958
4959# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4960# library that we build, but we do not want to link against it (we
4961# will find it with a -framework option). For this reason there is an
4962# extra variable BLDLIBRARY against which Python and the extension
4963# modules are linked, BLDLIBRARY. This is normally the same as
4964# LDLIBRARY, but empty for MacOSX framework builds.
4965if test "$enable_framework"
4966then
4967 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4968 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4969 BLDLIBRARY=''
4970else
4971 BLDLIBRARY='$(LDLIBRARY)'
4972fi
4973
4974# Other platforms follow
4975if test $enable_shared = "yes"; then
4976
Matthias Kloseb9621712010-04-24 17:59:49 +00004977$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978
4979 case $ac_sys_system in
4980 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004981 LDLIBRARY='libpython$(LDVERSION).dll.a'
4982 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983 ;;
4984 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004985 LDLIBRARY='libpython$(LDVERSION).so'
4986 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004987 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4988 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004989 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004990 then
4991 PY3LIBRARY=libpython3.so
4992 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02004994 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004995 LDLIBRARY='libpython$(LDVERSION).so'
4996 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004997 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4998 case $ac_sys_system in
4999 FreeBSD*)
5000 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5001 ;;
5002 esac
5003 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005004 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005005 then
5006 PY3LIBRARY=libpython3.so
5007 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008 ;;
5009 hp*|HP*)
5010 case `uname -m` in
5011 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005012 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005013 ;;
5014 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005015 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005016 ;;
5017 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005018 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5020 ;;
5021 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005022 LDLIBRARY='libpython$(LDVERSION).so'
5023 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005024 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5025 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005026 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005027 LDLIBRARY='libpython$(LDVERSION).dylib'
5028 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005029 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5030 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005031 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005032 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005033 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5034 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035
5036 esac
5037else # shared is disabled
5038 case $ac_sys_system in
5039 CYGWIN*)
5040 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005041 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042 ;;
5043 esac
5044fi
5045
Matthias Kloseb9621712010-04-24 17:59:49 +00005046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5047$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005048
5049if test -n "$ac_tool_prefix"; then
5050 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5051set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5053$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005054if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005056else
5057 if test -n "$RANLIB"; then
5058 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5059else
5060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5061for as_dir in $PATH
5062do
5063 IFS=$as_save_IFS
5064 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005066 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005067 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069 break 2
5070 fi
5071done
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073IFS=$as_save_IFS
5074
5075fi
5076fi
5077RANLIB=$ac_cv_prog_RANLIB
5078if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5080$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005081else
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5083$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084fi
5085
5086
5087fi
5088if test -z "$ac_cv_prog_RANLIB"; then
5089 ac_ct_RANLIB=$RANLIB
5090 # Extract the first word of "ranlib", so it can be a program name with args.
5091set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5093$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005094if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005096else
5097 if test -n "$ac_ct_RANLIB"; then
5098 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5099else
5100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5101for as_dir in $PATH
5102do
5103 IFS=$as_save_IFS
5104 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005106 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005107 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109 break 2
5110 fi
5111done
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005113IFS=$as_save_IFS
5114
5115fi
5116fi
5117ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5118if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5120$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005121else
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5123$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005124fi
5125
5126 if test "x$ac_ct_RANLIB" = x; then
5127 RANLIB=":"
5128 else
5129 case $cross_compiling:$ac_tool_warned in
5130yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005131{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5132$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133ac_tool_warned=yes ;;
5134esac
5135 RANLIB=$ac_ct_RANLIB
5136 fi
5137else
5138 RANLIB="$ac_cv_prog_RANLIB"
5139fi
5140
5141
5142for ac_prog in ar aal
5143do
5144 # Extract the first word of "$ac_prog", so it can be a program name with args.
5145set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005148if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005149 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005150else
5151 if test -n "$AR"; then
5152 ac_cv_prog_AR="$AR" # Let the user override the test.
5153else
5154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5155for as_dir in $PATH
5156do
5157 IFS=$as_save_IFS
5158 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005159 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005160 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005161 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005162 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005163 break 2
5164 fi
5165done
Matthias Kloseb9621712010-04-24 17:59:49 +00005166 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005167IFS=$as_save_IFS
5168
5169fi
5170fi
5171AR=$ac_cv_prog_AR
5172if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5174$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005175else
Matthias Kloseb9621712010-04-24 17:59:49 +00005176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005178fi
5179
5180
5181 test -n "$AR" && break
5182done
5183test -n "$AR" || AR="ar"
5184
5185
5186# tweak ARFLAGS only if the user didn't set it on the command line
5187
5188if test -z "$ARFLAGS"
5189then
5190 ARFLAGS="rc"
5191fi
5192
5193
5194# Extract the first word of "svnversion", so it can be a program name with args.
5195set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5197$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005198if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005199 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200else
5201 if test -n "$SVNVERSION"; then
5202 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5203else
5204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5205for as_dir in $PATH
5206do
5207 IFS=$as_save_IFS
5208 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005209 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005211 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005213 break 2
5214 fi
5215done
Matthias Kloseb9621712010-04-24 17:59:49 +00005216 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005217IFS=$as_save_IFS
5218
5219 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5220fi
5221fi
5222SVNVERSION=$ac_cv_prog_SVNVERSION
5223if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5225$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005226else
Matthias Kloseb9621712010-04-24 17:59:49 +00005227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005229fi
5230
5231
5232if test $SVNVERSION = found
5233then
5234 SVNVERSION="svnversion \$(srcdir)"
5235else
5236 SVNVERSION="echo Unversioned directory"
5237fi
5238
Trent Nelson9effe692012-10-16 08:41:32 -04005239
Trent Nelson739fc542012-10-17 04:45:30 -04005240if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson9effe692012-10-16 08:41:32 -04005241 # If we're building out-of-tree, we need to make sure the following
5242 # resources get picked up before their $srcdir counterparts.
5243 # Objects/ -> typeslots.inc
5244 # Include/ -> Python-ast.h, graminit.h
5245 # Python/ -> importlib.h
5246 # (A side effect of this is that these resources will automatically be
5247 # regenerated when building out-of-tree, regardless of whether or not
5248 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5249 # off.)
5250 BASECPPFLAGS="-IObjects -IInclude -IPython"
5251else
5252 BASECPPFLAGS=""
5253fi
5254
Georg Brandl1ca2e792011-03-05 20:51:24 +01005255
5256
5257
Georg Brandl187c1112011-07-03 09:23:20 +02005258
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005259if test -e $srcdir/.hg/dirstate
Georg Brandl187c1112011-07-03 09:23:20 +02005260then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005261# Extract the first word of "hg", so it can be a program name with args.
5262set dummy hg; ac_word=$2
5263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5264$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005265if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005266 $as_echo_n "(cached) " >&6
5267else
5268 if test -n "$HAS_HG"; then
5269 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5270else
5271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5272for as_dir in $PATH
5273do
5274 IFS=$as_save_IFS
5275 test -z "$as_dir" && as_dir=.
5276 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005277 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005278 ac_cv_prog_HAS_HG="found"
5279 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5280 break 2
5281 fi
5282done
5283 done
5284IFS=$as_save_IFS
5285
5286 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5287fi
5288fi
5289HAS_HG=$ac_cv_prog_HAS_HG
5290if test -n "$HAS_HG"; then
5291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5292$as_echo "$HAS_HG" >&6; }
5293else
5294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5295$as_echo "no" >&6; }
5296fi
5297
5298
Georg Brandl187c1112011-07-03 09:23:20 +02005299else
5300HAS_HG=no-repository
5301fi
Georg Brandl1ca2e792011-03-05 20:51:24 +01005302if test $HAS_HG = found
5303then
5304 HGVERSION="hg id -i \$(srcdir)"
5305 HGTAG="hg id -t \$(srcdir)"
5306 HGBRANCH="hg id -b \$(srcdir)"
5307else
5308 HGVERSION=""
5309 HGTAG=""
5310 HGBRANCH=""
5311fi
5312
Georg Brandl187c1112011-07-03 09:23:20 +02005313
Matthias Klosec4c48422012-10-21 23:05:35 +02005314for ac_prog in python$PACKAGE_VERSION python3 python
5315do
5316 # Extract the first word of "$ac_prog", so it can be a program name with args.
5317set dummy $ac_prog; ac_word=$2
Georg Brandl187c1112011-07-03 09:23:20 +02005318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5319$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005320if ${ac_cv_prog_PYTHON+:} false; then :
Georg Brandl187c1112011-07-03 09:23:20 +02005321 $as_echo_n "(cached) " >&6
5322else
Matthias Klosec4c48422012-10-21 23:05:35 +02005323 if test -n "$PYTHON"; then
5324 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Georg Brandl187c1112011-07-03 09:23:20 +02005325else
5326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5327for as_dir in $PATH
5328do
5329 IFS=$as_save_IFS
5330 test -z "$as_dir" && as_dir=.
5331 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005332 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005333 ac_cv_prog_PYTHON="$ac_prog"
Georg Brandl187c1112011-07-03 09:23:20 +02005334 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5335 break 2
5336 fi
5337done
5338 done
5339IFS=$as_save_IFS
5340
Georg Brandl187c1112011-07-03 09:23:20 +02005341fi
5342fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005343PYTHON=$ac_cv_prog_PYTHON
5344if test -n "$PYTHON"; then
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5346$as_echo "$PYTHON" >&6; }
Georg Brandl187c1112011-07-03 09:23:20 +02005347else
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5349$as_echo "no" >&6; }
5350fi
5351
5352
Matthias Klosec4c48422012-10-21 23:05:35 +02005353 test -n "$PYTHON" && break
5354done
5355test -n "$PYTHON" || PYTHON="not-found"
5356
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005357if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005358 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5359else
5360 ASDLGEN="$PYTHON"
Georg Brandl187c1112011-07-03 09:23:20 +02005361fi
5362
5363
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364case $MACHDEP in
5365bsdos*|hp*|HP*)
5366 # install -d does not work on BSDI or HP-UX
5367 if test -z "$INSTALL"
5368 then
5369 INSTALL="${srcdir}/install-sh -c"
5370 fi
5371esac
5372ac_aux_dir=
5373for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005374 if test -f "$ac_dir/install-sh"; then
5375 ac_aux_dir=$ac_dir
5376 ac_install_sh="$ac_aux_dir/install-sh -c"
5377 break
5378 elif test -f "$ac_dir/install.sh"; then
5379 ac_aux_dir=$ac_dir
5380 ac_install_sh="$ac_aux_dir/install.sh -c"
5381 break
5382 elif test -f "$ac_dir/shtool"; then
5383 ac_aux_dir=$ac_dir
5384 ac_install_sh="$ac_aux_dir/shtool install -c"
5385 break
5386 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005387done
5388if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005389 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005390fi
5391
5392# These three variables are undocumented and unsupported,
5393# and are intended to be withdrawn in a future Autoconf release.
5394# They can cause serious problems if a builder's source tree is in a directory
5395# whose full name contains unusual characters.
5396ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5397ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5398ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5399
5400
5401# Find a good install program. We prefer a C program (faster),
5402# so one script is as good as another. But avoid the broken or
5403# incompatible versions:
5404# SysV /etc/install, /usr/sbin/install
5405# SunOS /usr/etc/install
5406# IRIX /sbin/install
5407# AIX /bin/install
5408# AmigaOS /C/install, which installs bootblocks on floppy discs
5409# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5410# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5411# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5412# OS/2's system install, which has a completely different semantic
5413# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005414# Reject install programs that cannot install multiple files.
5415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5416$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417if test -z "$INSTALL"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08005418if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005420else
5421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5422for as_dir in $PATH
5423do
5424 IFS=$as_save_IFS
5425 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005426 # Account for people who put trailing slashes in PATH elements.
5427case $as_dir/ in #((
5428 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431 /usr/ucb/* ) ;;
5432 *)
5433 # OSF1 and SCO ODT 3.0 have their own names for install.
5434 # Don't use installbsd from OSF since it installs stuff as root
5435 # by default.
5436 for ac_prog in ginstall scoinst install; do
5437 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005438 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439 if test $ac_prog = install &&
5440 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5441 # AIX install. It has an incompatible calling convention.
5442 :
5443 elif test $ac_prog = install &&
5444 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5445 # program-specific install script used by HP pwplus--don't use.
5446 :
5447 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005448 rm -rf conftest.one conftest.two conftest.dir
5449 echo one > conftest.one
5450 echo two > conftest.two
5451 mkdir conftest.dir
5452 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5453 test -s conftest.one && test -s conftest.two &&
5454 test -s conftest.dir/conftest.one &&
5455 test -s conftest.dir/conftest.two
5456 then
5457 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5458 break 3
5459 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460 fi
5461 fi
5462 done
5463 done
5464 ;;
5465esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005466
5467 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005468IFS=$as_save_IFS
5469
Matthias Kloseb9621712010-04-24 17:59:49 +00005470rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005471
5472fi
5473 if test "${ac_cv_path_install+set}" = set; then
5474 INSTALL=$ac_cv_path_install
5475 else
5476 # As a last resort, use the slow shell script. Don't cache a
5477 # value for INSTALL within a source directory, because that will
5478 # break other packages using the cache if that directory is
5479 # removed, or if the value is a relative name.
5480 INSTALL=$ac_install_sh
5481 fi
5482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5484$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485
5486# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5487# It thinks the first close brace ends the variable substitution.
5488test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5489
5490test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5491
5492test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5493
Trent Nelsona45afca2012-08-30 14:32:02 +00005494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5495$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5496if test -z "$MKDIR_P"; then
5497 if ${ac_cv_path_mkdir+:} false; then :
5498 $as_echo_n "(cached) " >&6
5499else
5500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5501for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5502do
5503 IFS=$as_save_IFS
5504 test -z "$as_dir" && as_dir=.
5505 for ac_prog in mkdir gmkdir; do
5506 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005507 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsona45afca2012-08-30 14:32:02 +00005508 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5509 'mkdir (GNU coreutils) '* | \
5510 'mkdir (coreutils) '* | \
5511 'mkdir (fileutils) '4.1*)
5512 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5513 break 3;;
5514 esac
5515 done
5516 done
5517 done
5518IFS=$as_save_IFS
5519
5520fi
5521
5522 test -d ./--version && rmdir ./--version
5523 if test "${ac_cv_path_mkdir+set}" = set; then
5524 MKDIR_P="$ac_cv_path_mkdir -p"
5525 else
5526 # As a last resort, use the slow shell script. Don't cache a
5527 # value for MKDIR_P within a source directory, because that will
5528 # break other packages using the cache if that directory is
5529 # removed, or if the value is a relative name.
5530 MKDIR_P="$ac_install_sh -d"
5531 fi
5532fi
5533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5534$as_echo "$MKDIR_P" >&6; }
5535
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536
5537# Not every filesystem supports hard links
5538
5539if test -z "$LN" ; then
5540 case $ac_sys_system in
5541 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005542 *) LN=ln;;
5543 esac
5544fi
5545
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005546# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005547
5548ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005549
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5552$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553
5554# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005555if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556 withval=$with_pydebug;
5557if test "$withval" != no
5558then
5559
Matthias Kloseb9621712010-04-24 17:59:49 +00005560$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005561
Matthias Kloseb9621712010-04-24 17:59:49 +00005562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5563$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005564 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005565 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005566else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5567$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005568fi
5569else
Matthias Kloseb9621712010-04-24 17:59:49 +00005570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5571$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005572fi
5573
5574
5575# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5576# merged with this chunk of code?
5577
5578# Optimizer/debugger flags
5579# ------------------------
5580# (The following bit of code is complicated enough - please keep things
5581# indented properly. Just pretend you're editing Python code. ;-)
5582
5583# There are two parallel sets of case statements below, one that checks to
5584# see if OPT was set and one that does BASECFLAGS setting based upon
5585# compiler and platform. BASECFLAGS tweaks need to be made even if the
5586# user set OPT.
5587
5588# tweak OPT based on compiler and platform, only if the user didn't set
5589# it on the command line
5590
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005591if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592then
5593 case $GCC in
5594 yes)
5595 if test "$CC" != 'g++' ; then
5596 STRICT_PROTO="-Wstrict-prototypes"
5597 fi
5598 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5599 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5600 WRAP="-fwrapv"
5601 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005602
5603 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005604 case $CC in
5605 *clang*) WRAP="-fwrapv"
5606 ;;
5607 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609 case $ac_cv_prog_cc_g in
5610 yes)
5611 if test "$Py_DEBUG" = 'true' ; then
5612 # Optimization messes up debuggers, so turn it off for
5613 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005614 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005615 else
5616 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5617 fi
5618 ;;
5619 *)
5620 OPT="-O3 -Wall $STRICT_PROTO"
5621 ;;
5622 esac
5623 case $ac_sys_system in
5624 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5625 ;;
5626 esac
5627 ;;
5628
5629 *)
5630 OPT="-O"
5631 ;;
5632 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633fi
5634
5635
5636
5637# The -arch flags for universal builds on OSX
5638UNIVERSAL_ARCH_FLAGS=
5639
5640
5641# tweak BASECFLAGS based on compiler and platform
5642case $GCC in
5643yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005644 # Python doesn't violate C99 aliasing rules, but older versions of
5645 # GCC produce warnings for legal Python code. Enable
5646 # -fno-strict-aliasing on versions of GCC that support but produce
5647 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5649$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650 ac_save_cc="$CC"
5651 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005652 save_CFLAGS="$CFLAGS"
Gregory P. Smith69140482012-01-16 02:05:55 -08005653 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005654 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005655else
Matthias Kloseb9621712010-04-24 17:59:49 +00005656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005658
Matthias Kloseb159a552010-04-25 21:00:44 +00005659
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005660int
5661main ()
5662{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005663
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005664 ;
5665 return 0;
5666}
Matthias Kloseb159a552010-04-25 21:00:44 +00005667
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005669if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005670
5671 CC="$ac_save_cc -fstrict-aliasing"
5672 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005674/* end confdefs.h. */
5675
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005676 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005677int
5678main ()
5679{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005680double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005681 ;
5682 return 0;
5683}
Matthias Kloseb159a552010-04-25 21:00:44 +00005684
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005686if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005687
5688 ac_cv_no_strict_aliasing=no
5689
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690else
Matthias Kloseb159a552010-04-25 21:00:44 +00005691
5692 ac_cv_no_strict_aliasing=yes
5693
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005694fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005696
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005697else
Matthias Kloseb159a552010-04-25 21:00:44 +00005698
5699 ac_cv_no_strict_aliasing=no
5700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005703fi
5704
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005705 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5708$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005709 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710 then
5711 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5712 fi
5713
5714 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5715 # support. Without this, treatment of subnormals doesn't follow
5716 # the standard.
5717 case $ac_sys_machine in
5718 alpha*)
5719 BASECFLAGS="$BASECFLAGS -mieee"
5720 ;;
5721 esac
5722
5723 case $ac_sys_system in
5724 SCO_SV*)
5725 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5726 ;;
5727 # is there any other compiler on Darwin besides gcc?
5728 Darwin*)
5729 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5730 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005731 if test "${CC}" = gcc
5732 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5734$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005735 case "${UNIVERSALSDK}" in
5736 */MacOSX10.4u.sdk)
5737 # Build using 10.4 SDK, force usage of gcc when the
5738 # compiler is gcc, otherwise the user will get very
5739 # confusing error messages when building on OSX 10.6
5740 CC=gcc-4.0
5741 CPP=cpp-4.0
5742 ;;
5743 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5745$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005746 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747
5748
5749 if test "${enable_universalsdk}"; then
5750 UNIVERSAL_ARCH_FLAGS=""
5751 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5752 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5753 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005754 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5756 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005757 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005758 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5761 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005762 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005763 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005765 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5766 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005767 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005768 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005769
5770 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5771 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005772 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005773 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005774
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005776 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 +00005777
5778 fi
5779
5780
Ronald Oussoren666028b2010-04-18 19:07:43 +00005781 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5782 if test "${UNIVERSALSDK}" != "/"
5783 then
5784 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5785 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005786 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787 fi
5788 fi
5789
5790 # Calculate the right deployment target for this build.
5791 #
5792 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5793 if test ${cur_target} '>' 10.2; then
5794 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005795 if test ${enable_universalsdk}; then
5796 if test "${UNIVERSAL_ARCHS}" = "all"; then
5797 # Ensure that the default platform for a
5798 # 4-way universal build is OSX 10.5,
5799 # that's the first OS release where
5800 # 4-way builds make sense.
5801 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005802
5803 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5804 cur_target='10.5'
5805
5806 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5807 cur_target='10.5'
5808
5809 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5810 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005811 fi
5812 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005813 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005814 # On Intel macs default to a deployment
5815 # target of 10.4, that's the first OSX
5816 # release with Intel support.
5817 cur_target="10.4"
5818 fi
5819 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820 fi
5821 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5822
5823 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5824 # environment with a value that is the same as what we'll use
5825 # in the Makefile to ensure that we'll get the same compiler
5826 # environment during configure and build time.
5827 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5828 export MACOSX_DEPLOYMENT_TARGET
5829 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5830
5831 ;;
5832 OSF*)
5833 BASECFLAGS="$BASECFLAGS -mieee"
5834 ;;
5835 esac
5836 ;;
5837
5838*)
5839 case $ac_sys_system in
5840 OpenUNIX*|UnixWare*)
5841 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5842 ;;
5843 OSF*)
5844 BASECFLAGS="$BASECFLAGS -ieee -std"
5845 ;;
5846 SCO_SV*)
5847 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5848 ;;
5849 esac
5850 ;;
5851esac
5852
5853if test "$Py_DEBUG" = 'true'; then
5854 :
5855else
5856 OPT="-DNDEBUG $OPT"
5857fi
5858
5859if test "$ac_arch_flags"
5860then
5861 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5862fi
5863
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864# Check whether GCC supports PyArg_ParseTuple format
5865if test "$GCC" = "yes"
5866then
Matthias Kloseb9621712010-04-24 17:59:49 +00005867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5868$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869 save_CFLAGS=$CFLAGS
5870 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872/* end confdefs.h. */
5873
5874 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875int
5876main ()
5877{
5878
5879 ;
5880 return 0;
5881}
Matthias Kloseb159a552010-04-25 21:00:44 +00005882
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005884if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885
Matthias Kloseb159a552010-04-25 21:00:44 +00005886
Matthias Kloseb9621712010-04-24 17:59:49 +00005887$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888
Matthias Kloseb159a552010-04-25 21:00:44 +00005889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005890$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005891
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892else
Matthias Kloseb159a552010-04-25 21:00:44 +00005893
5894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005895$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896
5897fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5899 CFLAGS=$save_CFLAGS
5900fi
5901
5902# On some compilers, pthreads are available without further options
5903# (e.g. MacOS X). On some of these systems, the compiler will not
5904# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5905# So we have to see first whether pthreads are available without
5906# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5908$as_echo_n "checking whether pthreads are available without options... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005909if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005910 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911else
Matthias Kloseb9621712010-04-24 17:59:49 +00005912 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ac_cv_pthread_is_default=no
5914else
Matthias Kloseb9621712010-04-24 17:59:49 +00005915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916/* end confdefs.h. */
5917
5918#include <pthread.h>
5919
5920void* routine(void* p){return NULL;}
5921
5922int main(){
5923 pthread_t p;
5924 if(pthread_create(&p,NULL,routine,NULL)!=0)
5925 return 1;
5926 (void)pthread_detach(p);
5927 return 0;
5928}
5929
5930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005931if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932
5933 ac_cv_pthread_is_default=yes
5934 ac_cv_kthread=no
5935 ac_cv_pthread=no
5936
5937else
Matthias Kloseb9621712010-04-24 17:59:49 +00005938 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5941 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942fi
5943
5944
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945fi
5946
Matthias Kloseb9621712010-04-24 17:59:49 +00005947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5948$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949
5950
5951if test $ac_cv_pthread_is_default = yes
5952then
5953 ac_cv_kpthread=no
5954else
5955# -Kpthread, if available, provides the right #defines
5956# and linker options to make pthread_create available
5957# Some compilers won't report that they do not support -Kpthread,
5958# so we need to run a program to see whether it really made the
5959# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5961$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005962if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005963 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964else
5965 ac_save_cc="$CC"
5966CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005967if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 ac_cv_kpthread=no
5969else
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971/* end confdefs.h. */
5972
5973#include <pthread.h>
5974
5975void* routine(void* p){return NULL;}
5976
5977int main(){
5978 pthread_t p;
5979 if(pthread_create(&p,NULL,routine,NULL)!=0)
5980 return 1;
5981 (void)pthread_detach(p);
5982 return 0;
5983}
5984
5985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005986if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987 ac_cv_kpthread=yes
5988else
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5992 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993fi
5994
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995CC="$ac_save_cc"
5996fi
5997
Matthias Kloseb9621712010-04-24 17:59:49 +00005998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5999$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000fi
6001
6002if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6003then
6004# -Kthread, if available, provides the right #defines
6005# and linker options to make pthread_create available
6006# Some compilers won't report that they do not support -Kthread,
6007# so we need to run a program to see whether it really made the
6008# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6010$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006011if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006012 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013else
6014 ac_save_cc="$CC"
6015CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006016if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017 ac_cv_kthread=no
6018else
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020/* end confdefs.h. */
6021
6022#include <pthread.h>
6023
6024void* routine(void* p){return NULL;}
6025
6026int main(){
6027 pthread_t p;
6028 if(pthread_create(&p,NULL,routine,NULL)!=0)
6029 return 1;
6030 (void)pthread_detach(p);
6031 return 0;
6032}
6033
6034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006035if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036 ac_cv_kthread=yes
6037else
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6041 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042fi
6043
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044CC="$ac_save_cc"
6045fi
6046
Matthias Kloseb9621712010-04-24 17:59:49 +00006047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6048$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049fi
6050
6051if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6052then
6053# -pthread, if available, provides the right #defines
6054# and linker options to make pthread_create available
6055# Some compilers won't report that they do not support -pthread,
6056# so we need to run a program to see whether it really made the
6057# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6059$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006060if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006061 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062else
6063 ac_save_cc="$CC"
6064CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006065if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066 ac_cv_pthread=no
6067else
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069/* end confdefs.h. */
6070
6071#include <pthread.h>
6072
6073void* routine(void* p){return NULL;}
6074
6075int main(){
6076 pthread_t p;
6077 if(pthread_create(&p,NULL,routine,NULL)!=0)
6078 return 1;
6079 (void)pthread_detach(p);
6080 return 0;
6081}
6082
6083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006084if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006085 ac_cv_pthread=yes
6086else
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6090 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091fi
6092
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093CC="$ac_save_cc"
6094fi
6095
Matthias Kloseb9621712010-04-24 17:59:49 +00006096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6097$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098fi
6099
6100# If we have set a CC compiler flag for thread support then
6101# check if it works for CXX, too.
6102ac_cv_cxx_thread=no
6103if test ! -z "$CXX"
6104then
Matthias Kloseb9621712010-04-24 17:59:49 +00006105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6106$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006107ac_save_cxx="$CXX"
6108
6109if test "$ac_cv_kpthread" = "yes"
6110then
6111 CXX="$CXX -Kpthread"
6112 ac_cv_cxx_thread=yes
6113elif test "$ac_cv_kthread" = "yes"
6114then
6115 CXX="$CXX -Kthread"
6116 ac_cv_cxx_thread=yes
6117elif test "$ac_cv_pthread" = "yes"
6118then
6119 CXX="$CXX -pthread"
6120 ac_cv_cxx_thread=yes
6121fi
6122
6123if test $ac_cv_cxx_thread = yes
6124then
6125 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6126 $CXX -c conftest.$ac_ext 2>&5
6127 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6128 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6129 then
6130 ac_cv_cxx_thread=yes
6131 else
6132 ac_cv_cxx_thread=no
6133 fi
6134 rm -fr conftest*
6135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6137$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006138fi
6139CXX="$ac_save_cxx"
6140
6141
6142# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6144$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006145if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006146 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006147else
Matthias Kloseb9621712010-04-24 17:59:49 +00006148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149/* end confdefs.h. */
6150#include <stdlib.h>
6151#include <stdarg.h>
6152#include <string.h>
6153#include <float.h>
6154
6155int
6156main ()
6157{
6158
6159 ;
6160 return 0;
6161}
6162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006163if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164 ac_cv_header_stdc=yes
6165else
Matthias Kloseb9621712010-04-24 17:59:49 +00006166 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6169
6170if test $ac_cv_header_stdc = yes; then
6171 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173/* end confdefs.h. */
6174#include <string.h>
6175
6176_ACEOF
6177if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 $EGREP "memchr" >/dev/null 2>&1; then :
6179
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180else
6181 ac_cv_header_stdc=no
6182fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006183rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184
6185fi
6186
6187if test $ac_cv_header_stdc = yes; then
6188 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190/* end confdefs.h. */
6191#include <stdlib.h>
6192
6193_ACEOF
6194if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006195 $EGREP "free" >/dev/null 2>&1; then :
6196
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006197else
6198 ac_cv_header_stdc=no
6199fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006200rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006201
6202fi
6203
6204if test $ac_cv_header_stdc = yes; then
6205 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006206 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207 :
6208else
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006210/* end confdefs.h. */
6211#include <ctype.h>
6212#include <stdlib.h>
6213#if ((' ' & 0x0FF) == 0x020)
6214# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6215# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6216#else
6217# define ISLOWER(c) \
6218 (('a' <= (c) && (c) <= 'i') \
6219 || ('j' <= (c) && (c) <= 'r') \
6220 || ('s' <= (c) && (c) <= 'z'))
6221# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6222#endif
6223
6224#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6225int
6226main ()
6227{
6228 int i;
6229 for (i = 0; i < 256; i++)
6230 if (XOR (islower (i), ISLOWER (i))
6231 || toupper (i) != TOUPPER (i))
6232 return 2;
6233 return 0;
6234}
6235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006236if ac_fn_c_try_run "$LINENO"; then :
6237
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238else
Matthias Kloseb9621712010-04-24 17:59:49 +00006239 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6242 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006243fi
6244
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006245fi
6246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6248$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249if test $ac_cv_header_stdc = yes; then
6250
Matthias Kloseb9621712010-04-24 17:59:49 +00006251$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006252
6253fi
6254
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006255for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6256fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006257ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006258shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006259unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006260sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6261sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006262sys/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 -08006263sys/syscall.h sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006264sys/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 +00006265sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006266bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006267do :
6268 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6269ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006270if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006271 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006272#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006273_ACEOF
6274
6275fi
6276
Guido van Rossum627b2d71993-12-24 10:39:16 +00006277done
6278
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006279ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006280for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006281 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6283$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006284if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006285 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006286else
Matthias Kloseb9621712010-04-24 17:59:49 +00006287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006288/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006289#include <sys/types.h>
6290#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006291
Martin v. Löwis11437992002-04-12 09:54:03 +00006292int
6293main ()
6294{
6295if ((DIR *) 0)
6296return 0;
6297 ;
6298 return 0;
6299}
6300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006302 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006303else
Matthias Kloseb9621712010-04-24 17:59:49 +00006304 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006308eval ac_res=\$$as_ac_Header
6309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6310$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006311if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006312 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006313#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006314_ACEOF
6315
6316ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006317fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006318
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006319done
6320# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6321if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6323$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006324if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006325 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006326else
Martin v. Löwis11437992002-04-12 09:54:03 +00006327 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006331/* Override any GCC internal prototype to avoid an error.
6332 Use char because int might match the return type of a GCC
6333 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006334#ifdef __cplusplus
6335extern "C"
6336#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006337char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006338int
6339main ()
6340{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006341return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006342 ;
6343 return 0;
6344}
6345_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006346for ac_lib in '' dir; do
6347 if test -z "$ac_lib"; then
6348 ac_res="none required"
6349 else
6350 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006351 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006352 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006353 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006354 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006355fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006356rm -f core conftest.err conftest.$ac_objext \
6357 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006358 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006359 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006361done
Gregory P. Smith69140482012-01-16 02:05:55 -08006362if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006364else
6365 ac_cv_search_opendir=no
6366fi
6367rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006368LIBS=$ac_func_search_save_LIBS
6369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6371$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006372ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006373if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006374 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006375
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006376fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006377
Michael W. Hudson54241132001-12-07 15:38:26 +00006378else
Matthias Kloseb9621712010-04-24 17:59:49 +00006379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6380$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006381if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006382 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006383else
6384 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006386/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006388/* Override any GCC internal prototype to avoid an error.
6389 Use char because int might match the return type of a GCC
6390 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006391#ifdef __cplusplus
6392extern "C"
6393#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006394char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006395int
6396main ()
6397{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006398return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006399 ;
6400 return 0;
6401}
6402_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006403for ac_lib in '' x; do
6404 if test -z "$ac_lib"; then
6405 ac_res="none required"
6406 else
6407 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006408 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006409 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006410 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006411 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006413rm -f core conftest.err conftest.$ac_objext \
6414 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006415 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006416 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006418done
Gregory P. Smith69140482012-01-16 02:05:55 -08006419if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006420
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006421else
6422 ac_cv_search_opendir=no
6423fi
6424rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006425LIBS=$ac_func_search_save_LIBS
6426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6428$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006429ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006430if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006431 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006432
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006433fi
6434
6435fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006436
Matthias Kloseb9621712010-04-24 17:59:49 +00006437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6438$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006439if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006440 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006441else
Matthias Kloseb9621712010-04-24 17:59:49 +00006442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006443/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006444#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006445int
6446main ()
6447{
6448return makedev(0, 0);
6449 ;
6450 return 0;
6451}
6452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006454 ac_cv_header_sys_types_h_makedev=yes
6455else
Matthias Kloseb9621712010-04-24 17:59:49 +00006456 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006458rm -f core conftest.err conftest.$ac_objext \
6459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006460
6461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6463$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006464
6465if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006466ac_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 -08006467if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006468
Matthias Kloseb9621712010-04-24 17:59:49 +00006469$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006470
6471fi
6472
6473
6474
6475 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006476 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 -08006477if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006478
Matthias Kloseb9621712010-04-24 17:59:49 +00006479$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006480
6481fi
6482
6483
6484 fi
6485fi
6486
Michael W. Hudson54241132001-12-07 15:38:26 +00006487
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006488# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006489for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006490do :
6491 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006492#ifdef HAVE_CURSES_H
6493#include <curses.h>
6494#endif
6495
Matthias Kloseb9621712010-04-24 17:59:49 +00006496"
Gregory P. Smith69140482012-01-16 02:05:55 -08006497if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006498 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006499#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006500_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006501
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006502fi
6503
6504done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006505
6506
Martin v. Löwis11017b12006-01-14 18:12:57 +00006507# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006508for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006509do :
6510 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 +00006511#ifdef HAVE_ASM_TYPES_H
6512#include <asm/types.h>
6513#endif
6514#ifdef HAVE_SYS_SOCKET_H
6515#include <sys/socket.h>
6516#endif
6517
Matthias Kloseb9621712010-04-24 17:59:49 +00006518"
Gregory P. Smith69140482012-01-16 02:05:55 -08006519if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006520 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006521#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006522_ACEOF
6523
6524fi
6525
6526done
6527
6528
Guido van Rossum627b2d71993-12-24 10:39:16 +00006529# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006530was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6532$as_echo_n "checking for clock_t in time.h... " >&6; }
6533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006534/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006535#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006536
6537_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006538if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006539 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006540 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006541else
Martin v. Löwis11437992002-04-12 09:54:03 +00006542
6543
Matthias Kloseb9621712010-04-24 17:59:49 +00006544$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006545
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006546
Guido van Rossum627b2d71993-12-24 10:39:16 +00006547fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006548rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006549
Matthias Kloseb9621712010-04-24 17:59:49 +00006550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6551$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006552
Neal Norwitz11690112002-07-30 01:08:28 +00006553# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6555$as_echo_n "checking for makedev... " >&6; }
6556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006557/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006558
Jesus Cea740f53a2010-04-28 11:35:30 +00006559#if defined(MAJOR_IN_MKDEV)
6560#include <sys/mkdev.h>
6561#elif defined(MAJOR_IN_SYSMACROS)
6562#include <sys/sysmacros.h>
6563#else
6564#include <sys/types.h>
6565#endif
6566
Neal Norwitz11690112002-07-30 01:08:28 +00006567int
6568main ()
6569{
Jesus Cea740f53a2010-04-28 11:35:30 +00006570
6571 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006572 ;
6573 return 0;
6574}
Matthias Kloseb159a552010-04-25 21:00:44 +00006575
Neal Norwitz11690112002-07-30 01:08:28 +00006576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006577if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006578 ac_cv_has_makedev=yes
6579else
Matthias Kloseb9621712010-04-24 17:59:49 +00006580 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006582rm -f core conftest.err conftest.$ac_objext \
6583 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006584if test "$ac_cv_has_makedev" = "no"; then
6585 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006587/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006588
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006589#define _OSF_SOURCE 1
6590#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006591
Neal Norwitz11690112002-07-30 01:08:28 +00006592int
6593main ()
6594{
6595 makedev(0, 0)
6596 ;
6597 return 0;
6598}
6599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006600if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006601 ac_cv_has_makedev=yes
6602else
Matthias Kloseb9621712010-04-24 17:59:49 +00006603 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006605rm -f core conftest.err conftest.$ac_objext \
6606 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006607 if test "$ac_cv_has_makedev" = "yes"; then
6608
Matthias Kloseb9621712010-04-24 17:59:49 +00006609$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006610
6611 fi
6612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6614$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006615if test "$ac_cv_has_makedev" = "yes"; then
6616
Matthias Kloseb9621712010-04-24 17:59:49 +00006617$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006618
6619fi
6620
Martin v. Löwis399a6892002-10-04 10:22:02 +00006621# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6622# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6623# defined, but the compiler does not support pragma redefine_extname,
6624# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6625# structures (such as rlimit64) without declaring them. As a
6626# work-around, disable LFS on such configurations
6627
6628use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6630$as_echo_n "checking Solaris LFS bug... " >&6; }
6631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006632/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006633
6634#define _LARGEFILE_SOURCE 1
6635#define _FILE_OFFSET_BITS 64
6636#include <sys/resource.h>
6637
Martin v. Löwis399a6892002-10-04 10:22:02 +00006638int
6639main ()
6640{
6641struct rlimit foo;
6642 ;
6643 return 0;
6644}
6645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006646if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006647 sol_lfs_bug=no
6648else
Matthias Kloseb9621712010-04-24 17:59:49 +00006649 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6653$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006654if test "$sol_lfs_bug" = "yes"; then
6655 use_lfs=no
6656fi
6657
6658if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006659# Two defines needed to enable largefile support on various platforms
6660# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006661case $ac_sys_system/$ac_sys_release in
6662AIX*)
6663
6664$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6665
6666 ;;
6667esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006668
Matthias Kloseb9621712010-04-24 17:59:49 +00006669$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006670
6671
Matthias Kloseb9621712010-04-24 17:59:49 +00006672$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006673
Martin v. Löwis399a6892002-10-04 10:22:02 +00006674fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006675
Guido van Rossum84e7b241996-08-19 21:59:00 +00006676# Add some code to confdefs.h so that the test for off_t works on SCO
6677cat >> confdefs.h <<\EOF
6678#if defined(SCO_DS)
6679#undef _OFF_T
6680#endif
6681EOF
6682
Guido van Rossumef2255b2000-03-10 22:30:29 +00006683# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006684ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006685if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006686
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006687else
Martin v. Löwis11437992002-04-12 09:54:03 +00006688
6689cat >>confdefs.h <<_ACEOF
6690#define mode_t int
6691_ACEOF
6692
6693fi
6694
Matthias Kloseb9621712010-04-24 17:59:49 +00006695ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006696if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006697
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006698else
Martin v. Löwis11437992002-04-12 09:54:03 +00006699
6700cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006701#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006702_ACEOF
6703
6704fi
6705
Matthias Kloseb9621712010-04-24 17:59:49 +00006706ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006707if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006708
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006709else
Martin v. Löwis11437992002-04-12 09:54:03 +00006710
6711cat >>confdefs.h <<_ACEOF
6712#define pid_t int
6713_ACEOF
6714
6715fi
6716
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006717
Martin v. Löwis11437992002-04-12 09:54:03 +00006718cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006719#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006720_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006721
Matthias Kloseb9621712010-04-24 17:59:49 +00006722ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006723if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006724
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006725else
Martin v. Löwis11437992002-04-12 09:54:03 +00006726
6727cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006728#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006729_ACEOF
6730
6731fi
6732
Matthias Kloseb9621712010-04-24 17:59:49 +00006733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6734$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006735if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006736 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006737else
Matthias Kloseb9621712010-04-24 17:59:49 +00006738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006739/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006740#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006741
6742_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006744 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006745 ac_cv_type_uid_t=yes
6746else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006747 ac_cv_type_uid_t=no
6748fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006749rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006750
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6753$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006754if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006755
Matthias Kloseb9621712010-04-24 17:59:49 +00006756$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006757
6758
Matthias Kloseb9621712010-04-24 17:59:49 +00006759$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006760
6761fi
6762
Mark Dickinsonce31f662012-12-02 13:20:22 +00006763
6764# There are two separate checks for each of the exact-width integer types we
6765# need. First we check whether the type is available using the usual
6766# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
6767# and <stdint.h> where available). We then also use the special type checks of
6768# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
6769# directly, #define's uint32_t to be a suitable type.
6770
6771ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
6772if test "x$ac_cv_type_uint32_t" = xyes; then :
6773
6774$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
6775
6776fi
6777
Matthias Kloseb9621712010-04-24 17:59:49 +00006778ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6779case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006780 no|yes) ;; #(
6781 *)
6782
Matthias Kloseb9621712010-04-24 17:59:49 +00006783$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006784
6785
6786cat >>confdefs.h <<_ACEOF
6787#define uint32_t $ac_cv_c_uint32_t
6788_ACEOF
6789;;
6790 esac
6791
Mark Dickinsonce31f662012-12-02 13:20:22 +00006792
6793ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
6794if test "x$ac_cv_type_uint64_t" = xyes; then :
6795
6796$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
6797
6798fi
6799
Matthias Kloseb9621712010-04-24 17:59:49 +00006800ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6801case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006802 no|yes) ;; #(
6803 *)
6804
Matthias Kloseb9621712010-04-24 17:59:49 +00006805$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006806
6807
6808cat >>confdefs.h <<_ACEOF
6809#define uint64_t $ac_cv_c_uint64_t
6810_ACEOF
6811;;
6812 esac
6813
Mark Dickinsonce31f662012-12-02 13:20:22 +00006814
6815ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
6816if test "x$ac_cv_type_int32_t" = xyes; then :
6817
6818$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
6819
6820fi
6821
Matthias Kloseb9621712010-04-24 17:59:49 +00006822ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6823case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006824 no|yes) ;; #(
6825 *)
6826
6827cat >>confdefs.h <<_ACEOF
6828#define int32_t $ac_cv_c_int32_t
6829_ACEOF
6830;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006831esac
6832
Mark Dickinsonce31f662012-12-02 13:20:22 +00006833
6834ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
6835if test "x$ac_cv_type_int64_t" = xyes; then :
6836
6837$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
6838
6839fi
6840
Matthias Kloseb9621712010-04-24 17:59:49 +00006841ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6842case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006843 no|yes) ;; #(
6844 *)
6845
6846cat >>confdefs.h <<_ACEOF
6847#define int64_t $ac_cv_c_int64_t
6848_ACEOF
6849;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006850esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006851
Mark Dickinsonce31f662012-12-02 13:20:22 +00006852
Matthias Kloseb9621712010-04-24 17:59:49 +00006853ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006854if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006855
Matthias Kloseb9621712010-04-24 17:59:49 +00006856$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006857
6858fi
6859
Jack Jansendd19cf82001-12-06 22:36:17 +00006860
Michael W. Hudson54241132001-12-07 15:38:26 +00006861# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006862# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006863# The cast to long int works around a bug in the HP C Compiler
6864# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6865# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6866# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6868$as_echo_n "checking size of int... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006869if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006870 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006871else
Matthias Kloseb9621712010-04-24 17:59:49 +00006872 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 +00006873
Martin v. Löwis11437992002-04-12 09:54:03 +00006874else
Matthias Kloseb9621712010-04-24 17:59:49 +00006875 if test "$ac_cv_type_int" = yes; then
6876 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6877$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006878as_fn_error 77 "cannot compute sizeof (int)
Gregory P. Smith69140482012-01-16 02:05:55 -08006879See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006880 else
6881 ac_cv_sizeof_int=0
6882 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006884
Martin v. Löwis11437992002-04-12 09:54:03 +00006885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6887$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006888
6889
6890
Martin v. Löwis11437992002-04-12 09:54:03 +00006891cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006892#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006893_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006894
6895
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006896# The cast to long int works around a bug in the HP C Compiler
6897# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6898# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6899# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6901$as_echo_n "checking size of long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006902if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006903 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006904else
Matthias Kloseb9621712010-04-24 17:59:49 +00006905 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 +00006906
Martin v. Löwis11437992002-04-12 09:54:03 +00006907else
Matthias Kloseb9621712010-04-24 17:59:49 +00006908 if test "$ac_cv_type_long" = yes; then
6909 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006911as_fn_error 77 "cannot compute sizeof (long)
Gregory P. Smith69140482012-01-16 02:05:55 -08006912See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006913 else
6914 ac_cv_sizeof_long=0
6915 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006917
Martin v. Löwis11437992002-04-12 09:54:03 +00006918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6920$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006921
6922
6923
Martin v. Löwis11437992002-04-12 09:54:03 +00006924cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006925#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006926_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006927
6928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006929# The cast to long int works around a bug in the HP C Compiler
6930# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6931# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6932# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6934$as_echo_n "checking size of void *... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006935if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006936 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006937else
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 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 +00006939
Martin v. Löwis11437992002-04-12 09:54:03 +00006940else
Matthias Kloseb9621712010-04-24 17:59:49 +00006941 if test "$ac_cv_type_void_p" = yes; then
6942 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006944as_fn_error 77 "cannot compute sizeof (void *)
Gregory P. Smith69140482012-01-16 02:05:55 -08006945See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006946 else
6947 ac_cv_sizeof_void_p=0
6948 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006950
Martin v. Löwis11437992002-04-12 09:54:03 +00006951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6953$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006954
6955
6956
Martin v. Löwis11437992002-04-12 09:54:03 +00006957cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006958#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006959_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006960
6961
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006962# The cast to long int works around a bug in the HP C Compiler
6963# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6964# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6965# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6967$as_echo_n "checking size of short... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006968if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006969 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006970else
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 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 +00006972
Martin v. Löwis11437992002-04-12 09:54:03 +00006973else
Matthias Kloseb9621712010-04-24 17:59:49 +00006974 if test "$ac_cv_type_short" = yes; then
6975 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6976$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006977as_fn_error 77 "cannot compute sizeof (short)
Gregory P. Smith69140482012-01-16 02:05:55 -08006978See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006979 else
6980 ac_cv_sizeof_short=0
6981 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006983
Martin v. Löwis11437992002-04-12 09:54:03 +00006984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6986$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006987
6988
6989
Martin v. Löwis11437992002-04-12 09:54:03 +00006990cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006991#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006992_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006993
6994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006995# The cast to long int works around a bug in the HP C Compiler
6996# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6997# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6998# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7000$as_echo_n "checking size of float... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007001if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007002 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007003else
Matthias Kloseb9621712010-04-24 17:59:49 +00007004 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 +00007005
Martin v. Löwis11437992002-04-12 09:54:03 +00007006else
Matthias Kloseb9621712010-04-24 17:59:49 +00007007 if test "$ac_cv_type_float" = yes; then
7008 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007010as_fn_error 77 "cannot compute sizeof (float)
Gregory P. Smith69140482012-01-16 02:05:55 -08007011See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007012 else
7013 ac_cv_sizeof_float=0
7014 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007016
Martin v. Löwis11437992002-04-12 09:54:03 +00007017fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7019$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007020
7021
7022
Martin v. Löwis11437992002-04-12 09:54:03 +00007023cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007024#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007025_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007026
7027
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007028# The cast to long int works around a bug in the HP C Compiler
7029# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7030# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7031# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7033$as_echo_n "checking size of double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007034if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007035 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007036else
Matthias Kloseb9621712010-04-24 17:59:49 +00007037 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 +00007038
Martin v. Löwis11437992002-04-12 09:54:03 +00007039else
Matthias Kloseb9621712010-04-24 17:59:49 +00007040 if test "$ac_cv_type_double" = yes; then
7041 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7042$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007043as_fn_error 77 "cannot compute sizeof (double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007044See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007045 else
7046 ac_cv_sizeof_double=0
7047 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007048fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007049
Martin v. Löwis11437992002-04-12 09:54:03 +00007050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7052$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007053
7054
7055
Martin v. Löwis11437992002-04-12 09:54:03 +00007056cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007057#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007058_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007059
7060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007061# The cast to long int works around a bug in the HP C Compiler
7062# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7063# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7064# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7066$as_echo_n "checking size of fpos_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007067if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007068 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007069else
Matthias Kloseb9621712010-04-24 17:59:49 +00007070 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 +00007071
Martin v. Löwis11437992002-04-12 09:54:03 +00007072else
Matthias Kloseb9621712010-04-24 17:59:49 +00007073 if test "$ac_cv_type_fpos_t" = yes; then
7074 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7075$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007076as_fn_error 77 "cannot compute sizeof (fpos_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007077See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007078 else
7079 ac_cv_sizeof_fpos_t=0
7080 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007082
Martin v. Löwis11437992002-04-12 09:54:03 +00007083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7085$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086
7087
7088
Martin v. Löwis11437992002-04-12 09:54:03 +00007089cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007090#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007091_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007092
Michael W. Hudson54241132001-12-07 15:38:26 +00007093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094# The cast to long int works around a bug in the HP C Compiler
7095# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7096# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7097# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7099$as_echo_n "checking size of size_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007100if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007101 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007102else
Matthias Kloseb9621712010-04-24 17:59:49 +00007103 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 +00007104
Martin v. Löwis18e16552006-02-15 17:27:45 +00007105else
Matthias Kloseb9621712010-04-24 17:59:49 +00007106 if test "$ac_cv_type_size_t" = yes; then
7107 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7108$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007109as_fn_error 77 "cannot compute sizeof (size_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007110See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007111 else
7112 ac_cv_sizeof_size_t=0
7113 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007115
Martin v. Löwis18e16552006-02-15 17:27:45 +00007116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7118$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007119
7120
7121
Martin v. Löwis18e16552006-02-15 17:27:45 +00007122cat >>confdefs.h <<_ACEOF
7123#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7124_ACEOF
7125
7126
Christian Heimes400adb02008-02-01 08:12:03 +00007127# The cast to long int works around a bug in the HP C Compiler
7128# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7129# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7130# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7132$as_echo_n "checking size of pid_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007133if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007134 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007135else
Matthias Kloseb9621712010-04-24 17:59:49 +00007136 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 +00007137
Christian Heimes400adb02008-02-01 08:12:03 +00007138else
Matthias Kloseb9621712010-04-24 17:59:49 +00007139 if test "$ac_cv_type_pid_t" = yes; then
7140 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7141$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007142as_fn_error 77 "cannot compute sizeof (pid_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007143See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007144 else
7145 ac_cv_sizeof_pid_t=0
7146 fi
7147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007148
Christian Heimes400adb02008-02-01 08:12:03 +00007149fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7151$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007152
7153
7154
7155cat >>confdefs.h <<_ACEOF
7156#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7157_ACEOF
7158
7159
Michael W. Hudson54241132001-12-07 15:38:26 +00007160
Matthias Kloseb9621712010-04-24 17:59:49 +00007161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7162$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007163have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007165/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007166
Martin v. Löwis11437992002-04-12 09:54:03 +00007167int
7168main ()
7169{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007170long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007171 ;
7172 return 0;
7173}
7174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007175if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007176
7177
Matthias Kloseb9621712010-04-24 17:59:49 +00007178$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007179
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007180 have_long_long=yes
7181
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7185$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007186if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007187# The cast to long int works around a bug in the HP C Compiler
7188# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7189# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7190# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7192$as_echo_n "checking size of long long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007193if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007194 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007195else
Matthias Kloseb9621712010-04-24 17:59:49 +00007196 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 +00007197
Martin v. Löwis11437992002-04-12 09:54:03 +00007198else
Matthias Kloseb9621712010-04-24 17:59:49 +00007199 if test "$ac_cv_type_long_long" = yes; then
7200 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007202as_fn_error 77 "cannot compute sizeof (long long)
Gregory P. Smith69140482012-01-16 02:05:55 -08007203See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007204 else
7205 ac_cv_sizeof_long_long=0
7206 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007208
Martin v. Löwis11437992002-04-12 09:54:03 +00007209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7211$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007212
7213
7214
Martin v. Löwis11437992002-04-12 09:54:03 +00007215cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007216#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007217_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007218
Michael W. Hudson54241132001-12-07 15:38:26 +00007219
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007220fi
7221
Matthias Kloseb9621712010-04-24 17:59:49 +00007222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7223$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007224have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007226/* end confdefs.h. */
7227
7228int
7229main ()
7230{
7231long double x; x = (long double)0;
7232 ;
7233 return 0;
7234}
7235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007236if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007237
7238
Matthias Kloseb9621712010-04-24 17:59:49 +00007239$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007240
7241 have_long_double=yes
7242
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007243fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7246$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007247if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007248# The cast to long int works around a bug in the HP C Compiler
7249# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7250# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7251# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7253$as_echo_n "checking size of long double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007254if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007255 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007256else
Matthias Kloseb9621712010-04-24 17:59:49 +00007257 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 +00007258
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007259else
Matthias Kloseb9621712010-04-24 17:59:49 +00007260 if test "$ac_cv_type_long_double" = yes; then
7261 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7262$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007263as_fn_error 77 "cannot compute sizeof (long double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007264See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007265 else
7266 ac_cv_sizeof_long_double=0
7267 fi
7268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007269
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7272$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007273
7274
7275
7276cat >>confdefs.h <<_ACEOF
7277#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7278_ACEOF
7279
7280
7281fi
7282
7283
Matthias Kloseb9621712010-04-24 17:59:49 +00007284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7285$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007286have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007288/* end confdefs.h. */
7289
7290int
7291main ()
7292{
7293_Bool x; x = (_Bool)0;
7294 ;
7295 return 0;
7296}
7297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007298if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007299
7300
Matthias Kloseb9621712010-04-24 17:59:49 +00007301$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007302
7303 have_c99_bool=yes
7304
Thomas Woutersb2137042007-02-01 18:02:27 +00007305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7308$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007309if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007310# The cast to long int works around a bug in the HP C Compiler
7311# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7312# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7313# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7315$as_echo_n "checking size of _Bool... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007316if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007318else
Matthias Kloseb9621712010-04-24 17:59:49 +00007319 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 +00007320
Thomas Woutersb2137042007-02-01 18:02:27 +00007321else
Matthias Kloseb9621712010-04-24 17:59:49 +00007322 if test "$ac_cv_type__Bool" = yes; then
7323 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7324$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007325as_fn_error 77 "cannot compute sizeof (_Bool)
Gregory P. Smith69140482012-01-16 02:05:55 -08007326See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007327 else
7328 ac_cv_sizeof__Bool=0
7329 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007331
Thomas Woutersb2137042007-02-01 18:02:27 +00007332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7334$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007335
7336
7337
Thomas Woutersb2137042007-02-01 18:02:27 +00007338cat >>confdefs.h <<_ACEOF
7339#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7340_ACEOF
7341
7342
7343fi
7344
Matthias Kloseb9621712010-04-24 17:59:49 +00007345ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007346 #include <stdint.h>
7347 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007348 #ifdef HAVE_INTTYPES_H
7349 #include <inttypes.h>
7350 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007351"
Gregory P. Smith69140482012-01-16 02:05:55 -08007352if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007353
7354cat >>confdefs.h <<_ACEOF
7355#define HAVE_UINTPTR_T 1
7356_ACEOF
7357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007358# The cast to long int works around a bug in the HP C Compiler
7359# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7360# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7361# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7363$as_echo_n "checking size of uintptr_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007364if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007365 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007366else
Matthias Kloseb9621712010-04-24 17:59:49 +00007367 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 +00007368
Martin v. Löwis11437992002-04-12 09:54:03 +00007369else
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 if test "$ac_cv_type_uintptr_t" = yes; then
7371 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007373as_fn_error 77 "cannot compute sizeof (uintptr_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007374See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007375 else
7376 ac_cv_sizeof_uintptr_t=0
7377 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007379
Martin v. Löwis11437992002-04-12 09:54:03 +00007380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7382$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007383
7384
7385
Martin v. Löwis11437992002-04-12 09:54:03 +00007386cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007387#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007388_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007389
Michael W. Hudson54241132001-12-07 15:38:26 +00007390
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007391fi
7392
Thomas Wouters89f507f2006-12-13 04:49:30 +00007393
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007394# The cast to long int works around a bug in the HP C Compiler
7395# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7396# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7397# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7399$as_echo_n "checking size of off_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007400if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007402else
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007404#ifdef HAVE_SYS_TYPES_H
7405#include <sys/types.h>
7406#endif
7407
Matthias Kloseb9621712010-04-24 17:59:49 +00007408"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007409
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007410else
Matthias Kloseb9621712010-04-24 17:59:49 +00007411 if test "$ac_cv_type_off_t" = yes; then
7412 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007414as_fn_error 77 "cannot compute sizeof (off_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007415See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007416 else
7417 ac_cv_sizeof_off_t=0
7418 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007420
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7423$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007424
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007425
7426
Martin v. Löwis11437992002-04-12 09:54:03 +00007427cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007428#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007429_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007430
Michael W. Hudson54241132001-12-07 15:38:26 +00007431
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007432
Matthias Kloseb9621712010-04-24 17:59:49 +00007433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7434$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007435if test "$have_long_long" = yes
7436then
7437if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007438 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007439
Matthias Kloseb9621712010-04-24 17:59:49 +00007440$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007441
Matthias Kloseb9621712010-04-24 17:59:49 +00007442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7443$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007444else
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7446$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007447fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007448else
Matthias Kloseb9621712010-04-24 17:59:49 +00007449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7450$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007451fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007452
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007453# The cast to long int works around a bug in the HP C Compiler
7454# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7455# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7456# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7458$as_echo_n "checking size of time_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007459if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007460 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007461else
Matthias Kloseb9621712010-04-24 17:59:49 +00007462 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007463#ifdef HAVE_SYS_TYPES_H
7464#include <sys/types.h>
7465#endif
7466#ifdef HAVE_TIME_H
7467#include <time.h>
7468#endif
7469
Matthias Kloseb9621712010-04-24 17:59:49 +00007470"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007471
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007472else
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 if test "$ac_cv_type_time_t" = yes; then
7474 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007476as_fn_error 77 "cannot compute sizeof (time_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007477See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007478 else
7479 ac_cv_sizeof_time_t=0
7480 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007482
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7485$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007486
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007487
7488
Martin v. Löwis11437992002-04-12 09:54:03 +00007489cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007490#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007491_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007492
Michael W. Hudson54241132001-12-07 15:38:26 +00007493
7494
Trent Mick635f6fb2000-08-23 21:33:05 +00007495# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007496ac_save_cc="$CC"
7497if test "$ac_cv_kpthread" = "yes"
7498then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007499elif test "$ac_cv_kthread" = "yes"
7500then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007501elif test "$ac_cv_pthread" = "yes"
7502then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007503fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007504
Matthias Kloseb9621712010-04-24 17:59:49 +00007505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7506$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007507have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007509/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007510
7511 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007512int
7513main ()
7514{
Guido van Rossum12580492000-09-24 16:47:19 +00007515pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007516 ;
7517 return 0;
7518}
Matthias Kloseb159a552010-04-25 21:00:44 +00007519
Martin v. Löwis11437992002-04-12 09:54:03 +00007520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007521if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007522 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7526$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007527if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7531# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7533$as_echo_n "checking size of pthread_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007534if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007535 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007536else
Matthias Kloseb9621712010-04-24 17:59:49 +00007537 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007538#ifdef HAVE_PTHREAD_H
7539#include <pthread.h>
7540#endif
7541
Matthias Kloseb9621712010-04-24 17:59:49 +00007542"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007543
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007544else
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 if test "$ac_cv_type_pthread_t" = yes; then
7546 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7547$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007548as_fn_error 77 "cannot compute sizeof (pthread_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007549See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007550 else
7551 ac_cv_sizeof_pthread_t=0
7552 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007554
Trent Mick635f6fb2000-08-23 21:33:05 +00007555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7557$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007558
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007559
7560
Martin v. Löwis11437992002-04-12 09:54:03 +00007561cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007562#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007563_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007564
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007565
Trent Mick635f6fb2000-08-23 21:33:05 +00007566fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007567CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007568
Michael W. Hudson54241132001-12-07 15:38:26 +00007569
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007570case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007571 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007572 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7573 ;;
7574 Darwin/*)
7575 OTHER_LIBTOOL_OPT=""
7576 ;;
7577esac
7578
7579
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007580ARCH_RUN_32BIT=""
7581
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007582case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007583 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007584 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7585 if test "${enable_universalsdk}"; then
7586 :
7587 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007588 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007589 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007590 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007591 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007592 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007593 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007594 if test ${gcc_version} '<' 4.0
7595 then
7596 LIBTOOL_CRUFT="-lcc_dynamic"
7597 else
7598 LIBTOOL_CRUFT=""
7599 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007601 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007602else
Matthias Kloseb9621712010-04-24 17:59:49 +00007603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007604/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007605
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007606 #include <unistd.h>
7607 int main(int argc, char*argv[])
7608 {
7609 if (sizeof(long) == 4) {
7610 return 0;
7611 } else {
7612 return 1;
7613 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007614 }
7615
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007617if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007618 ac_osx_32bit=yes
7619else
Matthias Kloseb9621712010-04-24 17:59:49 +00007620 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007622rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7623 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007624fi
7625
7626
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007627 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007628 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007629 i386)
7630 MACOSX_DEFAULT_ARCH="i386"
7631 ;;
7632 ppc)
7633 MACOSX_DEFAULT_ARCH="ppc"
7634 ;;
7635 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007636 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007637 ;;
7638 esac
7639 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007640 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007641 i386)
7642 MACOSX_DEFAULT_ARCH="x86_64"
7643 ;;
7644 ppc)
7645 MACOSX_DEFAULT_ARCH="ppc64"
7646 ;;
7647 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007648 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007649 ;;
7650 esac
7651
7652 #ARCH_RUN_32BIT="true"
7653 fi
7654
7655 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007656 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007657 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007658esac
7659
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7661$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007662if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007663then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007664 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007665 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007666 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007667
Matthias Kloseb9621712010-04-24 17:59:49 +00007668$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007669
Matthias Kloseb9621712010-04-24 17:59:49 +00007670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7671$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007672 if test $enable_shared = "yes"
7673 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007674 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 +00007675 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007676else
Matthias Kloseb9621712010-04-24 17:59:49 +00007677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7678$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007679fi
7680
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7682$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007683case $ac_sys_system/$ac_sys_release in
7684 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007685
Matthias Kloseb9621712010-04-24 17:59:49 +00007686$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007687
Matthias Kloseb9621712010-04-24 17:59:49 +00007688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7689$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007690 ;;
7691 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7693$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007694 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007695esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007696
Guido van Rossum0a516c91994-09-12 10:58:40 +00007697# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007698
Michael W. Hudson54241132001-12-07 15:38:26 +00007699
7700
7701
7702
Benjamin Peterson99f03762010-04-11 22:15:28 +00007703
Thomas Wouters477c8d52006-05-27 19:21:47 +00007704
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07007705# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
7706# -- usually .so, .sl on HP-UX, .dll on Cygwin
7707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
7708$as_echo_n "checking the extension of shared libraries... " >&6; }
7709if test -z "$SHLIB_SUFFIX"; then
7710 case $ac_sys_system in
7711 hp*|HP*)
7712 case `uname -m` in
7713 ia64) SHLIB_SUFFIX=.so;;
7714 *) SHLIB_SUFFIX=.sl;;
7715 esac
7716 ;;
7717 CYGWIN*) SHLIB_SUFFIX=.dll;;
7718 *) SHLIB_SUFFIX=.so;;
7719 esac
7720fi
7721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
7722$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007723
Guido van Rossum0a516c91994-09-12 10:58:40 +00007724# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007725# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007726# (Shared libraries in this instance are shared modules to be loaded into
7727# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7729$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007730if test -z "$LDSHARED"
7731then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007732 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007733 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007734 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007735 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007736 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007737 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007738 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007739 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007740 if test "$GCC" = "yes" ; then
7741 LDSHARED='$(CC) -shared'
7742 LDCXXSHARED='$(CXX) -shared'
7743 else
7744 LDSHARED='$(CC) -G'
7745 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007746 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007747 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007748 if test "$GCC" = "yes" ; then
7749 LDSHARED='$(CC) -shared'
7750 LDCXXSHARED='$(CXX) -shared'
7751 else
7752 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007753 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007754 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007755 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007756 LDSHARED='$(CC) -bundle'
7757 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007758 if test "$enable_framework" ; then
7759 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007760 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7761 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007762 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007763 else
7764 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007765 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007766 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007767 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007768 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007769 LDSHARED='$(CC) -bundle'
7770 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007771 if test "$enable_framework" ; then
7772 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007773 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7774 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007775 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007776 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007777 # No framework, use the Python app as bundle-loader
7778 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007779 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007780 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007781 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007782 Darwin/*)
7783 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7784 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007785
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007786 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007787 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007788 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007789 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007790 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007791 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7792 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007793 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007794 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007795 LDSHARED='$(CC) -bundle'
7796 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007797 if test "$enable_framework" ; then
7798 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007799 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7800 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007801 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007802 else
7803 # No framework, use the Python app as bundle-loader
7804 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7805 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007806 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007807 fi
7808 fi
7809 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007810 Linux*|GNU*|QNX*)
7811 LDSHARED='$(CC) -shared'
7812 LDCXXSHARED='$(CXX) -shared';;
7813 BSD/OS*/4*)
7814 LDSHARED="gcc -shared"
7815 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007816 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007817 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007818 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007819 LDSHARED='$(CC) -shared'
7820 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007821 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007822 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007823 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007824 OpenBSD*)
7825 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7826 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007827 LDSHARED='$(CC) -shared $(CCSHARED)'
7828 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007829 else
7830 case `uname -r` in
7831 [01].* | 2.[0-7] | 2.[0-7].*)
7832 LDSHARED="ld -Bshareable ${LDFLAGS}"
7833 ;;
7834 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007835 LDSHARED='$(CC) -shared $(CCSHARED)'
7836 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007837 ;;
7838 esac
7839 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007840 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007841 LDSHARED='$(CC) -shared'
7842 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007843 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007844 if test "$GCC" = "yes" ; then
7845 LDSHARED='$(CC) -shared'
7846 LDCXXSHARED='$(CXX) -shared'
7847 else
7848 LDSHARED='$(CC) -G'
7849 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007850 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007851 SCO_SV*)
7852 LDSHARED='$(CC) -Wl,-G,-Bexport'
7853 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7854 CYGWIN*)
7855 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7856 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007857 *) LDSHARED="ld";;
7858 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7861$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007862LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007863BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007864# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007865# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7867$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007868if test -z "$CCSHARED"
7869then
Guido van Rossum07397971997-04-29 21:49:50 +00007870 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007871 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007872 then CCSHARED="-fPIC";
7873 elif test `uname -p` = sparc;
7874 then CCSHARED="-xcode=pic32";
7875 else CCSHARED="-Kpic";
7876 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007877 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007878 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007879 else CCSHARED="+z";
7880 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007881 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007882 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007883 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007884 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007885 if test "$GCC" = "yes"
7886 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007887 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007888 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007889 SCO_SV*)
7890 if test "$GCC" = "yes"
7891 then CCSHARED="-fPIC"
7892 else CCSHARED="-Kpic -belf"
7893 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007894 IRIX*/6*) case $CC in
7895 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007896 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007897 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007898 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7901$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007902# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007903# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7905$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007906if test -z "$LINKFORSHARED"
7907then
Guido van Rossum07397971997-04-29 21:49:50 +00007908 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007909 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007910 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007911 LINKFORSHARED="-Wl,-E -Wl,+s";;
7912# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007913 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007914 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007915 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007916 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007917 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007918 if test "$enable_framework"
7919 then
Jack Jansenda49e192005-01-07 13:08:22 +00007920 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007921 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007922 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007923 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007924 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007925 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007926 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007927 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7928 then
7929 LINKFORSHARED="-Wl,--export-dynamic"
7930 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007931 SunOS/5*) case $CC in
7932 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007933 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007934 then
7935 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007936 fi;;
7937 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007938 CYGWIN*)
7939 if test $enable_shared = "no"
7940 then
7941 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7942 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007943 QNX*)
7944 # -Wl,-E causes the symbols to be added to the dynamic
7945 # symbol table so that they can be found when a module
7946 # is loaded. -N 2048K causes the stack size to be set
7947 # to 2048 kilobytes so that the stack doesn't overflow
7948 # when running test_compile.py.
7949 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007950 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7953$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007954
Michael W. Hudson54241132001-12-07 15:38:26 +00007955
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007956
Matthias Kloseb9621712010-04-24 17:59:49 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7958$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007959if test ! "$LIBRARY" = "$LDLIBRARY"
7960then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007961 case $ac_sys_system in
7962 CYGWIN*)
7963 # Cygwin needs CCSHARED when building extension DLLs
7964 # but not when building the interpreter DLL.
7965 CFLAGSFORSHARED='';;
7966 *)
7967 CFLAGSFORSHARED='$(CCSHARED)'
7968 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7971$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007972
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007973# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7974# library (with --enable-shared).
7975# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007976# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7977# if it is not required, since it creates a dependency of the shared library
7978# to LIBS. This, in turn, means that applications linking the shared libpython
7979# don't need to link LIBS explicitly. The default should be only changed
7980# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007981
Matthias Kloseb9621712010-04-24 17:59:49 +00007982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7983$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007984case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007985 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007986 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007987esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7989$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007990
7991
Guido van Rossum627b2d71993-12-24 10:39:16 +00007992# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7994$as_echo_n "checking for dlopen in -ldl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007995if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007997else
Martin v. Löwis11437992002-04-12 09:54:03 +00007998 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007999LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003/* Override any GCC internal prototype to avoid an error.
8004 Use char because int might match the return type of a GCC
8005 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008006#ifdef __cplusplus
8007extern "C"
8008#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008009char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008010int
8011main ()
8012{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008014 ;
8015 return 0;
8016}
8017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008018if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008019 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008020else
Matthias Kloseb9621712010-04-24 17:59:49 +00008021 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008023rm -f core conftest.err conftest.$ac_objext \
8024 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008025LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8028$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008029if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008030 cat >>confdefs.h <<_ACEOF
8031#define HAVE_LIBDL 1
8032_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008033
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008034 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008036fi
8037 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8039$as_echo_n "checking for shl_load in -ldld... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008040if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008041 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008042else
Martin v. Löwis11437992002-04-12 09:54:03 +00008043 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008044LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008047
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048/* Override any GCC internal prototype to avoid an error.
8049 Use char because int might match the return type of a GCC
8050 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008051#ifdef __cplusplus
8052extern "C"
8053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008054char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008055int
8056main ()
8057{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008059 ;
8060 return 0;
8061}
8062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008063if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008064 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008065else
Matthias Kloseb9621712010-04-24 17:59:49 +00008066 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008068rm -f core conftest.err conftest.$ac_objext \
8069 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008070LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8073$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008074if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 cat >>confdefs.h <<_ACEOF
8076#define HAVE_LIBDLD 1
8077_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008078
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008079 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008081fi
8082 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008083
Georg Brandlb1441c72009-01-03 22:33:39 +00008084# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008085if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8087$as_echo_n "checking for library containing sem_init... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008088if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008090else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008091 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095/* Override any GCC internal prototype to avoid an error.
8096 Use char because int might match the return type of a GCC
8097 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008098#ifdef __cplusplus
8099extern "C"
8100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008101char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008102int
8103main ()
8104{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008106 ;
8107 return 0;
8108}
8109_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110for ac_lib in '' pthread rt posix4; do
8111 if test -z "$ac_lib"; then
8112 ac_res="none required"
8113 else
8114 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008115 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008117 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008118 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008120rm -f core conftest.err conftest.$ac_objext \
8121 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08008122 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008125done
Gregory P. Smith69140482012-01-16 02:05:55 -08008126if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008128else
8129 ac_cv_search_sem_init=no
8130fi
8131rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008132LIBS=$ac_func_search_save_LIBS
8133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8135$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008136ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008137if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008139
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008140fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008141 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008142 # posix4 on Solaris 2.6
8143 # pthread (first!) on Linux
8144fi
8145
Martin v. Löwis19d17342003-06-14 21:03:05 +00008146# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8148$as_echo_n "checking for textdomain in -lintl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008149if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008150 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008151else
8152 ac_check_lib_save_LIBS=$LIBS
8153LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008155/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008156
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157/* Override any GCC internal prototype to avoid an error.
8158 Use char because int might match the return type of a GCC
8159 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008160#ifdef __cplusplus
8161extern "C"
8162#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008163char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008164int
8165main ()
8166{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008167return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008168 ;
8169 return 0;
8170}
8171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008172if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008173 ac_cv_lib_intl_textdomain=yes
8174else
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008177rm -f core conftest.err conftest.$ac_objext \
8178 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008179LIBS=$ac_check_lib_save_LIBS
8180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8182$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008183if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008184
Matthias Kloseb9621712010-04-24 17:59:49 +00008185$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008186
Brett Cannonc6d936e2009-06-07 20:09:53 +00008187 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008188fi
8189
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008190
8191# checks for system dependent C++ extensions support
8192case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8194$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008196/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008197
Georg Brandl59e87bd2011-02-15 19:48:59 +00008198 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008199int
8200main ()
8201{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008202loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008203 ;
8204 return 0;
8205}
Matthias Kloseb159a552010-04-25 21:00:44 +00008206
Martin v. Löwis11437992002-04-12 09:54:03 +00008207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008208if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008209
Matthias Kloseb159a552010-04-25 21:00:44 +00008210
Matthias Kloseb9621712010-04-24 17:59:49 +00008211$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008212
Matthias Kloseb159a552010-04-25 21:00:44 +00008213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008214$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008215
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008216else
Matthias Kloseb159a552010-04-25 21:00:44 +00008217
8218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008219$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008220
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008221fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008222rm -f core conftest.err conftest.$ac_objext \
8223 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008224 *) ;;
8225esac
8226
Guido van Rossum70c7f481998-03-26 18:44:10 +00008227# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8229$as_echo_n "checking for t_open in -lnsl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008230if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008232else
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008234LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238/* Override any GCC internal prototype to avoid an error.
8239 Use char because int might match the return type of a GCC
8240 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008241#ifdef __cplusplus
8242extern "C"
8243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008244char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008245int
8246main ()
8247{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008248return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008249 ;
8250 return 0;
8251}
8252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008253if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008254 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008255else
Matthias Kloseb9621712010-04-24 17:59:49 +00008256 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008258rm -f core conftest.err conftest.$ac_objext \
8259 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008260LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8263$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008264if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008265 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008266fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008267 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8269$as_echo_n "checking for socket in -lsocket... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008270if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008272else
Martin v. Löwis11437992002-04-12 09:54:03 +00008273 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008274LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008277
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008278/* Override any GCC internal prototype to avoid an error.
8279 Use char because int might match the return type of a GCC
8280 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008281#ifdef __cplusplus
8282extern "C"
8283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008284char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008285int
8286main ()
8287{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008288return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 ;
8290 return 0;
8291}
8292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008293if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008294 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008295else
Matthias Kloseb9621712010-04-24 17:59:49 +00008296 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008298rm -f core conftest.err conftest.$ac_objext \
8299 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008300LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8303$as_echo "$ac_cv_lib_socket_socket" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008304if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008305 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008306fi
8307 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008308
Matthias Kloseb9621712010-04-24 17:59:49 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8310$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008311
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008312# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008313if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8316$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008317LIBS="$withval $LIBS"
8318
8319else
Matthias Kloseb9621712010-04-24 17:59:49 +00008320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8321$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008322fi
8323
Guido van Rossum7f43da71994-08-01 12:15:30 +00008324
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008325if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008326 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8327set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8329$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008330if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008332else
8333 case $PKG_CONFIG in
8334 [\\/]* | ?:[\\/]*)
8335 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8336 ;;
8337 *)
8338 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8339for as_dir in $PATH
8340do
8341 IFS=$as_save_IFS
8342 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008343 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008344 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008345 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008346 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008347 break 2
8348 fi
8349done
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008351IFS=$as_save_IFS
8352
8353 ;;
8354esac
8355fi
8356PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8357if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8359$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008360else
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8362$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008363fi
8364
8365
8366fi
8367if test -z "$ac_cv_path_PKG_CONFIG"; then
8368 ac_pt_PKG_CONFIG=$PKG_CONFIG
8369 # Extract the first word of "pkg-config", so it can be a program name with args.
8370set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8372$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008373if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008375else
8376 case $ac_pt_PKG_CONFIG in
8377 [\\/]* | ?:[\\/]*)
8378 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8379 ;;
8380 *)
8381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8382for as_dir in $PATH
8383do
8384 IFS=$as_save_IFS
8385 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008387 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008388 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008390 break 2
8391 fi
8392done
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008394IFS=$as_save_IFS
8395
8396 ;;
8397esac
8398fi
8399ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8400if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8402$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008403else
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8405$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008406fi
8407
8408 if test "x$ac_pt_PKG_CONFIG" = x; then
8409 PKG_CONFIG=""
8410 else
8411 case $cross_compiling:$ac_tool_warned in
8412yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008413{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8414$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008415ac_tool_warned=yes ;;
8416esac
8417 PKG_CONFIG=$ac_pt_PKG_CONFIG
8418 fi
8419else
8420 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8421fi
8422
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008423
8424# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8426$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008427
8428# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008429if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008430 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008431else
8432 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008433fi
8434
8435
Matthias Kloseb9621712010-04-24 17:59:49 +00008436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8437$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008438
8439# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8441$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008442
8443# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008444if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008445 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008446else
8447 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008448fi
8449
8450
8451if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008452 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8453else
8454 LIBFFI_INCLUDEDIR=""
8455fi
8456
8457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8459$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008460
Benjamin Peterson076ed002010-10-31 17:11:02 +00008461# Check for support for loadable sqlite extensions
8462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8463$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8464# Check whether --enable-loadable-sqlite-extensions was given.
8465if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8466 enableval=$enable_loadable_sqlite_extensions;
8467else
8468 enable_loadable_sqlite_extensions="no"
8469fi
8470
8471
8472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8473$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8474
Matthias Klose55708cc2009-04-30 08:06:49 +00008475# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8477$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008478
8479# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008480if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008481 withval=$with_dbmliborder;
8482if test x$with_dbmliborder = xyes
8483then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008484as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008485else
8486 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8487 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8488 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008489 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008490 fi
8491 done
8492fi
8493fi
8494
Matthias Kloseb9621712010-04-24 17:59:49 +00008495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8496$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008497
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008498# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008499
8500
Matthias Kloseb9621712010-04-24 17:59:49 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8502$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008505if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008506 withval=$with_signal_module;
8507fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008508
8509
8510if test -z "$with_signal_module"
8511then with_signal_module="yes"
8512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8514$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008515
8516if test "${with_signal_module}" = "yes"; then
8517 USE_SIGNAL_MODULE=""
8518 SIGNAL_OBJS=""
8519else
8520 USE_SIGNAL_MODULE="#"
8521 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8522fi
8523
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008524# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008525
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008526USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008527
Matthias Kloseb9621712010-04-24 17:59:49 +00008528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8529$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008530
Guido van Rossumec2f0731997-01-22 20:54:01 +00008531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008532# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008533if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8536$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008537LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008538if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008539 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008540fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008541else
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8543$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544fi
8545
Martin v. Löwis11437992002-04-12 09:54:03 +00008546
8547# Templates for things AC_DEFINEd more than once.
8548# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008549
8550
Martin v. Löwis11437992002-04-12 09:54:03 +00008551
8552
Matthias Kloseb9621712010-04-24 17:59:49 +00008553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8554$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008557if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558 withval=$with_threads;
8559fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008560
8561
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008562# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008565if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566 withval=$with_thread; with_threads=$with_thread
8567fi
8568
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008569
8570if test -z "$with_threads"
8571then with_threads="yes"
8572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8574$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008575
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008576
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008577if test "$with_threads" = "no"
8578then
8579 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008580elif test "$ac_cv_pthread_is_default" = yes
8581then
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008583
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008584 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008586
8587 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008589elif test "$ac_cv_kpthread" = "yes"
8590then
8591 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008592 if test "$ac_cv_cxx_thread" = "yes"; then
8593 CXX="$CXX -Kpthread"
8594 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008595 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008596
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008597 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008598 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008599elif test "$ac_cv_kthread" = "yes"
8600then
8601 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008602 if test "$ac_cv_cxx_thread" = "yes"; then
8603 CXX="$CXX -Kthread"
8604 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008606
8607 posix_threads=yes
8608 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008609elif test "$ac_cv_pthread" = "yes"
8610then
8611 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008612 if test "$ac_cv_cxx_thread" = "yes"; then
8613 CXX="$CXX -pthread"
8614 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008616
8617 posix_threads=yes
8618 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008619else
8620 if test ! -z "$with_threads" -a -d "$with_threads"
8621 then LDFLAGS="$LDFLAGS -L$with_threads"
8622 fi
8623 if test ! -z "$withval" -a -d "$withval"
8624 then LDFLAGS="$LDFLAGS -L$withval"
8625 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008626
8627 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008628 # define _POSIX_THREADS in unistd.h. Some apparently don't
8629 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8631$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008633/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008634
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008635#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008636#ifdef _POSIX_THREADS
8637yes
8638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008639
8640_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008643 unistd_defines_pthreads=yes
8644else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008645 unistd_defines_pthreads=no
8646fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008647rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008648
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8650$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008651
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008653
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 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 -08008655if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008656 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008657
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660
Matthias Kloseb9621712010-04-24 17:59:49 +00008661$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008662
8663 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008664 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008665else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008666
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 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 -08008668if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008670
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008672
Martin v. Löwis11437992002-04-12 09:54:03 +00008673
Matthias Kloseb9621712010-04-24 17:59:49 +00008674$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008675
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008676 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008677else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008678
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008679 # Just looking for pthread_create in libpthread is not enough:
8680 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8681 # So we really have to include pthread.h, and then link.
8682 _libs=$LIBS
8683 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8685$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008687/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008688#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008689
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008690void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008691int
8692main ()
8693{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008694
8695pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 ;
8697 return 0;
8698}
8699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008700if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008701
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8703$as_echo "yes" >&6; }
8704 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008705
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008706 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008707 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008708else
Martin v. Löwis11437992002-04-12 09:54:03 +00008709
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008710 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Gregory P. Smith69140482012-01-16 02:05:55 -08008712if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008714
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008715 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008716 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008717else
Guido van Rossumad678af1998-10-02 14:42:15 +00008718
Matthias Kloseb9621712010-04-24 17:59:49 +00008719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8720$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008721if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008723else
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008725LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729/* Override any GCC internal prototype to avoid an error.
8730 Use char because int might match the return type of a GCC
8731 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008732#ifdef __cplusplus
8733extern "C"
8734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008735char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008736int
8737main ()
8738{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008739return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008740 ;
8741 return 0;
8742}
8743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008744if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008746else
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008749rm -f core conftest.err conftest.$ac_objext \
8750 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008751LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8754$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008755if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008757
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008758 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008759 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008760 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008761else
Greg Steinadf63d62000-07-05 10:38:09 +00008762
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8764$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008765if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008767else
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008769LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773/* Override any GCC internal prototype to avoid an error.
8774 Use char because int might match the return type of a GCC
8775 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008776#ifdef __cplusplus
8777extern "C"
8778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008779char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008780int
8781main ()
8782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 ;
8785 return 0;
8786}
8787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008788if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008789 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793rm -f core conftest.err conftest.$ac_objext \
8794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008795LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8798$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008799if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008801
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008802 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008803 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008804 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008805else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008806
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8808$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008809if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008811else
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008813LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817/* Override any GCC internal prototype to avoid an error.
8818 Use char because int might match the return type of a GCC
8819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008820#ifdef __cplusplus
8821extern "C"
8822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008823char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008824int
8825main ()
8826{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ;
8829 return 0;
8830}
8831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008832if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008834else
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008837rm -f core conftest.err conftest.$ac_objext \
8838 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008839LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8842$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008843if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008845
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008846 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008847 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008848 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008849else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008850
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8852$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008853if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008855else
Martin v. Löwis11437992002-04-12 09:54:03 +00008856 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008857LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008861/* Override any GCC internal prototype to avoid an error.
8862 Use char because int might match the return type of a GCC
8863 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008864#ifdef __cplusplus
8865extern "C"
8866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008867char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008868int
8869main ()
8870{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008872 ;
8873 return 0;
8874}
8875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008876if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008877 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008878else
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008881rm -f core conftest.err conftest.$ac_objext \
8882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008883LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8886$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008887if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008888 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008889
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008890 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008891 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008892 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008893else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008894
Martin v. Löwis130fb172001-07-19 11:00:41 +00008895 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008896fi
8897
Guido van Rossum627b2d71993-12-24 10:39:16 +00008898
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008899fi
8900
Guido van Rossum0be3e491997-05-22 20:33:33 +00008901fi
8902
Guido van Rossum49545951997-12-02 19:28:29 +00008903fi
8904
Guido van Rossumb93a8621998-05-07 13:27:32 +00008905fi
8906
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008908rm -f core conftest.err conftest.$ac_objext \
8909 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008910fi
8911
Martin v. Löwis11437992002-04-12 09:54:03 +00008912
8913fi
8914
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008915
Michael W. Hudson54241132001-12-07 15:38:26 +00008916
Matthias Kloseb9621712010-04-24 17:59:49 +00008917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8918$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008919if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008921else
Martin v. Löwis11437992002-04-12 09:54:03 +00008922 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008923LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008926
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008927/* Override any GCC internal prototype to avoid an error.
8928 Use char because int might match the return type of a GCC
8929 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008930#ifdef __cplusplus
8931extern "C"
8932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008933char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008934int
8935main ()
8936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008937return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008938 ;
8939 return 0;
8940}
8941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008942if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008943 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008944else
Matthias Kloseb9621712010-04-24 17:59:49 +00008945 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008947rm -f core conftest.err conftest.$ac_objext \
8948 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008949LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8952$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008953if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008955
Martin v. Löwis130fb172001-07-19 11:00:41 +00008956 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008957 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008958 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008959fi
8960
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008961
Neal Norwitza978ab02002-11-02 16:58:05 +00008962 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8964$as_echo_n "checking for thr_create in -lthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008965if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008967else
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008969LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008972
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008973/* Override any GCC internal prototype to avoid an error.
8974 Use char because int might match the return type of a GCC
8975 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008976#ifdef __cplusplus
8977extern "C"
8978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008979char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008980int
8981main ()
8982{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 ;
8985 return 0;
8986}
8987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008988if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008990else
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008993rm -f core conftest.err conftest.$ac_objext \
8994 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008995LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8998$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008999if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009001
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009002 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009003 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009004 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009005fi
9006
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009007 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009008
Martin v. Löwis130fb172001-07-19 11:00:41 +00009009 if test "$USE_THREAD_MODULE" != "#"
9010 then
9011 # If the above checks didn't disable threads, (at least) OSF1
9012 # needs this '-threads' argument during linking.
9013 case $ac_sys_system in
9014 OSF1) LDLAST=-threads;;
9015 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009016 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009017fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009018
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009019if test "$posix_threads" = "yes"; then
9020 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009021
Matthias Kloseb9621712010-04-24 17:59:49 +00009022$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009023
9024 fi
9025
9026 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9027 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009028 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009029$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009030
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009031 ;;
9032 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009033$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009034
9035 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009036 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009037$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009038
9039 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009040 esac
9041
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9043$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009044 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009046else
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009048 ac_cv_pthread_system_supported=no
9049else
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009051/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009052#include <pthread.h>
9053 void *foo(void *parm) {
9054 return NULL;
9055 }
9056 main() {
9057 pthread_attr_t attr;
9058 pthread_t id;
9059 if (pthread_attr_init(&attr)) exit(-1);
9060 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9061 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9062 exit(0);
9063 }
9064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009065if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009066 ac_cv_pthread_system_supported=yes
9067else
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9071 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009072fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009074
Guido van Rossum627b2d71993-12-24 10:39:16 +00009075fi
9076
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9078$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009079 if test "$ac_cv_pthread_system_supported" = "yes"; then
9080
Matthias Kloseb9621712010-04-24 17:59:49 +00009081$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009082
9083 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009084 for ac_func in pthread_sigmask
9085do :
9086 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Gregory P. Smith69140482012-01-16 02:05:55 -08009087if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009088 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009089#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009090_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009091 case $ac_sys_system in
9092 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009093
Matthias Kloseb9621712010-04-24 17:59:49 +00009094$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009095
9096 ;;
9097 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009098fi
9099done
9100
9101fi
9102
9103
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009105
Matthias Kloseb9621712010-04-24 17:59:49 +00009106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9107$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009108# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009109if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009110 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009111 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9113$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009114 ipv6=no
9115 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9117$as_echo "yes" >&6; }
9118 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009119
9120 ipv6=yes
9121 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009122 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123else
Martin v. Löwis11437992002-04-12 09:54:03 +00009124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009126/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009127 /* AF_INET6 available check */
9128#include <sys/types.h>
9129#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009130int
9131main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009132{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009133int domain = AF_INET6;
9134 ;
9135 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009136}
Martin v. Löwis11437992002-04-12 09:54:03 +00009137_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009138if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009139
Matthias Kloseb9621712010-04-24 17:59:49 +00009140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9141$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009142 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009143
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009144else
Matthias Kloseb159a552010-04-25 21:00:44 +00009145
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9147$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009148 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009149
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009150fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009152
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009153if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9155$as_echo_n "checking if RFC2553 API is available... " >&6; }
9156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009157/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009158
9159 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009160#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009161int
9162main ()
9163{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009164struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009165 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 ;
9167 return 0;
9168}
Matthias Kloseb159a552010-04-25 21:00:44 +00009169
Martin v. Löwis11437992002-04-12 09:54:03 +00009170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009171if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009172
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009174$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009175 ipv6=yes
9176
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009177else
Matthias Kloseb159a552010-04-25 21:00:44 +00009178
9179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009180$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009181 ipv6=no
9182
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009185fi
9186
9187if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009188 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009189
9190fi
9191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009192fi
9193
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009194
9195ipv6type=unknown
9196ipv6lib=none
9197ipv6trylibc=no
9198
9199if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9201$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009202 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9203 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009204 case $i in
9205 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009207/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009208
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009209#include <netinet/in.h>
9210#ifdef IPV6_INRIA_VERSION
9211yes
9212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009213_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009215 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009216 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009217fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009218rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009219
9220 ;;
9221 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009223/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009224
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009225#include <netinet/in.h>
9226#ifdef __KAME__
9227yes
9228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009229_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009231 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009232 ipv6type=$i;
9233 ipv6lib=inet6
9234 ipv6libdir=/usr/local/v6/lib
9235 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009236fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009237rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009238
9239 ;;
9240 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009242/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009243
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009244#include <features.h>
9245#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9246yes
9247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009248_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009249if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009250 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009251 ipv6type=$i;
9252 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009253fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009254rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009255
9256 ;;
9257 linux-inet6)
9258 if test -d /usr/inet6; then
9259 ipv6type=$i
9260 ipv6lib=inet6
9261 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009262 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009263 fi
9264 ;;
9265 solaris)
9266 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009267 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009268 ipv6type=$i
9269 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009270 fi
9271 fi
9272 ;;
9273 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009275/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009276
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009277#include <sys/param.h>
9278#ifdef _TOSHIBA_INET6
9279yes
9280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009281_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009283 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009284 ipv6type=$i;
9285 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009286 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009287fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009288rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009289
9290 ;;
9291 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009293/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009294
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009295#include </usr/local/v6/include/sys/v6config.h>
9296#ifdef __V6D__
9297yes
9298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009299_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009300if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009301 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009302 ipv6type=$i;
9303 ipv6lib=v6;
9304 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009305 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009306fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009307rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009308
9309 ;;
9310 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009312/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009313
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009314#include <sys/param.h>
9315#ifdef _ZETA_MINAMI_INET6
9316yes
9317#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009318_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009319if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009320 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009321 ipv6type=$i;
9322 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009323 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009324fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009325rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009326
9327 ;;
9328 esac
9329 if test "$ipv6type" != "unknown"; then
9330 break
9331 fi
9332 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9334$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009335fi
9336
9337if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9338 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9339 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9340 echo "using lib$ipv6lib"
9341 else
9342 if test $ipv6trylibc = "yes"; then
9343 echo "using libc"
9344 else
9345 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9346 echo "You need to fetch lib$ipv6lib.a from appropriate"
9347 echo 'ipv6 kit and compile beforehand.'
9348 exit 1
9349 fi
9350 fi
9351fi
9352
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9354$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009356/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009357
9358 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009359int
9360main ()
9361{
9362FSIORefNum fRef = 0
9363 ;
9364 return 0;
9365}
Matthias Kloseb159a552010-04-25 21:00:44 +00009366
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009368if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009369
Matthias Kloseb159a552010-04-25 21:00:44 +00009370
Matthias Kloseb9621712010-04-24 17:59:49 +00009371$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009372
Matthias Kloseb9621712010-04-24 17:59:49 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9374$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009375
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009376else
Matthias Kloseb159a552010-04-25 21:00:44 +00009377
Matthias Kloseb9621712010-04-24 17:59:49 +00009378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9379$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009380
9381fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9383
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009384# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9386$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009388# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009389if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009390 withval=$with_doc_strings;
9391fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009392
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009393
9394if test -z "$with_doc_strings"
9395then with_doc_strings="yes"
9396fi
9397if test "$with_doc_strings" != "no"
9398then
9399
Matthias Kloseb9621712010-04-24 17:59:49 +00009400$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009401
9402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9404$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009405
Antoine Pitrou042b1282010-08-13 21:15:58 +00009406# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9408$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009410# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009411if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009412 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009413if test "$withval" != no
9414then
9415
Matthias Kloseb9621712010-04-24 17:59:49 +00009416$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009417
Matthias Kloseb9621712010-04-24 17:59:49 +00009418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9419$as_echo "yes" >&6; }
9420else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009422fi
9423else
Matthias Kloseb9621712010-04-24 17:59:49 +00009424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9425$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426fi
9427
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009428
9429# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9431$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009433# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009434if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009435 withval=$with_pymalloc;
9436fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009437
Neil Schemenauera35c6882001-02-27 04:45:05 +00009438
Neil Schemenauer16c22972002-03-22 15:34:49 +00009439if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009440then
9441 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009442 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009443fi
9444if test "$with_pymalloc" != "no"
9445then
Martin v. Löwis11437992002-04-12 09:54:03 +00009446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009448
9449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9451$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009452
Benjamin Peterson05159c42009-12-03 03:01:27 +00009453# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9455$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009456
9457# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009458if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009459 withval=$with_valgrind;
9460else
9461 with_valgrind=no
9462fi
9463
Matthias Kloseb9621712010-04-24 17:59:49 +00009464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9465$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009466if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009467 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 -08009468if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009469
Matthias Kloseb9621712010-04-24 17:59:49 +00009470$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009471
9472else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009473 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009474
9475fi
9476
9477
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009478 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009479fi
9480
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009481# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009482
Guido van Rossum98935bf2001-09-05 19:13:16 +00009483DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009484
Guido van Rossume97ee181999-12-20 21:27:22 +00009485# the dlopen() function means we might want to use dynload_shlib.o. some
9486# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009487for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009488do :
9489 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Gregory P. Smith69140482012-01-16 02:05:55 -08009490if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009492#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009493_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009494
Guido van Rossume97ee181999-12-20 21:27:22 +00009495fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009496done
Guido van Rossume97ee181999-12-20 21:27:22 +00009497
Michael W. Hudson54241132001-12-07 15:38:26 +00009498
Guido van Rossume97ee181999-12-20 21:27:22 +00009499# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9500# loading of modules.
9501
Matthias Kloseb9621712010-04-24 17:59:49 +00009502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9503$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009504if test -z "$DYNLOADFILE"
9505then
9506 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009507 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9508 if test "$ac_cv_func_dlopen" = yes
9509 then DYNLOADFILE="dynload_shlib.o"
9510 else DYNLOADFILE="dynload_aix.o"
9511 fi
9512 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009513 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009514 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9515 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009516 *)
9517 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9518 # out any dynamic loading
9519 if test "$ac_cv_func_dlopen" = yes
9520 then DYNLOADFILE="dynload_shlib.o"
9521 else DYNLOADFILE="dynload_stub.o"
9522 fi
9523 ;;
9524 esac
9525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9527$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009528if test "$DYNLOADFILE" != "dynload_stub.o"
9529then
Martin v. Löwis11437992002-04-12 09:54:03 +00009530
Matthias Kloseb9621712010-04-24 17:59:49 +00009531$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009532
9533fi
9534
Neil Schemenauer4e425612001-06-19 15:44:15 +00009535# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9536
Michael W. Hudson54241132001-12-07 15:38:26 +00009537
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9539$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009540if test -z "$MACHDEP_OBJS"
9541then
Jack Jansene578a632001-08-15 01:27:14 +00009542 MACHDEP_OBJS=$extra_machdep_objs
9543else
9544 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9547$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009548
Guido van Rossum627b2d71993-12-24 10:39:16 +00009549# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009550for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009551 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009552 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009553 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009554 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009555 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009556 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009557 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9558 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009559 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009560 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009561 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009562 truncate uname unsetenv utimes waitpid wait3 wait4 \
9563 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009564do :
9565 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9566ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009567if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009569#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009570_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009571
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009572fi
9573done
9574
Michael W. Hudson54241132001-12-07 15:38:26 +00009575
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009576ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9577 #include <dirent.h>
9578"
9579if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9580
9581$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9582
9583fi
9584
9585
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009586# For some functions, having a definition is not sufficient, since
9587# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9589$as_echo_n "checking for chroot... " >&6; }
9590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009591/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009592#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009593int
9594main ()
9595{
9596void *x=chroot
9597 ;
9598 return 0;
9599}
9600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009601if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009602
Matthias Kloseb9621712010-04-24 17:59:49 +00009603$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009604
Matthias Kloseb159a552010-04-25 21:00:44 +00009605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009606$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009607else
Matthias Kloseb9621712010-04-24 17:59:49 +00009608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009610
9611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9614$as_echo_n "checking for link... " >&6; }
9615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009616/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009617#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009618int
9619main ()
9620{
9621void *x=link
9622 ;
9623 return 0;
9624}
9625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009626if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009627
Matthias Kloseb9621712010-04-24 17:59:49 +00009628$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009629
Matthias Kloseb159a552010-04-25 21:00:44 +00009630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009631$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009632else
Matthias Kloseb9621712010-04-24 17:59:49 +00009633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9634$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009635
9636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9639$as_echo_n "checking for symlink... " >&6; }
9640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009641/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009642#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009643int
9644main ()
9645{
9646void *x=symlink
9647 ;
9648 return 0;
9649}
9650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009651if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009652
Matthias Kloseb9621712010-04-24 17:59:49 +00009653$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009654
Matthias Kloseb159a552010-04-25 21:00:44 +00009655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009656$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009657else
Matthias Kloseb9621712010-04-24 17:59:49 +00009658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9659$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009660
9661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9664$as_echo_n "checking for fchdir... " >&6; }
9665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009666/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009667#include <unistd.h>
9668int
9669main ()
9670{
9671void *x=fchdir
9672 ;
9673 return 0;
9674}
9675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009676if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009677
Matthias Kloseb9621712010-04-24 17:59:49 +00009678$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009679
Matthias Kloseb159a552010-04-25 21:00:44 +00009680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009681$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009682else
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9684$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009685
9686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9689$as_echo_n "checking for fsync... " >&6; }
9690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009691/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009692#include <unistd.h>
9693int
9694main ()
9695{
9696void *x=fsync
9697 ;
9698 return 0;
9699}
9700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009701if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009702
Matthias Kloseb9621712010-04-24 17:59:49 +00009703$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009704
Matthias Kloseb159a552010-04-25 21:00:44 +00009705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009706$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009707else
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9709$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009710
9711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9714$as_echo_n "checking for fdatasync... " >&6; }
9715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009716/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009717#include <unistd.h>
9718int
9719main ()
9720{
9721void *x=fdatasync
9722 ;
9723 return 0;
9724}
9725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009726if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009727
Matthias Kloseb9621712010-04-24 17:59:49 +00009728$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009729
Matthias Kloseb159a552010-04-25 21:00:44 +00009730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009731$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009732else
Matthias Kloseb9621712010-04-24 17:59:49 +00009733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9734$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009735
9736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9739$as_echo_n "checking for epoll... " >&6; }
9740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009741/* end confdefs.h. */
9742#include <sys/epoll.h>
9743int
9744main ()
9745{
9746void *x=epoll_create
9747 ;
9748 return 0;
9749}
9750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009751if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009752
Matthias Kloseb9621712010-04-24 17:59:49 +00009753$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009754
Matthias Kloseb159a552010-04-25 21:00:44 +00009755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009756$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009757else
Matthias Kloseb9621712010-04-24 17:59:49 +00009758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9759$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009760
9761fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9764$as_echo_n "checking for kqueue... " >&6; }
9765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009766/* end confdefs.h. */
9767
9768#include <sys/types.h>
9769#include <sys/event.h>
9770
9771int
9772main ()
9773{
9774int x=kqueue()
9775 ;
9776 return 0;
9777}
9778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009779if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009780
Matthias Kloseb9621712010-04-24 17:59:49 +00009781$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009782
Matthias Kloseb159a552010-04-25 21:00:44 +00009783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009784$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009785else
Matthias Kloseb9621712010-04-24 17:59:49 +00009786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9787$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009788
9789fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009791# On some systems (eg. FreeBSD 5), we would find a definition of the
9792# functions ctermid_r, setgroups in the library, but no prototype
9793# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9794# address to avoid compiler warnings and potential miscompilations
9795# because of the missing prototypes.
9796
Matthias Kloseb9621712010-04-24 17:59:49 +00009797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9798$as_echo_n "checking for ctermid_r... " >&6; }
9799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009800/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009801
Martin v. Löwisd5843682002-11-21 20:41:28 +00009802#include <stdio.h>
9803
Martin v. Löwisd5843682002-11-21 20:41:28 +00009804int
9805main ()
9806{
9807void* p = ctermid_r
9808 ;
9809 return 0;
9810}
9811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009812if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009813
Matthias Kloseb9621712010-04-24 17:59:49 +00009814$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009815
Matthias Kloseb159a552010-04-25 21:00:44 +00009816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009817$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009818else
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9820$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009821
9822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9824
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9826$as_echo_n "checking for flock declaration... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009827if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009828 $as_echo_n "(cached) " >&6
9829else
9830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009831/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009832#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009833int
9834main ()
9835{
9836void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009837
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009838 ;
9839 return 0;
9840}
9841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009842if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009843 ac_cv_flock_decl=yes
9844else
9845 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009846
9847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009849
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009850fi
9851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9852$as_echo "$ac_cv_flock_decl" >&6; }
9853if test "x${ac_cv_flock_decl}" = xyes; then
9854 for ac_func in flock
9855do :
9856 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Gregory P. Smith69140482012-01-16 02:05:55 -08009857if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009858 cat >>confdefs.h <<_ACEOF
9859#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009860_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009861
Antoine Pitroua3000072010-09-07 14:52:42 +00009862else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009864$as_echo_n "checking for flock in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009865if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009866 $as_echo_n "(cached) " >&6
9867else
9868 ac_check_lib_save_LIBS=$LIBS
9869LIBS="-lbsd $LIBS"
9870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9871/* end confdefs.h. */
9872
9873/* Override any GCC internal prototype to avoid an error.
9874 Use char because int might match the return type of a GCC
9875 builtin and then its argument prototype would still apply. */
9876#ifdef __cplusplus
9877extern "C"
9878#endif
9879char flock ();
9880int
9881main ()
9882{
9883return flock ();
9884 ;
9885 return 0;
9886}
9887_ACEOF
9888if ac_fn_c_try_link "$LINENO"; then :
9889 ac_cv_lib_bsd_flock=yes
9890else
9891 ac_cv_lib_bsd_flock=no
9892fi
9893rm -f core conftest.err conftest.$ac_objext \
9894 conftest$ac_exeext conftest.$ac_ext
9895LIBS=$ac_check_lib_save_LIBS
9896fi
9897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9898$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009899if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009900 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009901
9902
9903$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9904
9905
9906fi
9907
9908
9909fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009910done
9911
Antoine Pitroua3000072010-09-07 14:52:42 +00009912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913
Matthias Kloseb9621712010-04-24 17:59:49 +00009914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9915$as_echo_n "checking for getpagesize... " >&6; }
9916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009917/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009918
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009919#include <unistd.h>
9920
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009921int
9922main ()
9923{
9924void* p = getpagesize
9925 ;
9926 return 0;
9927}
9928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009929if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009930
Matthias Kloseb9621712010-04-24 17:59:49 +00009931$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009932
Matthias Kloseb159a552010-04-25 21:00:44 +00009933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009934$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009935else
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9937$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009938
9939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009941
Charles-François Natali6613c182011-11-27 12:41:06 +01009942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9943$as_echo_n "checking for broken unsetenv... " >&6; }
9944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9945/* end confdefs.h. */
9946
9947#include <stdlib.h>
9948
9949int
9950main ()
9951{
9952int res = unsetenv("DUMMY")
9953 ;
9954 return 0;
9955}
9956_ACEOF
9957if ac_fn_c_try_compile "$LINENO"; then :
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9959$as_echo "no" >&6; }
9960else
9961
9962$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9963
9964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9965$as_echo "yes" >&6; }
9966
9967fi
9968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9969
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009970for ac_prog in true
9971do
9972 # Extract the first word of "$ac_prog", so it can be a program name with args.
9973set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9975$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009976if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009977 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009978else
9979 if test -n "$TRUE"; then
9980 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9981else
9982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9983for as_dir in $PATH
9984do
9985 IFS=$as_save_IFS
9986 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009987 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009988 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009989 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 $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 +00009991 break 2
9992 fi
9993done
Matthias Kloseb9621712010-04-24 17:59:49 +00009994 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009995IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009996
9997fi
9998fi
9999TRUE=$ac_cv_prog_TRUE
10000if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10002$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010003else
Matthias Kloseb9621712010-04-24 17:59:49 +000010004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10005$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010006fi
10007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010008
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010009 test -n "$TRUE" && break
10010done
10011test -n "$TRUE" || TRUE="/bin/true"
10012
10013
Matthias Kloseb9621712010-04-24 17:59:49 +000010014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10015$as_echo_n "checking for inet_aton in -lc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010016if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010017 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010018else
10019 ac_check_lib_save_LIBS=$LIBS
10020LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010022/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010024/* Override any GCC internal prototype to avoid an error.
10025 Use char because int might match the return type of a GCC
10026 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010027#ifdef __cplusplus
10028extern "C"
10029#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010030char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010031int
10032main ()
10033{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010034return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010035 ;
10036 return 0;
10037}
10038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010039if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010040 ac_cv_lib_c_inet_aton=yes
10041else
Matthias Kloseb9621712010-04-24 17:59:49 +000010042 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010044rm -f core conftest.err conftest.$ac_objext \
10045 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010046LIBS=$ac_check_lib_save_LIBS
10047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10049$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010050if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010051 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010052else
Matthias Kloseb9621712010-04-24 17:59:49 +000010053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10054$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010055if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010056 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010057else
10058 ac_check_lib_save_LIBS=$LIBS
10059LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010061/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063/* Override any GCC internal prototype to avoid an error.
10064 Use char because int might match the return type of a GCC
10065 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010066#ifdef __cplusplus
10067extern "C"
10068#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010069char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010070int
10071main ()
10072{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010073return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010074 ;
10075 return 0;
10076}
10077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010078if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010079 ac_cv_lib_resolv_inet_aton=yes
10080else
Matthias Kloseb9621712010-04-24 17:59:49 +000010081 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010083rm -f core conftest.err conftest.$ac_objext \
10084 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010085LIBS=$ac_check_lib_save_LIBS
10086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10088$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010089if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010090 cat >>confdefs.h <<_ACEOF
10091#define HAVE_LIBRESOLV 1
10092_ACEOF
10093
10094 LIBS="-lresolv $LIBS"
10095
10096fi
10097
10098
10099fi
10100
10101
Christian Heimesd0764e22007-12-04 15:00:33 +000010102# On Tru64, chflags seems to be present, but calling it will
10103# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10105$as_echo_n "checking for chflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010106if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010107 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010108else
Matthias Kloseb9621712010-04-24 17:59:49 +000010109 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010110 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010111else
Matthias Kloseb9621712010-04-24 17:59:49 +000010112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010113/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010114
Christian Heimesd0764e22007-12-04 15:00:33 +000010115#include <sys/stat.h>
10116#include <unistd.h>
10117int main(int argc, char*argv[])
10118{
10119 if(chflags(argv[0], 0) != 0)
10120 return 1;
10121 return 0;
10122}
Ned Deily3eb67d52011-06-28 00:00:28 -070010123
Christian Heimesd0764e22007-12-04 15:00:33 +000010124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010125if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010126 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010127else
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10131 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010132fi
10133
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010134
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10137$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010138if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010140if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010141 ac_cv_have_chflags="yes"
10142else
10143 ac_cv_have_chflags="no"
10144fi
10145
10146fi
10147if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010148
Matthias Kloseb9621712010-04-24 17:59:49 +000010149$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010150
10151fi
10152
Matthias Kloseb9621712010-04-24 17:59:49 +000010153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10154$as_echo_n "checking for lchflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010155if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010156 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010157else
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010159 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010160else
Matthias Kloseb9621712010-04-24 17:59:49 +000010161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010162/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010163
Christian Heimesd0764e22007-12-04 15:00:33 +000010164#include <sys/stat.h>
10165#include <unistd.h>
10166int main(int argc, char*argv[])
10167{
10168 if(lchflags(argv[0], 0) != 0)
10169 return 1;
10170 return 0;
10171}
Ned Deily3eb67d52011-06-28 00:00:28 -070010172
Christian Heimesd0764e22007-12-04 15:00:33 +000010173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010174if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010175 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010176else
Matthias Kloseb9621712010-04-24 17:59:49 +000010177 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10180 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010181fi
10182
10183
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10186$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010187if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010189if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010190 ac_cv_have_lchflags="yes"
10191else
10192 ac_cv_have_lchflags="no"
10193fi
10194
10195fi
10196if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010197
Matthias Kloseb9621712010-04-24 17:59:49 +000010198$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010199
10200fi
10201
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010202case $ac_sys_system/$ac_sys_release in
10203Darwin/*)
10204 _CUR_CFLAGS="${CFLAGS}"
10205 _CUR_LDFLAGS="${LDFLAGS}"
10206 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10207 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10208 ;;
10209esac
10210
Matthias Kloseb9621712010-04-24 17:59:49 +000010211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10212$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010213if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010215else
10216 ac_check_lib_save_LIBS=$LIBS
10217LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010219/* end confdefs.h. */
10220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010221/* Override any GCC internal prototype to avoid an error.
10222 Use char because int might match the return type of a GCC
10223 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010224#ifdef __cplusplus
10225extern "C"
10226#endif
10227char inflateCopy ();
10228int
10229main ()
10230{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010231return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010232 ;
10233 return 0;
10234}
10235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010236if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010237 ac_cv_lib_z_inflateCopy=yes
10238else
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010241rm -f core conftest.err conftest.$ac_objext \
10242 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010243LIBS=$ac_check_lib_save_LIBS
10244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10246$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010247if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010248
Matthias Kloseb9621712010-04-24 17:59:49 +000010249$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010250
10251fi
10252
10253
10254case $ac_sys_system/$ac_sys_release in
10255Darwin/*)
10256 CFLAGS="${_CUR_CFLAGS}"
10257 LDFLAGS="${_CUR_LDFLAGS}"
10258 ;;
10259esac
10260
Matthias Kloseb9621712010-04-24 17:59:49 +000010261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10262$as_echo_n "checking for hstrerror... " >&6; }
10263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010264/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010265
Martin v. Löwise9416172003-05-03 10:12:45 +000010266#include <netdb.h>
10267
Martin v. Löwise9416172003-05-03 10:12:45 +000010268int
10269main ()
10270{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010271void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010272 ;
10273 return 0;
10274}
10275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010276if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010277
Matthias Kloseb9621712010-04-24 17:59:49 +000010278$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010279
Matthias Kloseb159a552010-04-25 21:00:44 +000010280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010281$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010282else
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10284$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010285
10286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010287rm -f core conftest.err conftest.$ac_objext \
10288 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289
Matthias Kloseb9621712010-04-24 17:59:49 +000010290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10291$as_echo_n "checking for inet_aton... " >&6; }
10292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010293/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010294
Martin v. Löwis86d66262006-02-17 08:40:11 +000010295#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010296#include <sys/socket.h>
10297#include <netinet/in.h>
10298#include <arpa/inet.h>
10299
Martin v. Löwise9416172003-05-03 10:12:45 +000010300int
10301main ()
10302{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010303void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010304 ;
10305 return 0;
10306}
10307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010308if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010309
Matthias Kloseb9621712010-04-24 17:59:49 +000010310$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010311
Matthias Kloseb159a552010-04-25 21:00:44 +000010312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010313$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010314else
Matthias Kloseb9621712010-04-24 17:59:49 +000010315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10316$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010317
10318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010319rm -f core conftest.err conftest.$ac_objext \
10320 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010321
Matthias Kloseb9621712010-04-24 17:59:49 +000010322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10323$as_echo_n "checking for inet_pton... " >&6; }
10324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010325/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010326
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010327#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010328#include <sys/socket.h>
10329#include <netinet/in.h>
10330#include <arpa/inet.h>
10331
Martin v. Löwise9416172003-05-03 10:12:45 +000010332int
10333main ()
10334{
10335void* p = inet_pton
10336 ;
10337 return 0;
10338}
10339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010340if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010341
Matthias Kloseb9621712010-04-24 17:59:49 +000010342$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010343
Matthias Kloseb159a552010-04-25 21:00:44 +000010344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010345$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010346else
Matthias Kloseb9621712010-04-24 17:59:49 +000010347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10348$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010349
10350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010352
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010353# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10355$as_echo_n "checking for setgroups... " >&6; }
10356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010357/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010358
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010359#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010360#ifdef HAVE_GRP_H
10361#include <grp.h>
10362#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010363
Martin v. Löwisd5843682002-11-21 20:41:28 +000010364int
10365main ()
10366{
10367void* p = setgroups
10368 ;
10369 return 0;
10370}
10371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010372if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010373
Matthias Kloseb9621712010-04-24 17:59:49 +000010374$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010375
Matthias Kloseb159a552010-04-25 21:00:44 +000010376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010377$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010378else
Matthias Kloseb9621712010-04-24 17:59:49 +000010379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10380$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010381
10382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010384
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010385# check for openpty and forkpty
10386
10387for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010388do :
10389 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010390if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010391 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010392#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010393_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010394
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010395else
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10397$as_echo_n "checking for openpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010398if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010399 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010400else
Martin v. Löwis11437992002-04-12 09:54:03 +000010401 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010402LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010406/* Override any GCC internal prototype to avoid an error.
10407 Use char because int might match the return type of a GCC
10408 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010409#ifdef __cplusplus
10410extern "C"
10411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010412char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010413int
10414main ()
10415{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010416return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 ;
10418 return 0;
10419}
10420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010421if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010422 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010423else
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010426rm -f core conftest.err conftest.$ac_objext \
10427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010428LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10431$as_echo "$ac_cv_lib_util_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010432if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010434 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010435else
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10437$as_echo_n "checking for openpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010438if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010439 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010440else
10441 ac_check_lib_save_LIBS=$LIBS
10442LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010444/* end confdefs.h. */
10445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010446/* Override any GCC internal prototype to avoid an error.
10447 Use char because int might match the return type of a GCC
10448 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010449#ifdef __cplusplus
10450extern "C"
10451#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010452char openpty ();
10453int
10454main ()
10455{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010456return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010457 ;
10458 return 0;
10459}
10460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010461if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010462 ac_cv_lib_bsd_openpty=yes
10463else
Matthias Kloseb9621712010-04-24 17:59:49 +000010464 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010466rm -f core conftest.err conftest.$ac_objext \
10467 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010468LIBS=$ac_check_lib_save_LIBS
10469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10471$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010472if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010473 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010474 LIBS="$LIBS -lbsd"
10475fi
10476
10477
10478fi
10479
Fred Drake8cef4cf2000-06-28 16:40:38 +000010480
10481fi
10482done
10483
10484for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010485do :
10486 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010487if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010489#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010490_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010491
Fred Drake8cef4cf2000-06-28 16:40:38 +000010492else
Matthias Kloseb9621712010-04-24 17:59:49 +000010493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10494$as_echo_n "checking for forkpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010495if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010496 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010497else
Martin v. Löwis11437992002-04-12 09:54:03 +000010498 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010499LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010503/* Override any GCC internal prototype to avoid an error.
10504 Use char because int might match the return type of a GCC
10505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010506#ifdef __cplusplus
10507extern "C"
10508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010509char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010510int
10511main ()
10512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010513return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010514 ;
10515 return 0;
10516}
10517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010519 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010520else
Matthias Kloseb9621712010-04-24 17:59:49 +000010521 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010523rm -f core conftest.err conftest.$ac_objext \
10524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010525LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10528$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010529if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010530 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010531 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010532else
Matthias Kloseb9621712010-04-24 17:59:49 +000010533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10534$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010535if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010536 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010537else
10538 ac_check_lib_save_LIBS=$LIBS
10539LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010541/* end confdefs.h. */
10542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010543/* Override any GCC internal prototype to avoid an error.
10544 Use char because int might match the return type of a GCC
10545 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010546#ifdef __cplusplus
10547extern "C"
10548#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010549char forkpty ();
10550int
10551main ()
10552{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010553return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010554 ;
10555 return 0;
10556}
10557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010558if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010559 ac_cv_lib_bsd_forkpty=yes
10560else
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010563rm -f core conftest.err conftest.$ac_objext \
10564 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010565LIBS=$ac_check_lib_save_LIBS
10566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10568$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010569if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010570 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010571 LIBS="$LIBS -lbsd"
10572fi
10573
10574
10575fi
10576
Fred Drake8cef4cf2000-06-28 16:40:38 +000010577
10578fi
10579done
10580
Jack Jansendd19cf82001-12-06 22:36:17 +000010581
Christian Heimesb186d002008-03-18 15:15:01 +000010582# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010583for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010584do :
10585 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Gregory P. Smith69140482012-01-16 02:05:55 -080010586if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010587 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010588#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010589_ACEOF
10590
10591fi
10592done
10593
10594
Michael W. Hudson54241132001-12-07 15:38:26 +000010595# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010596for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010597do :
10598 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10599ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010600if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010601 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010602#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010603_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010604
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010605fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010606done
10607
Michael W. Hudson54241132001-12-07 15:38:26 +000010608
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010609ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Gregory P. Smith69140482012-01-16 02:05:55 -080010610if test "x$ac_cv_func_dup2" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010611 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010612
Martin v. Löwis1142de32002-03-29 16:28:31 +000010613else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010614 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010615 *" dup2.$ac_objext "* ) ;;
10616 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010617 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010618esac
10619
Martin v. Löwis1142de32002-03-29 16:28:31 +000010620fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010621
10622ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Gregory P. Smith69140482012-01-16 02:05:55 -080010623if test "x$ac_cv_func_getcwd" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010624 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10625
10626else
10627 case " $LIBOBJS " in
10628 *" getcwd.$ac_objext "* ) ;;
10629 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10630 ;;
10631esac
10632
10633fi
10634
10635ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Gregory P. Smith69140482012-01-16 02:05:55 -080010636if test "x$ac_cv_func_strdup" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010637 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10638
10639else
10640 case " $LIBOBJS " in
10641 *" strdup.$ac_objext "* ) ;;
10642 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10643 ;;
10644esac
10645
10646fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010647
10648
10649for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010650do :
10651 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010652if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010653 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010654#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010657/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010658#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010659int
10660main ()
10661{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010662getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010663 ;
10664 return 0;
10665}
10666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010667if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010668
Matthias Kloseb9621712010-04-24 17:59:49 +000010669$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010670
Guido van Rossum627b2d71993-12-24 10:39:16 +000010671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010673
Guido van Rossum627b2d71993-12-24 10:39:16 +000010674fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010675done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010676
Jack Jansen150753c2003-03-29 22:07:47 +000010677for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010678do :
10679 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010680if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010681 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010682#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010685/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010686#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010687int
10688main ()
10689{
10690setpgrp(0,0);
10691 ;
10692 return 0;
10693}
10694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010695if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010698
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010701
10702fi
10703done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010704
Thomas Wouters3a584202000-08-05 23:28:51 +000010705for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010706do :
10707 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Gregory P. Smith69140482012-01-16 02:05:55 -080010708if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010710#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010713/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010714#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010715int
10716main ()
10717{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010718gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010719 ;
10720 return 0;
10721}
10722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010723if ac_fn_c_try_compile "$LINENO"; then :
10724
Guido van Rossum627b2d71993-12-24 10:39:16 +000010725else
Skip Montanaro6dead952003-09-25 14:50:04 +000010726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010728
Martin v. Löwis11437992002-04-12 09:54:03 +000010729
Guido van Rossum627b2d71993-12-24 10:39:16 +000010730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010732
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010733fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010734done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010735
Michael W. Hudson54241132001-12-07 15:38:26 +000010736
Matthias Kloseb9621712010-04-24 17:59:49 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10738$as_echo_n "checking for major... " >&6; }
10739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010740/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010741
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010742#if defined(MAJOR_IN_MKDEV)
10743#include <sys/mkdev.h>
10744#elif defined(MAJOR_IN_SYSMACROS)
10745#include <sys/sysmacros.h>
10746#else
10747#include <sys/types.h>
10748#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010749
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010750int
10751main ()
10752{
10753
10754 makedev(major(0),minor(0));
10755
10756 ;
10757 return 0;
10758}
10759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010760if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010761
10762
Matthias Kloseb9621712010-04-24 17:59:49 +000010763$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010764
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10766$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010767
10768else
Skip Montanaro6dead952003-09-25 14:50:04 +000010769
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10771$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010772
10773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010774rm -f core conftest.err conftest.$ac_objext \
10775 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010776
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010777# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010778# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10780$as_echo_n "checking for getaddrinfo... " >&6; }
10781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010782/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010783
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010784#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010785#include <sys/socket.h>
10786#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010787#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010788
Martin v. Löwis11437992002-04-12 09:54:03 +000010789int
10790main ()
10791{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010792getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010793 ;
10794 return 0;
10795}
10796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010797if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010798 have_getaddrinfo=yes
10799else
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010802rm -f core conftest.err conftest.$ac_objext \
10803 conftest$ac_exeext conftest.$ac_ext
10804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10805$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010806if test $have_getaddrinfo = yes
10807then
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10809$as_echo_n "checking getaddrinfo bug... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010810 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010812else
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010814 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010815else
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010817/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010818
10819#include <sys/types.h>
10820#include <netdb.h>
10821#include <string.h>
10822#include <sys/socket.h>
10823#include <netinet/in.h>
10824
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010825int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010826{
10827 int passive, gaierr, inet4 = 0, inet6 = 0;
10828 struct addrinfo hints, *ai, *aitop;
10829 char straddr[INET6_ADDRSTRLEN], strport[16];
10830
10831 for (passive = 0; passive <= 1; passive++) {
10832 memset(&hints, 0, sizeof(hints));
10833 hints.ai_family = AF_UNSPEC;
10834 hints.ai_flags = passive ? AI_PASSIVE : 0;
10835 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010836 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010837 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10838 (void)gai_strerror(gaierr);
10839 goto bad;
10840 }
10841 for (ai = aitop; ai; ai = ai->ai_next) {
10842 if (ai->ai_addr == NULL ||
10843 ai->ai_addrlen == 0 ||
10844 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10845 straddr, sizeof(straddr), strport, sizeof(strport),
10846 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10847 goto bad;
10848 }
10849 switch (ai->ai_family) {
10850 case AF_INET:
10851 if (strcmp(strport, "54321") != 0) {
10852 goto bad;
10853 }
10854 if (passive) {
10855 if (strcmp(straddr, "0.0.0.0") != 0) {
10856 goto bad;
10857 }
10858 } else {
10859 if (strcmp(straddr, "127.0.0.1") != 0) {
10860 goto bad;
10861 }
10862 }
10863 inet4++;
10864 break;
10865 case AF_INET6:
10866 if (strcmp(strport, "54321") != 0) {
10867 goto bad;
10868 }
10869 if (passive) {
10870 if (strcmp(straddr, "::") != 0) {
10871 goto bad;
10872 }
10873 } else {
10874 if (strcmp(straddr, "::1") != 0) {
10875 goto bad;
10876 }
10877 }
10878 inet6++;
10879 break;
10880 case AF_UNSPEC:
10881 goto bad;
10882 break;
10883 default:
10884 /* another family support? */
10885 break;
10886 }
10887 }
10888 }
10889
10890 if (!(inet4 == 0 || inet4 == 2))
10891 goto bad;
10892 if (!(inet6 == 0 || inet6 == 2))
10893 goto bad;
10894
10895 if (aitop)
10896 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010897 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010898
10899 bad:
10900 if (aitop)
10901 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010902 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010903}
10904
Martin v. Löwis11437992002-04-12 09:54:03 +000010905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010906if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010907 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010908else
Matthias Kloseb9621712010-04-24 17:59:49 +000010909 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10912 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010914
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010915fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010916
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010918
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10920$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10921
Mark Dickinson2df5d282009-12-31 21:22:50 +000010922if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010923then
10924 if test $ipv6 = yes
10925 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010926 echo 'Fatal: You must get working getaddrinfo() function.'
10927 echo ' or you can specify "--disable-ipv6"'.
10928 exit 1
10929 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010930else
Martin v. Löwis11437992002-04-12 09:54:03 +000010931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010933
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010934fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010935
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010936for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010937do :
10938 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Gregory P. Smith69140482012-01-16 02:05:55 -080010939if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010940 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010941#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010942_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010943
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010944fi
10945done
10946
Michael W. Hudson54241132001-12-07 15:38:26 +000010947
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010948# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10950$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010951if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010953else
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010955/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010956#include <sys/types.h>
10957#include <sys/time.h>
10958#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010959
Martin v. Löwis11437992002-04-12 09:54:03 +000010960int
10961main ()
10962{
10963if ((struct tm *) 0)
10964return 0;
10965 ;
10966 return 0;
10967}
10968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010969if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010970 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010971else
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10977$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010978if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010979
Matthias Kloseb9621712010-04-24 17:59:49 +000010980$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010981
10982fi
10983
Matthias Kloseb9621712010-04-24 17:59:49 +000010984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10985$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010986if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010988else
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010990/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010991#include <sys/types.h>
10992#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010993
Martin v. Löwis11437992002-04-12 09:54:03 +000010994int
10995main ()
10996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010997struct tm tm;
10998 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011000 ;
11001 return 0;
11002}
11003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011004if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011005 ac_cv_struct_tm=time.h
11006else
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11012$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011013if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011016
11017fi
11018
Matthias Kloseb9621712010-04-24 17:59:49 +000011019ac_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 +000011020#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011021
Matthias Kloseb9621712010-04-24 17:59:49 +000011022"
Gregory P. Smith69140482012-01-16 02:05:55 -080011023if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011024
11025cat >>confdefs.h <<_ACEOF
11026#define HAVE_STRUCT_TM_TM_ZONE 1
11027_ACEOF
11028
11029
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011030fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011031
Martin v. Löwis11437992002-04-12 09:54:03 +000011032if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11033
Matthias Kloseb9621712010-04-24 17:59:49 +000011034$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011035
11036else
Matthias Kloseb9621712010-04-24 17:59:49 +000011037 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11038"
Gregory P. Smith69140482012-01-16 02:05:55 -080011039if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011040 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011041else
Matthias Kloseb9621712010-04-24 17:59:49 +000011042 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043fi
11044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011046#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011047_ACEOF
11048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11050$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011051if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011052 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011053else
Matthias Kloseb9621712010-04-24 17:59:49 +000011054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011055/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011056#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011057#if !HAVE_DECL_TZNAME
11058extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011060
Martin v. Löwis11437992002-04-12 09:54:03 +000011061int
11062main ()
11063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011064return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011065 ;
11066 return 0;
11067}
11068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011069if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011070 ac_cv_var_tzname=yes
11071else
Matthias Kloseb9621712010-04-24 17:59:49 +000011072 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011074rm -f core conftest.err conftest.$ac_objext \
11075 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11078$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011079 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011080
Matthias Kloseb9621712010-04-24 17:59:49 +000011081$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011082
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011083 fi
11084fi
11085
Matthias Kloseb9621712010-04-24 17:59:49 +000011086ac_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 -080011087if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011088
11089cat >>confdefs.h <<_ACEOF
11090#define HAVE_STRUCT_STAT_ST_RDEV 1
11091_ACEOF
11092
11093
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011094fi
11095
Matthias Kloseb9621712010-04-24 17:59:49 +000011096ac_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 -080011097if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011098
Martin v. Löwis11437992002-04-12 09:54:03 +000011099cat >>confdefs.h <<_ACEOF
11100#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11101_ACEOF
11102
11103
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011104fi
11105
Matthias Kloseb9621712010-04-24 17:59:49 +000011106ac_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 -080011107if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011108
11109cat >>confdefs.h <<_ACEOF
11110#define HAVE_STRUCT_STAT_ST_FLAGS 1
11111_ACEOF
11112
11113
11114fi
11115
Matthias Kloseb9621712010-04-24 17:59:49 +000011116ac_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 -080011117if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011118
11119cat >>confdefs.h <<_ACEOF
11120#define HAVE_STRUCT_STAT_ST_GEN 1
11121_ACEOF
11122
11123
11124fi
11125
Matthias Kloseb9621712010-04-24 17:59:49 +000011126ac_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 -080011127if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011128
11129cat >>confdefs.h <<_ACEOF
11130#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11131_ACEOF
11132
11133
11134fi
11135
Matthias Kloseb9621712010-04-24 17:59:49 +000011136ac_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 -080011137if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011138
Martin v. Löwis11437992002-04-12 09:54:03 +000011139cat >>confdefs.h <<_ACEOF
11140#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11141_ACEOF
11142
11143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011145
11146else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011147 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011148 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011149 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11150 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011151esac
11152
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011153fi
11154
Michael W. Hudson54241132001-12-07 15:38:26 +000011155
Martin v. Löwis11437992002-04-12 09:54:03 +000011156
Matthias Kloseb9621712010-04-24 17:59:49 +000011157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11158$as_echo_n "checking for time.h that defines altzone... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011159if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161else
Matthias Kloseb159a552010-04-25 21:00:44 +000011162
Matthias Kloseb9621712010-04-24 17:59:49 +000011163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011164/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011165#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011166int
11167main ()
11168{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011169return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011170 ;
11171 return 0;
11172}
11173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011174if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011175 ac_cv_header_time_altzone=yes
11176else
Matthias Kloseb9621712010-04-24 17:59:49 +000011177 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011181fi
11182
Matthias Kloseb9621712010-04-24 17:59:49 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11184$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011185if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011186
Matthias Kloseb9621712010-04-24 17:59:49 +000011187$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011188
11189fi
11190
Guido van Rossumda88dad1995-01-26 00:46:29 +000011191was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11193$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011195/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011196
11197#include <sys/types.h>
11198#include <sys/select.h>
11199#include <sys/time.h>
11200
Martin v. Löwis11437992002-04-12 09:54:03 +000011201int
11202main ()
11203{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011204;
Martin v. Löwis11437992002-04-12 09:54:03 +000011205 ;
11206 return 0;
11207}
11208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011209if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011210
11211
Matthias Kloseb9621712010-04-24 17:59:49 +000011212$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011213
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011214 was_it_defined=yes
11215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11219$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11222$as_echo_n "checking for addrinfo... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011223if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011224 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011225else
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011227/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011228#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011229int
11230main ()
11231{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011232struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 ;
11234 return 0;
11235}
11236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011237if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011238 ac_cv_struct_addrinfo=yes
11239else
Matthias Kloseb9621712010-04-24 17:59:49 +000011240 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11243fi
11244
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11246$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011247if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011248
Matthias Kloseb9621712010-04-24 17:59:49 +000011249$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011250
11251fi
11252
Matthias Kloseb9621712010-04-24 17:59:49 +000011253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11254$as_echo_n "checking for sockaddr_storage... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011255if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011256 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011257else
Matthias Kloseb9621712010-04-24 17:59:49 +000011258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011259/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011260
11261# include <sys/types.h>
11262# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011263int
11264main ()
11265{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011266struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 ;
11268 return 0;
11269}
11270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011272 ac_cv_struct_sockaddr_storage=yes
11273else
Matthias Kloseb9621712010-04-24 17:59:49 +000011274 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11277fi
11278
Matthias Kloseb9621712010-04-24 17:59:49 +000011279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11280$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011281if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011282
Matthias Kloseb9621712010-04-24 17:59:49 +000011283$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011284
11285fi
11286
Guido van Rossum627b2d71993-12-24 10:39:16 +000011287# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011288
Matthias Kloseb9621712010-04-24 17:59:49 +000011289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11290$as_echo_n "checking whether char is unsigned... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011291if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011293else
Matthias Kloseb9621712010-04-24 17:59:49 +000011294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011296$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011297int
11298main ()
11299{
11300static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011301test_array [0] = 0;
11302return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011303
11304 ;
11305 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011306}
Martin v. Löwis11437992002-04-12 09:54:03 +000011307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011308if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011309 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011310else
Matthias Kloseb9621712010-04-24 17:59:49 +000011311 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11316$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011317if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011318 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011319
11320fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011321
Matthias Kloseb9621712010-04-24 17:59:49 +000011322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11323$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011324if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011325 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011326else
Matthias Kloseb9621712010-04-24 17:59:49 +000011327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011328/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011329
Martin v. Löwis11437992002-04-12 09:54:03 +000011330int
11331main ()
11332{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011333
Martin v. Löwis11437992002-04-12 09:54:03 +000011334#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011335 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011336 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011337 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011338 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339 char const *const *pcpcc;
11340 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011341 /* NEC SVR4.0.2 mips cc rejects this. */
11342 struct point {int x, y;};
11343 static struct point const zero = {0,0};
11344 /* AIX XL C 1.02.0.0 rejects this.
11345 It does not let you subtract one const X* pointer from another in
11346 an arm of an if-expression whose if-part is not a constant
11347 expression */
11348 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011349 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351 ++pcpcc;
11352 ppc = (char**) pcpcc;
11353 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011354 { /* SCO 3.2v4 cc rejects this sort of thing. */
11355 char tx;
11356 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011358
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011360 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 }
11362 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11363 int x[] = {25, 17};
11364 const int *foo = &x[0];
11365 ++foo;
11366 }
11367 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11368 typedef const int *iptr;
11369 iptr p = 0;
11370 ++p;
11371 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011372 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011374 struct s { int j; const int *ap[3]; } bx;
11375 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 }
11377 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11378 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011381 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011382#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011383
Martin v. Löwis11437992002-04-12 09:54:03 +000011384 ;
11385 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011386}
Martin v. Löwis11437992002-04-12 09:54:03 +000011387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011388if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011389 ac_cv_c_const=yes
11390else
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11396$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011397if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011398
Matthias Kloseb9621712010-04-24 17:59:49 +000011399$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011400
11401fi
11402
Michael W. Hudson54241132001-12-07 15:38:26 +000011403
Guido van Rossumda88dad1995-01-26 00:46:29 +000011404works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11406$as_echo_n "checking for working volatile... " >&6; }
11407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011408/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011409
Martin v. Löwis11437992002-04-12 09:54:03 +000011410int
11411main ()
11412{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011413volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011414 ;
11415 return 0;
11416}
11417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011418if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011419 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011420else
Skip Montanaro6dead952003-09-25 14:50:04 +000011421
Matthias Kloseb9621712010-04-24 17:59:49 +000011422$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011423
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011424
Guido van Rossum627b2d71993-12-24 10:39:16 +000011425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11428$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011429
Guido van Rossumda88dad1995-01-26 00:46:29 +000011430works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11432$as_echo_n "checking for working signed char... " >&6; }
11433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011434/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011435
Martin v. Löwis11437992002-04-12 09:54:03 +000011436int
11437main ()
11438{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011439signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011440 ;
11441 return 0;
11442}
11443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011444if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011445 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011446else
Skip Montanaro6dead952003-09-25 14:50:04 +000011447
Matthias Kloseb9621712010-04-24 17:59:49 +000011448$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011449
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011450
Guido van Rossum7f43da71994-08-01 12:15:30 +000011451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11454$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011455
Guido van Rossumda88dad1995-01-26 00:46:29 +000011456have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11458$as_echo_n "checking for prototypes... " >&6; }
11459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011460/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011461int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011462int
11463main ()
11464{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011465return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 ;
11467 return 0;
11468}
11469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011471
Matthias Kloseb9621712010-04-24 17:59:49 +000011472$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011473
Matthias Kloseb159a552010-04-25 21:00:44 +000011474 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11478$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011479
Guido van Rossumda88dad1995-01-26 00:46:29 +000011480works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11482$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011484/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011485
11486#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011487int foo(int x, ...) {
11488 va_list va;
11489 va_start(va, x);
11490 va_arg(va, int);
11491 va_arg(va, char *);
11492 va_arg(va, double);
11493 return 0;
11494}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011495
Martin v. Löwis11437992002-04-12 09:54:03 +000011496int
11497main ()
11498{
Guido van Rossum90eea071996-08-30 20:58:57 +000011499return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 ;
11501 return 0;
11502}
11503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011504if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011505
11506
Matthias Kloseb9621712010-04-24 17:59:49 +000011507$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011508
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011509 works=yes
11510
Guido van Rossum627b2d71993-12-24 10:39:16 +000011511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11514$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011515
Martin v. Löwisd6320502004-08-12 13:45:08 +000011516# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11518$as_echo_n "checking for socketpair... " >&6; }
11519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011520/* end confdefs.h. */
11521
11522#include <sys/types.h>
11523#include <sys/socket.h>
11524
11525int
11526main ()
11527{
11528void *x=socketpair
11529 ;
11530 return 0;
11531}
11532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011533if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011534
Matthias Kloseb9621712010-04-24 17:59:49 +000011535$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011536
Matthias Kloseb159a552010-04-25 21:00:44 +000011537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011538$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011539else
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11541$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011542
11543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011545
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011546# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11548$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011550/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011551#include <sys/types.h>
11552#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011553int
11554main ()
11555{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011556struct sockaddr x;
11557x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011558 ;
11559 return 0;
11560}
11561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011562if ac_fn_c_try_compile "$LINENO"; then :
11563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11564$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011565
Matthias Kloseb9621712010-04-24 17:59:49 +000011566$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011567
11568else
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11570$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011571
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011574
Guido van Rossumda88dad1995-01-26 00:46:29 +000011575va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11577$as_echo_n "checking whether va_list is an array... " >&6; }
11578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011579/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011580
11581#ifdef HAVE_STDARG_PROTOTYPES
11582#include <stdarg.h>
11583#else
11584#include <varargs.h>
11585#endif
11586
Martin v. Löwis11437992002-04-12 09:54:03 +000011587int
11588main ()
11589{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011590va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011591 ;
11592 return 0;
11593}
11594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011595if ac_fn_c_try_compile "$LINENO"; then :
11596
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011597else
Skip Montanaro6dead952003-09-25 14:50:04 +000011598
Martin v. Löwis11437992002-04-12 09:54:03 +000011599
Matthias Kloseb9621712010-04-24 17:59:49 +000011600$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011601
Guido van Rossumda88dad1995-01-26 00:46:29 +000011602 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011603
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11607$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011608
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011609# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011610
11611
Matthias Kloseb9621712010-04-24 17:59:49 +000011612ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Gregory P. Smith69140482012-01-16 02:05:55 -080011613if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011614
Matthias Kloseb9621712010-04-24 17:59:49 +000011615 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011616
Matthias Kloseb9621712010-04-24 17:59:49 +000011617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11618$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011619 OLD_CFLAGS=$CFLAGS
11620 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011622/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011623
11624# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011625
Martin v. Löwis11437992002-04-12 09:54:03 +000011626int
11627main ()
11628{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011629
11630 char *name;
11631 struct hostent *he, *res;
11632 char buffer[2048];
11633 int buflen = 2048;
11634 int h_errnop;
11635
11636 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011637
11638 ;
11639 return 0;
11640}
11641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011642if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011643
Matthias Kloseb9621712010-04-24 17:59:49 +000011644 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011645
Martin v. Löwis11437992002-04-12 09:54:03 +000011646
Matthias Kloseb9621712010-04-24 17:59:49 +000011647$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011648
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11650$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011651
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011652else
Skip Montanaro6dead952003-09-25 14:50:04 +000011653
Matthias Kloseb9621712010-04-24 17:59:49 +000011654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11655$as_echo "no" >&6; }
11656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11657$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011659/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011660
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011661# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011662
Martin v. Löwis11437992002-04-12 09:54:03 +000011663int
11664main ()
11665{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011666
11667 char *name;
11668 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011669 char buffer[2048];
11670 int buflen = 2048;
11671 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011672
Matthias Kloseb159a552010-04-25 21:00:44 +000011673 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011674
11675 ;
11676 return 0;
11677}
11678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011679if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011680
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011682
Martin v. Löwis11437992002-04-12 09:54:03 +000011683
Matthias Kloseb159a552010-04-25 21:00:44 +000011684$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011685
Matthias Kloseb9621712010-04-24 17:59:49 +000011686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11687$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011688
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011689else
Skip Montanaro6dead952003-09-25 14:50:04 +000011690
Matthias Kloseb9621712010-04-24 17:59:49 +000011691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11692$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11694$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11696/* end confdefs.h. */
11697
11698# include <netdb.h>
11699
11700int
11701main ()
11702{
11703
11704 char *name;
11705 struct hostent *he;
11706 struct hostent_data data;
11707
11708 (void) gethostbyname_r(name, he, &data);
11709
11710 ;
11711 return 0;
11712}
11713_ACEOF
11714if ac_fn_c_try_compile "$LINENO"; then :
11715
11716 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11717
11718
11719$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11720
11721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11722$as_echo "yes" >&6; }
11723
11724else
11725
11726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11727$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011728
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011731
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011734
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011737 CFLAGS=$OLD_CFLAGS
11738
11739else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011740
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 for ac_func in gethostbyname
11742do :
11743 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Gregory P. Smith69140482012-01-16 02:05:55 -080011744if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011745 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011746#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011747_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011748
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011749fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011750done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011751
Michael W. Hudson54241132001-12-07 15:38:26 +000011752
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011753fi
11754
Michael W. Hudson54241132001-12-07 15:38:26 +000011755
11756
11757
11758
11759
11760
Guido van Rossum627b2d71993-12-24 10:39:16 +000011761# checks for system services
11762# (none yet)
11763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011764# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011765ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Gregory P. Smith69140482012-01-16 02:05:55 -080011766if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011767
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011768else
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11770$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011771if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011773else
Martin v. Löwis11437992002-04-12 09:54:03 +000011774 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011775LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011779/* Override any GCC internal prototype to avoid an error.
11780 Use char because int might match the return type of a GCC
11781 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011782#ifdef __cplusplus
11783extern "C"
11784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011785char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011786int
11787main ()
11788{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011789return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011790 ;
11791 return 0;
11792}
11793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011794if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011795 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011796else
Matthias Kloseb9621712010-04-24 17:59:49 +000011797 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011799rm -f core conftest.err conftest.$ac_objext \
11800 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011801LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11804$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011805if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011806 cat >>confdefs.h <<_ACEOF
11807#define HAVE_LIBIEEE 1
11808_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011809
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011810 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011811
Guido van Rossum627b2d71993-12-24 10:39:16 +000011812fi
11813
Michael W. Hudson54241132001-12-07 15:38:26 +000011814
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011815fi
11816
Michael W. Hudson54241132001-12-07 15:38:26 +000011817
Guido van Rossum7f253911997-05-09 02:42:48 +000011818# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11820$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011821
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011822# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011823if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011824 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011825if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011826then
11827
Matthias Kloseb9621712010-04-24 17:59:49 +000011828$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011829
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11831$as_echo "yes" >&6; }
11832else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11833$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011834fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011835else
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11837$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011838fi
11839
Guido van Rossum7f253911997-05-09 02:42:48 +000011840
Guido van Rossum7f43da71994-08-01 12:15:30 +000011841# check for --with-libm=...
11842
Guido van Rossum563e7081996-09-10 18:20:48 +000011843case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011844Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011845*) LIBM=-lm
11846esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11848$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011850# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011851if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011852 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011853if test "$withval" = no
11854then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11856$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011857elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011858then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11860$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011861else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011862fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011863else
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11865$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011866fi
11867
Guido van Rossum7f43da71994-08-01 12:15:30 +000011868
11869# check for --with-libc=...
11870
Matthias Kloseb9621712010-04-24 17:59:49 +000011871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11872$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011874# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011875if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011876 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011877if test "$withval" = no
11878then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11880$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011881elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011882then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11884$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011885else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011886fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011887else
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11889$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011890fi
11891
Guido van Rossum7f43da71994-08-01 12:15:30 +000011892
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011893# **************************************************
11894# * Check for various properties of floating point *
11895# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11898$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011899if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011901else
11902
Matthias Kloseb9621712010-04-24 17:59:49 +000011903if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011904 ac_cv_little_endian_double=no
11905else
Matthias Kloseb9621712010-04-24 17:59:49 +000011906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011907/* end confdefs.h. */
11908
11909#include <string.h>
11910int main() {
11911 double x = 9006104071832581.0;
11912 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11913 return 0;
11914 else
11915 return 1;
11916}
11917
11918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011919if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011920 ac_cv_little_endian_double=yes
11921else
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11925 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011926fi
11927
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011928fi
11929
Matthias Kloseb9621712010-04-24 17:59:49 +000011930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11931$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011932if test "$ac_cv_little_endian_double" = yes
11933then
11934
Matthias Kloseb9621712010-04-24 17:59:49 +000011935$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011936
11937fi
11938
Matthias Kloseb9621712010-04-24 17:59:49 +000011939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11940$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011941if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011942 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011943else
11944
Matthias Kloseb9621712010-04-24 17:59:49 +000011945if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011946 ac_cv_big_endian_double=no
11947else
Matthias Kloseb9621712010-04-24 17:59:49 +000011948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011949/* end confdefs.h. */
11950
11951#include <string.h>
11952int main() {
11953 double x = 9006104071832581.0;
11954 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11955 return 0;
11956 else
11957 return 1;
11958}
11959
11960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011961if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011962 ac_cv_big_endian_double=yes
11963else
Matthias Kloseb9621712010-04-24 17:59:49 +000011964 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11967 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011968fi
11969
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011970fi
11971
Matthias Kloseb9621712010-04-24 17:59:49 +000011972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11973$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011974if test "$ac_cv_big_endian_double" = yes
11975then
11976
Matthias Kloseb9621712010-04-24 17:59:49 +000011977$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011978
11979fi
11980
11981# Some ARM platforms use a mixed-endian representation for doubles.
11982# While Python doesn't currently have full support for these platforms
11983# (see e.g., issue 1762561), we can at least make sure that float <-> string
11984# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11986$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011987if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011988 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011989else
11990
Matthias Kloseb9621712010-04-24 17:59:49 +000011991if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011992 ac_cv_mixed_endian_double=no
11993else
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011995/* end confdefs.h. */
11996
11997#include <string.h>
11998int main() {
11999 double x = 9006104071832581.0;
12000 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12001 return 0;
12002 else
12003 return 1;
12004}
12005
12006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012007if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012008 ac_cv_mixed_endian_double=yes
12009else
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012011fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012012rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12013 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012014fi
12015
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012016fi
12017
Matthias Kloseb9621712010-04-24 17:59:49 +000012018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12019$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012020if test "$ac_cv_mixed_endian_double" = yes
12021then
12022
Matthias Kloseb9621712010-04-24 17:59:49 +000012023$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012024
12025fi
12026
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012027# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012028# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012029# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012030# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012031# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012032# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012033
12034# This inline assembler syntax may also work for suncc and icc,
12035# so we try it on all platforms.
12036
Matthias Kloseb9621712010-04-24 17:59:49 +000012037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12038$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012040/* end confdefs.h. */
12041
12042int
12043main ()
12044{
12045
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012046 unsigned short cw;
12047 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12048 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012049
12050 ;
12051 return 0;
12052}
12053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012054if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012055 have_gcc_asm_for_x87=yes
12056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012058fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12061$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012062if test "$have_gcc_asm_for_x87" = yes
12063then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012064
Matthias Kloseb9621712010-04-24 17:59:49 +000012065$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012066
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012068
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012069# Detect whether system arithmetic is subject to x87-style double
12070# rounding issues. The result of this test has little meaning on non
12071# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12072# mode is round-to-nearest and double rounding issues are present, and
12073# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12075$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012076# $BASECFLAGS may affect the result
12077ac_save_cc="$CC"
12078CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012079if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012080 ac_cv_x87_double_rounding=no
12081else
Matthias Kloseb9621712010-04-24 17:59:49 +000012082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012083/* end confdefs.h. */
12084
12085#include <stdlib.h>
12086#include <math.h>
12087int main() {
12088 volatile double x, y, z;
12089 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12090 x = 0.99999999999999989; /* 1-2**-53 */
12091 y = 1./x;
12092 if (y != 1.)
12093 exit(0);
12094 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12095 x = 1e16;
12096 y = 2.99999;
12097 z = x + y;
12098 if (z != 1e16+4.)
12099 exit(0);
12100 /* both tests show evidence of double rounding */
12101 exit(1);
12102}
12103
12104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012105if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012106 ac_cv_x87_double_rounding=no
12107else
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12111 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012112fi
12113
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012114CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12116$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012117if test "$ac_cv_x87_double_rounding" = yes
12118then
12119
Matthias Kloseb9621712010-04-24 17:59:49 +000012120$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012121
12122fi
12123
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012124# ************************************
12125# * Check for mathematical functions *
12126# ************************************
12127
12128LIBS_SAVE=$LIBS
12129LIBS="$LIBS $LIBM"
12130
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012131for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12132do :
12133 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12134ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012135if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012136 cat >>confdefs.h <<_ACEOF
12137#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12138_ACEOF
12139
12140fi
12141done
12142
12143for ac_func in hypot lgamma log1p round tgamma
12144do :
12145 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12146ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012147if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012148 cat >>confdefs.h <<_ACEOF
12149#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12150_ACEOF
12151
12152fi
12153done
12154
12155ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12156"
Gregory P. Smith69140482012-01-16 02:05:55 -080012157if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012158 ac_have_decl=1
12159else
12160 ac_have_decl=0
12161fi
12162
12163cat >>confdefs.h <<_ACEOF
12164#define HAVE_DECL_ISINF $ac_have_decl
12165_ACEOF
12166ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12167"
Gregory P. Smith69140482012-01-16 02:05:55 -080012168if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012169 ac_have_decl=1
12170else
12171 ac_have_decl=0
12172fi
12173
12174cat >>confdefs.h <<_ACEOF
12175#define HAVE_DECL_ISNAN $ac_have_decl
12176_ACEOF
12177ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12178"
Gregory P. Smith69140482012-01-16 02:05:55 -080012179if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012180 ac_have_decl=1
12181else
12182 ac_have_decl=0
12183fi
12184
12185cat >>confdefs.h <<_ACEOF
12186#define HAVE_DECL_ISFINITE $ac_have_decl
12187_ACEOF
12188
12189
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012190# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12191# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12193$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012194if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012196else
12197
Matthias Kloseb9621712010-04-24 17:59:49 +000012198if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012199 ac_cv_tanh_preserves_zero_sign=no
12200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012202/* end confdefs.h. */
12203
12204#include <math.h>
12205#include <stdlib.h>
12206int main() {
12207 /* return 0 if either negative zeros don't exist
12208 on this platform or if negative zeros exist
12209 and tanh(-0.) == -0. */
12210 if (atan2(0., -1.) == atan2(-0., -1.) ||
12211 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12212 else exit(1);
12213}
12214
12215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012216if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012217 ac_cv_tanh_preserves_zero_sign=yes
12218else
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12222 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012223fi
12224
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012225fi
12226
Matthias Kloseb9621712010-04-24 17:59:49 +000012227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12228$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012229if test "$ac_cv_tanh_preserves_zero_sign" = yes
12230then
12231
Matthias Kloseb9621712010-04-24 17:59:49 +000012232$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012233
12234fi
12235
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012236if test "$ac_cv_func_log1p" = yes
12237then
12238 # On some versions of AIX, log1p(-0.) returns 0. instead of
12239 # -0. See issue #9920.
12240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12241$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012242 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012243 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012244else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012245
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012246 if test "$cross_compiling" = yes; then :
12247 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012248else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12250/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012251
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012252 #include <math.h>
12253 #include <stdlib.h>
12254 int main() {
12255 /* Fail if the signs of log1p(-0.) and -0. can be
12256 distinguished. */
12257 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12258 return 0;
12259 else
12260 return 1;
12261 }
12262
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012263_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012264if ac_fn_c_try_run "$LINENO"; then :
12265 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012266else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012267 ac_cv_log1p_drops_zero_sign=yes
12268fi
12269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12270 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012271fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012272
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012273fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012274
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12276$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12277fi
12278if test "$ac_cv_log1p_drops_zero_sign" = yes
12279then
12280
12281$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12282
12283fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012284
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012285LIBS=$LIBS_SAVE
12286
Mark Dickinsona614f042009-11-28 12:48:43 +000012287# For multiprocessing module, check that sem_open
12288# actually works. For FreeBSD versions <= 7.2,
12289# the kernel module that provides POSIX semaphores
12290# isn't loaded by default, so an attempt to call
12291# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12293$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012294if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012296else
Matthias Kloseb9621712010-04-24 17:59:49 +000012297 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012298 ac_cv_posix_semaphores_enabled=yes
12299else
Matthias Kloseb9621712010-04-24 17:59:49 +000012300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012301/* end confdefs.h. */
12302
12303#include <unistd.h>
12304#include <fcntl.h>
12305#include <stdio.h>
12306#include <semaphore.h>
12307#include <sys/stat.h>
12308
12309int main(void) {
12310 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12311 if (a == SEM_FAILED) {
12312 perror("sem_open");
12313 return 1;
12314 }
12315 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012316 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012317 return 0;
12318}
12319
12320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012321if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012322 ac_cv_posix_semaphores_enabled=yes
12323else
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12327 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012328fi
12329
12330
Mark Dickinsona614f042009-11-28 12:48:43 +000012331fi
12332
Matthias Kloseb9621712010-04-24 17:59:49 +000012333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12334$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012335if test $ac_cv_posix_semaphores_enabled = no
12336then
12337
Matthias Kloseb9621712010-04-24 17:59:49 +000012338$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012339
12340fi
12341
Mark Dickinson10683072009-04-18 21:18:19 +000012342# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12344$as_echo_n "checking for broken sem_getvalue... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012345if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012347else
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012349 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012350else
Matthias Kloseb9621712010-04-24 17:59:49 +000012351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012352/* end confdefs.h. */
12353
12354#include <unistd.h>
12355#include <fcntl.h>
12356#include <stdio.h>
12357#include <semaphore.h>
12358#include <sys/stat.h>
12359
12360int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012361 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012362 int count;
12363 int res;
12364 if(a==SEM_FAILED){
12365 perror("sem_open");
12366 return 1;
12367
12368 }
12369 res = sem_getvalue(a, &count);
12370 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012371 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012372 return res==-1 ? 1 : 0;
12373}
12374
Mark Dickinson10683072009-04-18 21:18:19 +000012375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012376if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012377 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012378else
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012380fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12382 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012383fi
12384
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012385
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012386fi
12387
Matthias Kloseb9621712010-04-24 17:59:49 +000012388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12389$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012390if test $ac_cv_broken_sem_getvalue = yes
12391then
12392
Matthias Kloseb9621712010-04-24 17:59:49 +000012393$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012394
12395fi
12396
Mark Dickinsonbd792642009-03-18 20:06:12 +000012397# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12399$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012400# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012401if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012402 enableval=$enable_big_digits; case $enable_big_digits in
12403yes)
12404 enable_big_digits=30 ;;
12405no)
12406 enable_big_digits=15 ;;
1240715|30)
12408 ;;
12409*)
Gregory P. Smith69140482012-01-16 02:05:55 -080012410 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 +000012411esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12413$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012414
12415cat >>confdefs.h <<_ACEOF
12416#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12417_ACEOF
12418
12419
12420else
Matthias Kloseb9621712010-04-24 17:59:49 +000012421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12422$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012423fi
12424
12425
Guido van Rossumef2255b2000-03-10 22:30:29 +000012426# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012427ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080012428if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012429
12430
Matthias Kloseb9621712010-04-24 17:59:49 +000012431$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012432
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012433 wchar_h="yes"
12434
Guido van Rossumef2255b2000-03-10 22:30:29 +000012435else
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012437
12438fi
12439
Michael W. Hudson54241132001-12-07 15:38:26 +000012440
Martin v. Löwis11437992002-04-12 09:54:03 +000012441
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012442# determine wchar_t size
12443if test "$wchar_h" = yes
12444then
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012446# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12447# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12448# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12450$as_echo_n "checking size of wchar_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012451if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012453else
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12455"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012456
Martin v. Löwis11437992002-04-12 09:54:03 +000012457else
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 if test "$ac_cv_type_wchar_t" = yes; then
12459 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12460$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012461as_fn_error 77 "cannot compute sizeof (wchar_t)
Gregory P. Smith69140482012-01-16 02:05:55 -080012462See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463 else
12464 ac_cv_sizeof_wchar_t=0
12465 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012467
Martin v. Löwis11437992002-04-12 09:54:03 +000012468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12470$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471
12472
12473
Martin v. Löwis11437992002-04-12 09:54:03 +000012474cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012475#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012476_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012477
Michael W. Hudson54241132001-12-07 15:38:26 +000012478
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012479fi
12480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12482$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012483have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012485/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012486
12487#include <tcl.h>
12488#if TCL_UTF_MAX != 6
12489# error "NOT UCS4_TCL"
12490#endif
12491int
12492main ()
12493{
12494
12495 ;
12496 return 0;
12497}
12498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012499if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012500
12501
Matthias Kloseb9621712010-04-24 17:59:49 +000012502$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012503
12504 have_ucs4_tcl=yes
12505
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12509$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012510
Skip Montanaro6dead952003-09-25 14:50:04 +000012511# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012512if test "$wchar_h" = yes
12513then
12514 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12516$as_echo_n "checking whether wchar_t is signed... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012517 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012518 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012519else
12520
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012522 ac_cv_wchar_t_signed=yes
12523else
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012525/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012526
12527 #include <wchar.h>
12528 int main()
12529 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012530 /* Success: exit code 0 */
12531 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012532 }
12533
12534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012535if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012536 ac_cv_wchar_t_signed=yes
12537else
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12541 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012542fi
12543
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012544fi
12545
Matthias Kloseb9621712010-04-24 17:59:49 +000012546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12547$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012548fi
12549
Matthias Kloseb9621712010-04-24 17:59:49 +000012550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12551$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012552
12553# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012554if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012555 withval=$with_wide_unicode;
12556if test "$withval" != no
12557then unicode_size="4"
12558else unicode_size="2"
12559fi
12560
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012561else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012562
Georg Brandl52d168a2008-01-07 18:10:24 +000012563case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012564 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012565 *) unicode_size="2" ;;
12566esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012567
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012568fi
12569
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012570
12571
Georg Brandl52d168a2008-01-07 18:10:24 +000012572case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012573 4)
12574 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12575
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012576 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012577 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012578 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012579 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012580esac
12581
Michael W. Hudson54241132001-12-07 15:38:26 +000012582
Martin v. Löwis11437992002-04-12 09:54:03 +000012583
Georg Brandl52d168a2008-01-07 18:10:24 +000012584# wchar_t is only usable if it maps to an unsigned type
12585if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012586 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012587then
12588 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012589
Matthias Kloseb9621712010-04-24 17:59:49 +000012590$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012591
Matthias Kloseb9621712010-04-24 17:59:49 +000012592 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012593
Georg Brandl52d168a2008-01-07 18:10:24 +000012594elif test "$ac_cv_sizeof_short" = "$unicode_size"
12595then
12596 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012597 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012598
Georg Brandl52d168a2008-01-07 18:10:24 +000012599elif test "$ac_cv_sizeof_long" = "$unicode_size"
12600then
12601 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012602 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012603
Georg Brandl52d168a2008-01-07 18:10:24 +000012604else
12605 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12608$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012609
12610# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12612$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012613if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012614 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012615else
Matthias Kloseb9621712010-04-24 17:59:49 +000012616 ac_cv_c_bigendian=unknown
12617 # See if we're dealing with a universal compiler.
12618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12619/* end confdefs.h. */
12620#ifndef __APPLE_CC__
12621 not a universal capable compiler
12622 #endif
12623 typedef int dummy;
12624
Skip Montanaro6dead952003-09-25 14:50:04 +000012625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012626if ac_fn_c_try_compile "$LINENO"; then :
12627
12628 # Check for potential -arch flags. It is not universal unless
12629 # there are at least two -arch flags with different values.
12630 ac_arch=
12631 ac_prev=
12632 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12633 if test -n "$ac_prev"; then
12634 case $ac_word in
12635 i?86 | x86_64 | ppc | ppc64)
12636 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12637 ac_arch=$ac_word
12638 else
12639 ac_cv_c_bigendian=universal
12640 break
12641 fi
12642 ;;
12643 esac
12644 ac_prev=
12645 elif test "x$ac_word" = "x-arch"; then
12646 ac_prev=arch
12647 fi
12648 done
12649fi
12650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12651 if test $ac_cv_c_bigendian = unknown; then
12652 # See if sys/param.h defines the BYTE_ORDER macro.
12653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012654/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012655#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012657
Martin v. Löwis11437992002-04-12 09:54:03 +000012658int
12659main ()
12660{
Matthias Kloseb9621712010-04-24 17:59:49 +000012661#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12662 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12663 && LITTLE_ENDIAN)
12664 bogus endian macros
12665 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012666
12667 ;
12668 return 0;
12669}
12670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012671if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012672 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012674/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012675#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012676 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012677
Martin v. Löwis11437992002-04-12 09:54:03 +000012678int
12679main ()
12680{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012681#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 not big endian
12683 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012684
12685 ;
12686 return 0;
12687}
12688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012689if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012690 ac_cv_c_bigendian=yes
12691else
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012695fi
12696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12697 fi
12698 if test $ac_cv_c_bigendian = unknown; then
12699 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012701/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012702#include <limits.h>
12703
Martin v. Löwis11437992002-04-12 09:54:03 +000012704int
12705main ()
12706{
Matthias Kloseb9621712010-04-24 17:59:49 +000012707#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12708 bogus endian macros
12709 #endif
12710
Martin v. Löwis11437992002-04-12 09:54:03 +000012711 ;
12712 return 0;
12713}
12714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012715if ac_fn_c_try_compile "$LINENO"; then :
12716 # It does; now see whether it defined to _BIG_ENDIAN or not.
12717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12718/* end confdefs.h. */
12719#include <limits.h>
12720
12721int
12722main ()
12723{
12724#ifndef _BIG_ENDIAN
12725 not big endian
12726 #endif
12727
12728 ;
12729 return 0;
12730}
12731_ACEOF
12732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012733 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012734else
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12738fi
12739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12740 fi
12741 if test $ac_cv_c_bigendian = unknown; then
12742 # Compile a test program.
12743 if test "$cross_compiling" = yes; then :
12744 # Try to guess by grepping values from an object file.
12745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12746/* end confdefs.h. */
12747short int ascii_mm[] =
12748 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12749 short int ascii_ii[] =
12750 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12751 int use_ascii (int i) {
12752 return ascii_mm[i] + ascii_ii[i];
12753 }
12754 short int ebcdic_ii[] =
12755 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12756 short int ebcdic_mm[] =
12757 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12758 int use_ebcdic (int i) {
12759 return ebcdic_mm[i] + ebcdic_ii[i];
12760 }
12761 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012762
Matthias Kloseb9621712010-04-24 17:59:49 +000012763int
12764main ()
12765{
12766return use_ascii (foo) == use_ebcdic (foo);
12767 ;
12768 return 0;
12769}
12770_ACEOF
12771if ac_fn_c_try_compile "$LINENO"; then :
12772 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12773 ac_cv_c_bigendian=yes
12774 fi
12775 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12776 if test "$ac_cv_c_bigendian" = unknown; then
12777 ac_cv_c_bigendian=no
12778 else
12779 # finding both strings is unlikely to happen, but who knows?
12780 ac_cv_c_bigendian=unknown
12781 fi
12782 fi
12783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012785else
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012787/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012789int
12790main ()
12791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792
Matthias Kloseb9621712010-04-24 17:59:49 +000012793 /* Are we little or big endian? From Harbison&Steele. */
12794 union
12795 {
12796 long int l;
12797 char c[sizeof (long int)];
12798 } u;
12799 u.l = 1;
12800 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801
12802 ;
12803 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012804}
Martin v. Löwis11437992002-04-12 09:54:03 +000012805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012806if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012807 ac_cv_c_bigendian=no
12808else
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012814
Matthias Kloseb9621712010-04-24 17:59:49 +000012815 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12818$as_echo "$ac_cv_c_bigendian" >&6; }
12819 case $ac_cv_c_bigendian in #(
12820 yes)
12821 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12822;; #(
12823 no)
12824 ;; #(
12825 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012826
Matthias Kloseb9621712010-04-24 17:59:49 +000012827$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012828
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 ;; #(
12830 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012831 as_fn_error $? "unknown endianness
Gregory P. Smith69140482012-01-16 02:05:55 -080012832 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012833 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012834
Michael W. Hudson54241132001-12-07 15:38:26 +000012835
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012836# ABI version string for Python extension modules. This appears between the
12837# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12838# from the following attributes which affect the ABI of this Python build (in
12839# this order):
12840#
12841# * The Python implementation (always 'cpython-' for us)
12842# * The major and minor version numbers
12843# * --with-pydebug (adds a 'd')
12844# * --with-pymalloc (adds a 'm')
12845# * --with-wide-unicode (adds a 'u')
12846#
12847# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012848# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12849# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012850
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12852$as_echo_n "checking ABIFLAGS... " >&6; }
12853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12854$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12856$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012857SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12859$as_echo "$SOABI" >&6; }
12860
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070012861
12862case $ac_sys_system in
12863 Linux*|GNU*)
12864 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
12865 *)
12866 EXT_SUFFIX=${SHLIB_SUFFIX};;
12867esac
12868
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12870$as_echo_n "checking LDVERSION... " >&6; }
12871LDVERSION='$(VERSION)$(ABIFLAGS)'
12872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12873$as_echo "$LDVERSION" >&6; }
12874
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012875# Check whether right shifting a negative integer extends the sign bit
12876# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12878$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012879if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012880 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012881else
Martin v. Löwis11437992002-04-12 09:54:03 +000012882
Matthias Kloseb9621712010-04-24 17:59:49 +000012883if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012884 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012885else
Matthias Kloseb9621712010-04-24 17:59:49 +000012886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012887/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012888
12889int main()
12890{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012891 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012892}
12893
Martin v. Löwis11437992002-04-12 09:54:03 +000012894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012895if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012896 ac_cv_rshift_extends_sign=yes
12897else
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012902fi
12903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904fi
12905
Matthias Kloseb9621712010-04-24 17:59:49 +000012906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12907$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012908if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012909then
Martin v. Löwis11437992002-04-12 09:54:03 +000012910
Matthias Kloseb9621712010-04-24 17:59:49 +000012911$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012912
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012913fi
12914
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012915# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12917$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012918if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012919 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012920else
Martin v. Löwis11437992002-04-12 09:54:03 +000012921
Matthias Kloseb9621712010-04-24 17:59:49 +000012922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012923/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012924#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012925int
12926main ()
12927{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012928
12929 FILE *f = fopen("/dev/null", "r");
12930 flockfile(f);
12931 getc_unlocked(f);
12932 funlockfile(f);
12933
Martin v. Löwis11437992002-04-12 09:54:03 +000012934 ;
12935 return 0;
12936}
12937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012938if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012939 ac_cv_have_getc_unlocked=yes
12940else
Matthias Kloseb9621712010-04-24 17:59:49 +000012941 ac_cv_have_getc_unlocked=no
12942fi
12943rm -f core conftest.err conftest.$ac_objext \
12944 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012946
Matthias Kloseb9621712010-04-24 17:59:49 +000012947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12948$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012949if test "$ac_cv_have_getc_unlocked" = yes
12950then
Martin v. Löwis11437992002-04-12 09:54:03 +000012951
Matthias Kloseb9621712010-04-24 17:59:49 +000012952$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012953
12954fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012955
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012956# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012957# save the value of LIBS so we don't actually link Python with readline
12958LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012959
Gregory P. Smith18820942008-09-07 06:24:49 +000012960# On some systems we need to link readline to a termcap compatible
12961# library. NOTE: Keep the precedence of listed libraries synchronised
12962# with setup.py.
12963py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12965$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012966for py_libtermcap in "" ncursesw ncurses curses termcap; do
12967 if test -z "$py_libtermcap"; then
12968 READLINE_LIBS="-lreadline"
12969 else
12970 READLINE_LIBS="-lreadline -l$py_libtermcap"
12971 fi
12972 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012974/* end confdefs.h. */
12975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012976/* Override any GCC internal prototype to avoid an error.
12977 Use char because int might match the return type of a GCC
12978 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012979#ifdef __cplusplus
12980extern "C"
12981#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012982char readline ();
12983int
12984main ()
12985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012987 ;
12988 return 0;
12989}
12990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012991if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012992 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012994rm -f core conftest.err conftest.$ac_objext \
12995 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012996 if test $py_cv_lib_readline = yes; then
12997 break
12998 fi
12999done
13000# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13001#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013002if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13004$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013005else
Matthias Kloseb9621712010-04-24 17:59:49 +000013006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13007$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013008
Matthias Kloseb9621712010-04-24 17:59:49 +000013009$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013010
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013011fi
13012
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013013# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13015$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013016if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013017 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013018else
13019 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013020LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013022/* end confdefs.h. */
13023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013024/* Override any GCC internal prototype to avoid an error.
13025 Use char because int might match the return type of a GCC
13026 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013027#ifdef __cplusplus
13028extern "C"
13029#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013030char rl_callback_handler_install ();
13031int
13032main ()
13033{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013035 ;
13036 return 0;
13037}
13038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013039if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013040 ac_cv_lib_readline_rl_callback_handler_install=yes
13041else
Matthias Kloseb9621712010-04-24 17:59:49 +000013042 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013044rm -f core conftest.err conftest.$ac_objext \
13045 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013046LIBS=$ac_check_lib_save_LIBS
13047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13049$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013050if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013053
13054fi
13055
13056
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013057# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013059/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013060#include <readline/readline.h>
13061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013062if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013063 have_readline=yes
13064else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013065 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013066
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013067fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013068rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013069if test $have_readline = yes
13070then
Matthias Kloseb9621712010-04-24 17:59:49 +000013071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013072/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013073#include <readline/readline.h>
13074
13075_ACEOF
13076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013080
13081fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013082rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013083
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013085/* end confdefs.h. */
13086#include <readline/readline.h>
13087
13088_ACEOF
13089if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013093
13094fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013095rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013096
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013097fi
13098
Martin v. Löwis0daad592001-09-30 21:09:59 +000013099# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13101$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013102if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013104else
Martin v. Löwis11437992002-04-12 09:54:03 +000013105 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013106LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013110/* Override any GCC internal prototype to avoid an error.
13111 Use char because int might match the return type of a GCC
13112 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013113#ifdef __cplusplus
13114extern "C"
13115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013116char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013117int
13118main ()
13119{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013120return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 ;
13122 return 0;
13123}
13124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013125if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013126 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013127else
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013130rm -f core conftest.err conftest.$ac_objext \
13131 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013132LIBS=$ac_check_lib_save_LIBS
13133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13135$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013136if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013137
Matthias Kloseb9621712010-04-24 17:59:49 +000013138$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013139
Martin v. Löwis0daad592001-09-30 21:09:59 +000013140fi
13141
Michael W. Hudson54241132001-12-07 15:38:26 +000013142
Thomas Wouters89d996e2007-09-08 17:39:28 +000013143# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13145$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013146if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013148else
13149 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013150LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013152/* end confdefs.h. */
13153
13154/* Override any GCC internal prototype to avoid an error.
13155 Use char because int might match the return type of a GCC
13156 builtin and then its argument prototype would still apply. */
13157#ifdef __cplusplus
13158extern "C"
13159#endif
13160char rl_completion_display_matches_hook ();
13161int
13162main ()
13163{
13164return rl_completion_display_matches_hook ();
13165 ;
13166 return 0;
13167}
13168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013169if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013170 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13171else
Matthias Kloseb9621712010-04-24 17:59:49 +000013172 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013174rm -f core conftest.err conftest.$ac_objext \
13175 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013176LIBS=$ac_check_lib_save_LIBS
13177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13179$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013180if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013181
Matthias Kloseb9621712010-04-24 17:59:49 +000013182$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013183
13184fi
13185
13186
Martin v. Löwis0daad592001-09-30 21:09:59 +000013187# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13189$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013190if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013191 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013192else
Martin v. Löwis11437992002-04-12 09:54:03 +000013193 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013194LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013198/* Override any GCC internal prototype to avoid an error.
13199 Use char because int might match the return type of a GCC
13200 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013201#ifdef __cplusplus
13202extern "C"
13203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013204char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013205int
13206main ()
13207{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013208return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013209 ;
13210 return 0;
13211}
13212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013213if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013214 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013215else
Matthias Kloseb9621712010-04-24 17:59:49 +000013216 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013218rm -f core conftest.err conftest.$ac_objext \
13219 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013220LIBS=$ac_check_lib_save_LIBS
13221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13223$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013224if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013227
Guido van Rossum353ae582001-07-10 16:45:32 +000013228fi
13229
Jack Jansendd19cf82001-12-06 22:36:17 +000013230
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013231# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013233/* end confdefs.h. */
13234#include <readline/readline.h>
13235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013236if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013237 have_readline=yes
13238else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013239 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013240
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013241fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013242rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013243if test $have_readline = yes
13244then
Matthias Kloseb9621712010-04-24 17:59:49 +000013245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013246/* end confdefs.h. */
13247#include <readline/readline.h>
13248
13249_ACEOF
13250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013254
13255fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013256rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013257
13258fi
13259
Martin v. Löwis82bca632006-02-10 20:49:30 +000013260# End of readline checks: restore LIBS
13261LIBS=$LIBS_no_readline
13262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13264$as_echo_n "checking for broken nice()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013265if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013266 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013267else
Martin v. Löwis11437992002-04-12 09:54:03 +000013268
Matthias Kloseb9621712010-04-24 17:59:49 +000013269if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013270 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013271else
Matthias Kloseb9621712010-04-24 17:59:49 +000013272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013273/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013274
13275int main()
13276{
13277 int val1 = nice(1);
13278 if (val1 != -1 && val1 == nice(2))
13279 exit(0);
13280 exit(1);
13281}
13282
Martin v. Löwis11437992002-04-12 09:54:03 +000013283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013284if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013285 ac_cv_broken_nice=yes
13286else
Matthias Kloseb9621712010-04-24 17:59:49 +000013287 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13290 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013291fi
13292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013293fi
13294
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13296$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013297if test "$ac_cv_broken_nice" = yes
13298then
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
Matthias Kloseb9621712010-04-24 17:59:49 +000013300$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013301
13302fi
13303
Matthias Kloseb9621712010-04-24 17:59:49 +000013304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13305$as_echo_n "checking for broken poll()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013306if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013308else
Matthias Kloseb9621712010-04-24 17:59:49 +000013309 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013310 ac_cv_broken_poll=no
13311else
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013313/* end confdefs.h. */
13314
13315#include <poll.h>
13316
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013317int main()
13318{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013319 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013320 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013321
13322 close (42);
13323
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013324 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013325 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013326 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013327 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013328 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013329 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013330 return 1;
13331}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013332
13333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013334if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013335 ac_cv_broken_poll=yes
13336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13340 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013342
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013343fi
13344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13346$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013347if test "$ac_cv_broken_poll" = yes
13348then
13349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013351
13352fi
13353
Brett Cannon43802422005-02-10 20:48:03 +000013354# 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 +000013355# (which is not required by ISO C or UNIX spec) and/or if we support
13356# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013357ac_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 +000013358#include <$ac_cv_struct_tm>
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360"
Gregory P. Smith69140482012-01-16 02:05:55 -080013361if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013362
13363cat >>confdefs.h <<_ACEOF
13364#define HAVE_STRUCT_TM_TM_ZONE 1
13365_ACEOF
13366
13367
13368fi
13369
13370if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013373
13374else
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13376"
Gregory P. Smith69140482012-01-16 02:05:55 -080013377if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013381fi
13382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013384#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385_ACEOF
13386
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13388$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013389if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391else
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013393/* end confdefs.h. */
13394#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013395#if !HAVE_DECL_TZNAME
13396extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013397#endif
13398
13399int
13400main ()
13401{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013402return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013403 ;
13404 return 0;
13405}
13406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013407if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013408 ac_cv_var_tzname=yes
13409else
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013412rm -f core conftest.err conftest.$ac_objext \
13413 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13416$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013417 if test $ac_cv_var_tzname = yes; then
13418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013420
13421 fi
13422fi
13423
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013424
Martin v. Löwis1d459062005-03-14 21:23:33 +000013425# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13427$as_echo_n "checking for working tzset()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013428if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013430else
13431
Matthias Kloseb9621712010-04-24 17:59:49 +000013432if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013433 ac_cv_working_tzset=no
13434else
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013436/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013437
13438#include <stdlib.h>
13439#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013440#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013441
13442#if HAVE_TZNAME
13443extern char *tzname[];
13444#endif
13445
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013446int main()
13447{
Brett Cannon18367812003-09-19 00:59:16 +000013448 /* Note that we need to ensure that not only does tzset(3)
13449 do 'something' with localtime, but it works as documented
13450 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013451 This includes making sure that tzname is set properly if
13452 tm->tm_zone does not exist since it is the alternative way
13453 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013454
13455 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013456 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013457 */
13458
Martin v. Löwis1d459062005-03-14 21:23:33 +000013459 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013460 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13461
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013462 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013463 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013464 if (localtime(&groundhogday)->tm_hour != 0)
13465 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013466#if HAVE_TZNAME
13467 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13468 if (strcmp(tzname[0], "UTC") ||
13469 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13470 exit(1);
13471#endif
Brett Cannon18367812003-09-19 00:59:16 +000013472
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013473 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013474 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013475 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013476 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013477#if HAVE_TZNAME
13478 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13479 exit(1);
13480#endif
Brett Cannon18367812003-09-19 00:59:16 +000013481
13482 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13483 tzset();
13484 if (localtime(&groundhogday)->tm_hour != 11)
13485 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013486#if HAVE_TZNAME
13487 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13488 exit(1);
13489#endif
13490
13491#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013492 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13493 exit(1);
13494 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13495 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013496#endif
Brett Cannon18367812003-09-19 00:59:16 +000013497
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013498 exit(0);
13499}
13500
13501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013502if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013503 ac_cv_working_tzset=yes
13504else
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13508 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013509fi
13510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013511fi
13512
Matthias Kloseb9621712010-04-24 17:59:49 +000013513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13514$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013515if test "$ac_cv_working_tzset" = yes
13516then
13517
Matthias Kloseb9621712010-04-24 17:59:49 +000013518$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013519
13520fi
13521
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013522# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13524$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013525if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013526 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013527else
Matthias Kloseb9621712010-04-24 17:59:49 +000013528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013529/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013530#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013531int
13532main ()
13533{
13534
13535struct stat st;
13536st.st_mtim.tv_nsec = 1;
13537
13538 ;
13539 return 0;
13540}
13541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013542if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013543 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013544else
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13548fi
13549
Matthias Kloseb9621712010-04-24 17:59:49 +000013550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13551$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013552if test "$ac_cv_stat_tv_nsec" = yes
13553then
13554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013556
13557fi
13558
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013559# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13561$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013562if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013564else
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013566/* end confdefs.h. */
13567#include <sys/stat.h>
13568int
13569main ()
13570{
13571
13572struct stat st;
13573st.st_mtimespec.tv_nsec = 1;
13574
13575 ;
13576 return 0;
13577}
13578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013580 ac_cv_stat_tv_nsec2=yes
13581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13585fi
13586
Matthias Kloseb9621712010-04-24 17:59:49 +000013587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13588$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013589if test "$ac_cv_stat_tv_nsec2" = yes
13590then
13591
Matthias Kloseb9621712010-04-24 17:59:49 +000013592$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013593
13594fi
13595
Jack Jansen666b1e72001-10-31 12:11:48 +000013596# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13598$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013599if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013601else
Matthias Kloseb9621712010-04-24 17:59:49 +000013602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013603/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013604#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013605int
13606main ()
13607{
Jack Jansen666b1e72001-10-31 12:11:48 +000013608
13609 int rtn;
13610 rtn = mvwdelch(0,0,0);
13611
Martin v. Löwis11437992002-04-12 09:54:03 +000013612 ;
13613 return 0;
13614}
13615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013616if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013617 ac_cv_mvwdelch_is_expression=yes
13618else
Matthias Kloseb9621712010-04-24 17:59:49 +000013619 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13622fi
13623
Matthias Kloseb9621712010-04-24 17:59:49 +000013624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13625$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013626
13627if test "$ac_cv_mvwdelch_is_expression" = yes
13628then
Martin v. Löwis11437992002-04-12 09:54:03 +000013629
Matthias Kloseb9621712010-04-24 17:59:49 +000013630$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013631
13632fi
13633
Matthias Kloseb9621712010-04-24 17:59:49 +000013634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13635$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013636if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013638else
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013640/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013641#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013642int
13643main ()
13644{
Jack Jansen666b1e72001-10-31 12:11:48 +000013645
13646 WINDOW *w;
13647 w->_flags = 0;
13648
Martin v. Löwis11437992002-04-12 09:54:03 +000013649 ;
13650 return 0;
13651}
13652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013653if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013654 ac_cv_window_has_flags=yes
13655else
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13659fi
13660
Matthias Kloseb9621712010-04-24 17:59:49 +000013661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13662$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013663
Jack Jansen666b1e72001-10-31 12:11:48 +000013664
13665if test "$ac_cv_window_has_flags" = yes
13666then
Martin v. Löwis11437992002-04-12 09:54:03 +000013667
Matthias Kloseb9621712010-04-24 17:59:49 +000013668$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013669
13670fi
13671
Matthias Kloseb9621712010-04-24 17:59:49 +000013672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13673$as_echo_n "checking for is_term_resized... " >&6; }
13674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013675/* end confdefs.h. */
13676#include <curses.h>
13677int
13678main ()
13679{
13680void *x=is_term_resized
13681 ;
13682 return 0;
13683}
13684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013685if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013686
Matthias Kloseb9621712010-04-24 17:59:49 +000013687$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013688
Matthias Kloseb159a552010-04-25 21:00:44 +000013689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013690$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013691else
Matthias Kloseb9621712010-04-24 17:59:49 +000013692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13693$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013694
13695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13697
Matthias Kloseb9621712010-04-24 17:59:49 +000013698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13699$as_echo_n "checking for resize_term... " >&6; }
13700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013701/* end confdefs.h. */
13702#include <curses.h>
13703int
13704main ()
13705{
13706void *x=resize_term
13707 ;
13708 return 0;
13709}
13710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013711if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013712
Matthias Kloseb9621712010-04-24 17:59:49 +000013713$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013714
Matthias Kloseb159a552010-04-25 21:00:44 +000013715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013716$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013717else
Matthias Kloseb9621712010-04-24 17:59:49 +000013718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13719$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013720
13721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13725$as_echo_n "checking for resizeterm... " >&6; }
13726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013727/* end confdefs.h. */
13728#include <curses.h>
13729int
13730main ()
13731{
13732void *x=resizeterm
13733 ;
13734 return 0;
13735}
13736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013737if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013738
Matthias Kloseb9621712010-04-24 17:59:49 +000013739$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013740
Matthias Kloseb159a552010-04-25 21:00:44 +000013741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013742$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013743else
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13745$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013746
13747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13751$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013752
13753if test -r /dev/ptmx
13754then
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13756$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013757
Matthias Kloseb9621712010-04-24 17:59:49 +000013758$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013759
Thomas Wouters89f507f2006-12-13 04:49:30 +000013760else
Matthias Kloseb9621712010-04-24 17:59:49 +000013761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13762$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013763fi
13764
Matthias Kloseb9621712010-04-24 17:59:49 +000013765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13766$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013767
13768if test -r /dev/ptc
13769then
Matthias Kloseb9621712010-04-24 17:59:49 +000013770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13771$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013772
Matthias Kloseb9621712010-04-24 17:59:49 +000013773$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013774
Thomas Wouters89f507f2006-12-13 04:49:30 +000013775else
Matthias Kloseb9621712010-04-24 17:59:49 +000013776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13777$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013778fi
13779
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013780if test "$have_long_long" = yes
13781then
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13783$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013784 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013786else
Matthias Kloseb9621712010-04-24 17:59:49 +000013787 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013788 ac_cv_have_long_long_format=no
13789else
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013791/* end confdefs.h. */
13792
13793 #include <stdio.h>
13794 #include <stddef.h>
13795 #include <string.h>
13796
13797 #ifdef HAVE_SYS_TYPES_H
13798 #include <sys/types.h>
13799 #endif
13800
13801 int main()
13802 {
13803 char buffer[256];
13804
13805 if (sprintf(buffer, "%lld", (long long)123) < 0)
13806 return 1;
13807 if (strcmp(buffer, "123"))
13808 return 1;
13809
13810 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13811 return 1;
13812 if (strcmp(buffer, "-123"))
13813 return 1;
13814
13815 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13816 return 1;
13817 if (strcmp(buffer, "123"))
13818 return 1;
13819
13820 return 0;
13821 }
13822
13823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013824if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013825 ac_cv_have_long_long_format=yes
13826else
Matthias Kloseb9621712010-04-24 17:59:49 +000013827 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013831fi
13832
13833
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013834fi
13835
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13837$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013838fi
13839
Mark Dickinson89d7d412009-12-31 20:50:59 +000013840if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013841then
13842
Matthias Kloseb9621712010-04-24 17:59:49 +000013843$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013844
13845fi
13846
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013847if test $ac_sys_system = Darwin
13848then
13849 LIBS="$LIBS -framework CoreFoundation"
13850fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013851
Matthias Kloseb9621712010-04-24 17:59:49 +000013852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13853$as_echo_n "checking for %zd printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013854if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013855 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013856else
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013858 ac_cv_have_size_t_format="cross -- assuming yes"
13859
Thomas Wouters477c8d52006-05-27 19:21:47 +000013860else
Matthias Kloseb9621712010-04-24 17:59:49 +000013861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013862/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013863
Thomas Wouters477c8d52006-05-27 19:21:47 +000013864#include <stdio.h>
13865#include <stddef.h>
13866#include <string.h>
13867
Christian Heimes2c181612007-12-17 20:04:13 +000013868#ifdef HAVE_SYS_TYPES_H
13869#include <sys/types.h>
13870#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013871
13872#ifdef HAVE_SSIZE_T
13873typedef ssize_t Py_ssize_t;
13874#elif SIZEOF_VOID_P == SIZEOF_LONG
13875typedef long Py_ssize_t;
13876#else
13877typedef int Py_ssize_t;
13878#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013879
Christian Heimes2c181612007-12-17 20:04:13 +000013880int main()
13881{
13882 char buffer[256];
13883
Thomas Wouters477c8d52006-05-27 19:21:47 +000013884 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13885 return 1;
13886
Thomas Wouters89f507f2006-12-13 04:49:30 +000013887 if (strcmp(buffer, "123"))
13888 return 1;
13889
13890 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13891 return 1;
13892
13893 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013894 return 1;
13895
13896 return 0;
13897}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013898
Thomas Wouters477c8d52006-05-27 19:21:47 +000013899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013900if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013901 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013902else
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013904fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013907fi
13908
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13911$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013912if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013913
Matthias Kloseb9621712010-04-24 17:59:49 +000013914$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013915
13916fi
13917
Matthias Kloseb9621712010-04-24 17:59:49 +000013918ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013919#ifdef HAVE_SYS_TYPES_H
13920#include <sys/types.h>
13921#endif
13922#ifdef HAVE_SYS_SOCKET_H
13923#include <sys/socket.h>
13924#endif
13925
Matthias Kloseb9621712010-04-24 17:59:49 +000013926"
Gregory P. Smith69140482012-01-16 02:05:55 -080013927if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013928
Martin v. Löwis11437992002-04-12 09:54:03 +000013929else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013930
Matthias Kloseb9621712010-04-24 17:59:49 +000013931$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013932
13933fi
13934
Michael W. Hudson54241132001-12-07 15:38:26 +000013935
Matthias Kloseb9621712010-04-24 17:59:49 +000013936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13937$as_echo_n "checking for broken mbstowcs... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013938if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013939 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013940else
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013942 ac_cv_broken_mbstowcs=no
13943else
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013945/* end confdefs.h. */
13946
13947#include<stdlib.h>
13948int main() {
13949 size_t len = -1;
13950 const char *str = "text";
13951 len = mbstowcs(NULL, str, 0);
13952 return (len != 4);
13953}
13954
13955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013956if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013957 ac_cv_broken_mbstowcs=no
13958else
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013963fi
13964
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013965fi
13966
Matthias Kloseb9621712010-04-24 17:59:49 +000013967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13968$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013969if test "$ac_cv_broken_mbstowcs" = yes
13970then
13971
Matthias Kloseb9621712010-04-24 17:59:49 +000013972$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013973
13974fi
13975
Antoine Pitrou042b1282010-08-13 21:15:58 +000013976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13977$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013978if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013979 $as_echo_n "(cached) " >&6
13980else
13981 if test "$cross_compiling" = yes; then :
13982 ac_cv_computed_gotos=no
13983else
13984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13985/* end confdefs.h. */
13986
13987int main(int argc, char **argv)
13988{
13989 static void *targets[1] = { &&LABEL1 };
13990 goto LABEL2;
13991LABEL1:
13992 return 0;
13993LABEL2:
13994 goto *targets[0];
13995 return 1;
13996}
13997
13998_ACEOF
13999if ac_fn_c_try_run "$LINENO"; then :
14000 ac_cv_computed_gotos=yes
14001else
14002 ac_cv_computed_gotos=no
14003fi
14004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14005 conftest.$ac_objext conftest.beam conftest.$ac_ext
14006fi
14007
14008fi
14009
14010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14011$as_echo "$ac_cv_computed_gotos" >&6; }
14012if test "$ac_cv_computed_gotos" = yes
14013then
14014
14015$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14016
14017fi
14018
Antoine Pitroub52ec782009-01-25 16:34:23 +000014019# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14021$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014022
14023# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014024if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014025 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014026if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014027then
14028
Matthias Kloseb9621712010-04-24 17:59:49 +000014029$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014030
Matthias Kloseb9621712010-04-24 17:59:49 +000014031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14032$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014033fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014034if test "$withval" = no
14035then
14036
14037$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14038
Matthias Kloseb9621712010-04-24 17:59:49 +000014039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14040$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014041fi
14042
Antoine Pitrou042b1282010-08-13 21:15:58 +000014043else
14044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14045$as_echo "no value specified" >&6; }
14046fi
14047
Antoine Pitroub52ec782009-01-25 16:34:23 +000014048
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014049case $ac_sys_system in
14050AIX*)
14051
14052$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14053 ;;
14054esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014055
Michael W. Hudson54241132001-12-07 15:38:26 +000014056
Jesus Cea6a792292010-05-03 21:18:48 +000014057case $ac_sys_system in
Gregory P. Smith69140482012-01-16 02:05:55 -080014058 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 +000014059esac
14060
Gregory P. Smith138fa432010-12-13 08:00:52 +000014061ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Gregory P. Smith69140482012-01-16 02:05:55 -080014062if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000014063
14064$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
14065
14066fi
Jesus Cea6a792292010-05-03 21:18:48 +000014067
14068
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014069
14070
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014071for h in `(cd $srcdir;echo Python/thread_*.h)`
14072do
14073 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14074done
14075
Michael W. Hudson54241132001-12-07 15:38:26 +000014076
Neal Norwitzd24499d2005-12-18 21:36:39 +000014077SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14079$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014080for dir in $SRCDIRS; do
14081 if test ! -d $dir; then
14082 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014083 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014084done
Matthias Kloseb9621712010-04-24 17:59:49 +000014085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14086$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014087
Guido van Rossum627b2d71993-12-24 10:39:16 +000014088# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014089ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014090
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014091ac_config_files="$ac_config_files Modules/ld_so_aix"
14092
Martin v. Löwis11437992002-04-12 09:54:03 +000014093cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014094# This file is a shell script that caches the results of configure
14095# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014096# scripts and configure runs, see configure's option --config-cache.
14097# It is not useful on other systems. If it contains results you don't
14098# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014099#
Martin v. Löwis11437992002-04-12 09:54:03 +000014100# config.status only pays attention to the cache file if you give it
14101# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014102#
Skip Montanaro6dead952003-09-25 14:50:04 +000014103# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014104# loading this file, other *unset* `ac_cv_foo' will be assigned the
14105# following values.
14106
14107_ACEOF
14108
Guido van Rossumf78abae1997-01-21 22:02:36 +000014109# The following way of writing the cache mishandles newlines in values,
14110# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014112# Ultrix sh set writes to stderr and can't be redirected directly,
14113# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014114(
14115 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14116 eval ac_val=\$$ac_var
14117 case $ac_val in #(
14118 *${as_nl}*)
14119 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014120 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14121$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014122 esac
14123 case $ac_var in #(
14124 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014125 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14126 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014127 esac ;;
14128 esac
14129 done
14130
Martin v. Löwis11437992002-04-12 09:54:03 +000014131 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014132 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14133 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014134 # `set' does not quote correctly, so add quotes: double-quote
14135 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014136 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014137 "s/'/'\\\\''/g;
14138 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014139 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014140 *)
14141 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014142 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014143 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014144 esac |
14145 sort
14146) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014147 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14152 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14154 :end' >>confcache
14155if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14156 if test -w "$cache_file"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014157 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14159$as_echo "$as_me: updating cache $cache_file" >&6;}
Gregory P. Smith69140482012-01-16 02:05:55 -080014160 if test ! -f "$cache_file" || test -h "$cache_file"; then
14161 cat confcache >"$cache_file"
14162 else
14163 case $cache_file in #(
14164 */* | ?:*)
14165 mv -f confcache "$cache_file"$$ &&
14166 mv -f "$cache_file"$$ "$cache_file" ;; #(
14167 *)
14168 mv -f confcache "$cache_file" ;;
14169 esac
14170 fi
14171 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014172 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014173 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14174$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014175 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014176fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014177rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014178
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014179test "x$prefix" = xNONE && prefix=$ac_default_prefix
14180# Let make expand exec_prefix.
14181test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014182
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014183DEFS=-DHAVE_CONFIG_H
14184
Skip Montanaro6dead952003-09-25 14:50:04 +000014185ac_libobjs=
14186ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014187U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014188for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14189 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014190 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014192 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14193 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14195 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014196done
14197LIBOBJS=$ac_libobjs
14198
14199LTLIBOBJS=$ac_ltlibobjs
14200
14201
Martin v. Löwis11437992002-04-12 09:54:03 +000014202
Matthias Kloseb9621712010-04-24 17:59:49 +000014203
Gregory P. Smith69140482012-01-16 02:05:55 -080014204: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014205ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014206ac_clean_files_save=$ac_clean_files
14207ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014208{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14209$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14210as_write_fail=0
14211cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014212#! $SHELL
14213# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014214# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014215# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014216# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014217
Martin v. Löwis11437992002-04-12 09:54:03 +000014218debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014219ac_cs_recheck=false
14220ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014221
Matthias Kloseb9621712010-04-24 17:59:49 +000014222SHELL=\${CONFIG_SHELL-$SHELL}
14223export SHELL
14224_ASEOF
14225cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14226## -------------------- ##
14227## M4sh Initialization. ##
14228## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014230# Be more Bourne compatible
14231DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014232if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014233 emulate sh
14234 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014235 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014236 # is contrary to our usage. Disable this feature.
14237 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014239else
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 case `(set -o) 2>/dev/null` in #(
14241 *posix*) :
14242 set -o posix ;; #(
14243 *) :
14244 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014246fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014247
14248
Matthias Kloseb9621712010-04-24 17:59:49 +000014249as_nl='
14250'
14251export as_nl
14252# Printing a long string crashes Solaris 7 /usr/bin/printf.
14253as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14254as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14255as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14256# Prefer a ksh shell builtin over an external printf program on Solaris,
14257# but without wasting forks for bash or zsh.
14258if test -z "$BASH_VERSION$ZSH_VERSION" \
14259 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14260 as_echo='print -r --'
14261 as_echo_n='print -rn --'
14262elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14263 as_echo='printf %s\n'
14264 as_echo_n='printf %s'
14265else
14266 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14267 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14268 as_echo_n='/usr/ucb/echo -n'
14269 else
14270 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14271 as_echo_n_body='eval
14272 arg=$1;
14273 case $arg in #(
14274 *"$as_nl"*)
14275 expr "X$arg" : "X\\(.*\\)$as_nl";
14276 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14277 esac;
14278 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14279 '
14280 export as_echo_n_body
14281 as_echo_n='sh -c $as_echo_n_body as_echo'
14282 fi
14283 export as_echo_body
14284 as_echo='sh -c $as_echo_body as_echo'
14285fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014286
14287# The user is always right.
14288if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 PATH_SEPARATOR=:
14290 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14291 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14292 PATH_SEPARATOR=';'
14293 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014294fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296
14297# IFS
14298# We need space, tab and new line, in precisely that order. Quoting is
14299# there to prevent editors from complaining about space-tab.
14300# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14301# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014302IFS=" "" $as_nl"
14303
14304# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080014305as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014306case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014307 *[\\/]* ) as_myself=$0 ;;
14308 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014309for as_dir in $PATH
14310do
14311 IFS=$as_save_IFS
14312 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014313 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14314 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014315IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014317 ;;
14318esac
14319# We did not find ourselves, most probably we were run as `sh COMMAND'
14320# in which case we are not to be found in the path.
14321if test "x$as_myself" = x; then
14322 as_myself=$0
14323fi
14324if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014325 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14326 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014327fi
14328
Matthias Kloseb9621712010-04-24 17:59:49 +000014329# Unset variables that we do not need and which cause bugs (e.g. in
14330# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14331# suppresses any "Segmentation fault" message there. '((' could
14332# trigger a bug in pdksh 5.2.14.
14333for as_var in BASH_ENV ENV MAIL MAILPATH
14334do eval test x\${$as_var+set} = xset \
14335 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014336done
14337PS1='$ '
14338PS2='> '
14339PS4='+ '
14340
14341# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014342LC_ALL=C
14343export LC_ALL
14344LANGUAGE=C
14345export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014346
Matthias Kloseb9621712010-04-24 17:59:49 +000014347# CDPATH.
14348(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14349
14350
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014351# as_fn_error STATUS ERROR [LINENO LOG_FD]
14352# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014353# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14354# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014355# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014356as_fn_error ()
14357{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014358 as_status=$1; test $as_status -eq 0 && as_status=1
14359 if test "$4"; then
14360 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14361 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014362 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014363 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 as_fn_exit $as_status
14365} # as_fn_error
14366
14367
14368# as_fn_set_status STATUS
14369# -----------------------
14370# Set $? to STATUS, without forking.
14371as_fn_set_status ()
14372{
14373 return $1
14374} # as_fn_set_status
14375
14376# as_fn_exit STATUS
14377# -----------------
14378# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14379as_fn_exit ()
14380{
14381 set +e
14382 as_fn_set_status $1
14383 exit $1
14384} # as_fn_exit
14385
14386# as_fn_unset VAR
14387# ---------------
14388# Portably unset VAR.
14389as_fn_unset ()
14390{
14391 { eval $1=; unset $1;}
14392}
14393as_unset=as_fn_unset
14394# as_fn_append VAR VALUE
14395# ----------------------
14396# Append the text in VALUE to the end of the definition contained in VAR. Take
14397# advantage of any shell optimizations that allow amortized linear growth over
14398# repeated appends, instead of the typical quadratic growth present in naive
14399# implementations.
14400if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14401 eval 'as_fn_append ()
14402 {
14403 eval $1+=\$2
14404 }'
14405else
14406 as_fn_append ()
14407 {
14408 eval $1=\$$1\$2
14409 }
14410fi # as_fn_append
14411
14412# as_fn_arith ARG...
14413# ------------------
14414# Perform arithmetic evaluation on the ARGs, and store the result in the
14415# global $as_val. Take advantage of shells that can avoid forks. The arguments
14416# must be portable across $(()) and expr.
14417if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14418 eval 'as_fn_arith ()
14419 {
14420 as_val=$(( $* ))
14421 }'
14422else
14423 as_fn_arith ()
14424 {
14425 as_val=`expr "$@" || test $? -eq 1`
14426 }
14427fi # as_fn_arith
14428
14429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430if expr a : '\(a\)' >/dev/null 2>&1 &&
14431 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14432 as_expr=expr
14433else
14434 as_expr=false
14435fi
14436
14437if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14438 as_basename=basename
14439else
14440 as_basename=false
14441fi
14442
Matthias Kloseb9621712010-04-24 17:59:49 +000014443if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14444 as_dirname=dirname
14445else
14446 as_dirname=false
14447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449as_me=`$as_basename -- "$0" ||
14450$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14451 X"$0" : 'X\(//\)$' \| \
14452 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014453$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454 sed '/^.*\/\([^/][^/]*\)\/*$/{
14455 s//\1/
14456 q
14457 }
14458 /^X\/\(\/\/\)$/{
14459 s//\1/
14460 q
14461 }
14462 /^X\/\(\/\).*/{
14463 s//\1/
14464 q
14465 }
14466 s/.*/./; q'`
14467
Matthias Kloseb9621712010-04-24 17:59:49 +000014468# Avoid depending upon Character Ranges.
14469as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14470as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14471as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14472as_cr_digits='0123456789'
14473as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474
14475ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014476case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014478 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 xy) ECHO_C='\c';;
14481 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14482 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483 esac;;
14484*)
14485 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014486esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014487
Martin v. Löwis11437992002-04-12 09:54:03 +000014488rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489if test -d conf$$.dir; then
14490 rm -f conf$$.dir/conf$$.file
14491else
14492 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014495if (echo >conf$$.file) 2>/dev/null; then
14496 if ln -s conf$$.file conf$$ 2>/dev/null; then
14497 as_ln_s='ln -s'
14498 # ... but there are two gotchas:
14499 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14500 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014501 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000014502 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014503 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014504 elif ln conf$$.file conf$$ 2>/dev/null; then
14505 as_ln_s=ln
14506 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014507 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014509else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014510 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000014511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014512rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14513rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014514
Matthias Kloseb9621712010-04-24 17:59:49 +000014515
14516# as_fn_mkdir_p
14517# -------------
14518# Create "$as_dir" as a directory, including parents if necessary.
14519as_fn_mkdir_p ()
14520{
14521
14522 case $as_dir in #(
14523 -*) as_dir=./$as_dir;;
14524 esac
14525 test -d "$as_dir" || eval $as_mkdir_p || {
14526 as_dirs=
14527 while :; do
14528 case $as_dir in #(
14529 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14530 *) as_qdir=$as_dir;;
14531 esac
14532 as_dirs="'$as_qdir' $as_dirs"
14533 as_dir=`$as_dirname -- "$as_dir" ||
14534$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14535 X"$as_dir" : 'X\(//\)[^/]' \| \
14536 X"$as_dir" : 'X\(//\)$' \| \
14537 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14538$as_echo X"$as_dir" |
14539 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14540 s//\1/
14541 q
14542 }
14543 /^X\(\/\/\)[^/].*/{
14544 s//\1/
14545 q
14546 }
14547 /^X\(\/\/\)$/{
14548 s//\1/
14549 q
14550 }
14551 /^X\(\/\).*/{
14552 s//\1/
14553 q
14554 }
14555 s/.*/./; q'`
14556 test -d "$as_dir" && break
14557 done
14558 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014559 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014560
14561
14562} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014563if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014565else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014566 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014567 as_mkdir_p=false
14568fi
14569
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014570
14571# as_fn_executable_p FILE
14572# -----------------------
14573# Test if FILE is an executable regular file.
14574as_fn_executable_p ()
14575{
14576 test -f "$1" && test -x "$1"
14577} # as_fn_executable_p
14578as_test_x='test -x'
14579as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014580
14581# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014582as_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 +000014583
14584# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014585as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014586
14587
Martin v. Löwis11437992002-04-12 09:54:03 +000014588exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014589## ----------------------------------- ##
14590## Main body of $CONFIG_STATUS script. ##
14591## ----------------------------------- ##
14592_ASEOF
14593test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014594
Matthias Kloseb9621712010-04-24 17:59:49 +000014595cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14596# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014597# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598# values after options handling.
14599ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014600This file was extended by python $as_me 3.2, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014601generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014602
14603 CONFIG_FILES = $CONFIG_FILES
14604 CONFIG_HEADERS = $CONFIG_HEADERS
14605 CONFIG_LINKS = $CONFIG_LINKS
14606 CONFIG_COMMANDS = $CONFIG_COMMANDS
14607 $ $0 $@
14608
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609on `(hostname || uname -n) 2>/dev/null | sed 1q`
14610"
14611
Martin v. Löwis11437992002-04-12 09:54:03 +000014612_ACEOF
14613
Matthias Kloseb9621712010-04-24 17:59:49 +000014614case $ac_config_files in *"
14615"*) set x $ac_config_files; shift; ac_config_files=$*;;
14616esac
14617
14618case $ac_config_headers in *"
14619"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14620esac
14621
14622
14623cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014624# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014625config_files="$ac_config_files"
14626config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014628_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014629
Matthias Kloseb9621712010-04-24 17:59:49 +000014630cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014631ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014632\`$as_me' instantiates files and other configuration actions
14633from templates according to the current configuration. Unless the files
14634and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014635
Matthias Kloseb9621712010-04-24 17:59:49 +000014636Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
14638 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014639 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014640 --config print configuration, then exit
14641 -q, --quiet, --silent
14642 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014643 -d, --debug don't remove temporary files
14644 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014645 --file=FILE[:TEMPLATE]
14646 instantiate the configuration file FILE
14647 --header=FILE[:TEMPLATE]
14648 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014649
14650Configuration files:
14651$config_files
14652
14653Configuration headers:
14654$config_headers
14655
Matthias Kloseb9621712010-04-24 17:59:49 +000014656Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014659cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14660ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014661ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014662python config.status 3.2
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014663configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000014664 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014665
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014666Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014667This config.status script is free software; the Free Software Foundation
14668gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669
14670ac_pwd='$ac_pwd'
14671srcdir='$srcdir'
14672INSTALL='$INSTALL'
Trent Nelsona45afca2012-08-30 14:32:02 +000014673MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000014674test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014675_ACEOF
14676
Matthias Kloseb9621712010-04-24 17:59:49 +000014677cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14678# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014679ac_need_defaults=:
14680while test $# != 0
14681do
14682 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014683 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014684 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14685 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014686 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014687 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014688 --*=)
14689 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14690 ac_optarg=
14691 ac_shift=:
14692 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014693 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014694 ac_option=$1
14695 ac_optarg=$2
14696 ac_shift=shift
14697 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014698 esac
14699
Skip Montanaro6dead952003-09-25 14:50:04 +000014700 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014701 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014702 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14703 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014704 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 $as_echo "$ac_cs_version"; exit ;;
14706 --config | --confi | --conf | --con | --co | --c )
14707 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014708 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014709 debug=: ;;
14710 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014711 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014712 case $ac_optarg in
14713 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014714 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 esac
14716 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014717 ac_need_defaults=false;;
14718 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014719 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 case $ac_optarg in
14721 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14722 esac
14723 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014724 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014725 --he | --h)
14726 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014727 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014728Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014729 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014731 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14732 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14733 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014734
14735 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014736 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014737Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014738
Matthias Kloseb9621712010-04-24 17:59:49 +000014739 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014740 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014741
14742 esac
14743 shift
14744done
14745
Skip Montanaro6dead952003-09-25 14:50:04 +000014746ac_configure_extra_args=
14747
14748if $ac_cs_silent; then
14749 exec 6>/dev/null
14750 ac_configure_extra_args="$ac_configure_extra_args --silent"
14751fi
14752
14753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014754cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014755if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014756 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 shift
14758 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14759 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014760 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014761 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014762fi
14763
Martin v. Löwis11437992002-04-12 09:54:03 +000014764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014765cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014766exec 5>>config.log
14767{
14768 echo
14769 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14770## Running $as_me. ##
14771_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014772 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014776cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014778
Matthias Kloseb9621712010-04-24 17:59:49 +000014779cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014780
14781# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014782for ac_config_target in $ac_config_targets
14783do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014784 case $ac_config_target in
14785 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14786 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14787 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014788 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14789 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14791 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014792 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014793 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014794
Gregory P. Smith69140482012-01-16 02:05:55 -080014795 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014796 esac
14797done
14798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014799
Martin v. Löwis11437992002-04-12 09:54:03 +000014800# If the user did not use the arguments to specify the items to instantiate,
14801# then the envvar interface is used. Set only those that are not.
14802# We use the long form for the default assignment because of an extremely
14803# bizarre bug on SunOS 4.1.3.
14804if $ac_need_defaults; then
14805 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14806 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14807fi
14808
Skip Montanaro6dead952003-09-25 14:50:04 +000014809# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014811# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014812# Hook for its removal unless debugging.
14813# Note that there is a small window in which the directory will not be cleaned:
14814# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014815$debug ||
14816{
Gregory P. Smith69140482012-01-16 02:05:55 -080014817 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014818 trap 'exit_status=$?
Gregory P. Smith69140482012-01-16 02:05:55 -080014819 : "${ac_tmp:=$tmp}"
14820 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014823}
Martin v. Löwis11437992002-04-12 09:54:03 +000014824# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014825
Martin v. Löwis11437992002-04-12 09:54:03 +000014826{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Gregory P. Smith69140482012-01-16 02:05:55 -080014828 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014829} ||
14830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014831 tmp=./conf$$-$RANDOM
14832 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014833} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080014834ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836# Set up the scripts for CONFIG_FILES section.
14837# No need to generate them if there are no CONFIG_FILES.
14838# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014839if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014840
Matthias Kloseb9621712010-04-24 17:59:49 +000014841
14842ac_cr=`echo X | tr X '\015'`
14843# On cygwin, bash can eat \r inside `` if the user requested igncr.
14844# But we know of no other shell where ac_cr would be empty at this
14845# point, so we can use a bashism as a fallback.
14846if test "x$ac_cr" = x; then
14847 eval ac_cr=\$\'\\r\'
14848fi
14849ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14850if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014851 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014852else
14853 ac_cs_awk_cr=$ac_cr
14854fi
14855
Gregory P. Smith69140482012-01-16 02:05:55 -080014856echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014857_ACEOF
14858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859
Matthias Kloseb9621712010-04-24 17:59:49 +000014860{
14861 echo "cat >conf$$subs.awk <<_ACEOF" &&
14862 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14863 echo "_ACEOF"
14864} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014865 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14866ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867ac_delim='%!_!# '
14868for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014870 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014871
Matthias Kloseb9621712010-04-24 17:59:49 +000014872 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14873 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874 break
14875 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014876 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014877 else
14878 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014879 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014880done
Matthias Kloseb9621712010-04-24 17:59:49 +000014881rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014882
Matthias Kloseb9621712010-04-24 17:59:49 +000014883cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Gregory P. Smith69140482012-01-16 02:05:55 -080014884cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014886sed -n '
14887h
14888s/^/S["/; s/!.*/"]=/
14889p
14890g
14891s/^[^!]*!//
14892:repl
14893t repl
14894s/'"$ac_delim"'$//
14895t delim
14896:nl
14897h
14898s/\(.\{148\}\)..*/\1/
14899t more1
14900s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14901p
14902n
14903b repl
14904:more1
14905s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14906p
14907g
14908s/.\{148\}//
14909t nl
14910:delim
14911h
14912s/\(.\{148\}\)..*/\1/
14913t more2
14914s/["\\]/\\&/g; s/^/"/; s/$/"/
14915p
14916b
14917:more2
14918s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14919p
14920g
14921s/.\{148\}//
14922t delim
14923' <conf$$subs.awk | sed '
14924/^[^""]/{
14925 N
14926 s/\n//
14927}
14928' >>$CONFIG_STATUS || ac_write_fail=1
14929rm -f conf$$subs.awk
14930cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14931_ACAWK
Gregory P. Smith69140482012-01-16 02:05:55 -080014932cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 for (key in S) S_is_set[key] = 1
14934 FS = ""
14935
14936}
14937{
14938 line = $ 0
14939 nfields = split(line, field, "@")
14940 substed = 0
14941 len = length(field[1])
14942 for (i = 2; i < nfields; i++) {
14943 key = field[i]
14944 keylen = length(key)
14945 if (S_is_set[key]) {
14946 value = S[key]
14947 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14948 len += length(value) + length(field[++i])
14949 substed = 1
14950 } else
14951 len += 1 + keylen
14952 }
14953
14954 print line
14955}
14956
14957_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014959cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14960if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14961 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14962else
14963 cat
Gregory P. Smith69140482012-01-16 02:05:55 -080014964fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014965 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014966_ACEOF
14967
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014968# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14969# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970# trailing colons and then remove the whole line if VPATH becomes empty
14971# (actually we leave an empty line to preserve line numbers).
14972if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014973 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14974h
14975s///
14976s/^/:/
14977s/[ ]*$/:/
14978s/:\$(srcdir):/:/g
14979s/:\${srcdir}:/:/g
14980s/:@srcdir@:/:/g
14981s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014983x
14984s/\(=[ ]*\).*/\1/
14985G
14986s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987s/^[^=]*=[ ]*$//
14988}'
14989fi
14990
Matthias Kloseb9621712010-04-24 17:59:49 +000014991cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014992fi # test -n "$CONFIG_FILES"
14993
Matthias Kloseb9621712010-04-24 17:59:49 +000014994# Set up the scripts for CONFIG_HEADERS section.
14995# No need to generate them if there are no CONFIG_HEADERS.
14996# This happens for instance with `./config.status Makefile'.
14997if test -n "$CONFIG_HEADERS"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014998cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014999BEGIN {
15000_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001
Matthias Kloseb9621712010-04-24 17:59:49 +000015002# Transform confdefs.h into an awk script `defines.awk', embedded as
15003# here-document in config.status, that substitutes the proper values into
15004# config.h.in to produce config.h.
15005
15006# Create a delimiter string that does not exist in confdefs.h, to ease
15007# handling of long lines.
15008ac_delim='%!_!# '
15009for ac_last_try in false false :; do
Gregory P. Smith69140482012-01-16 02:05:55 -080015010 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15011 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015012 break
15013 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015014 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015015 else
15016 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15017 fi
15018done
15019
15020# For the awk script, D is an array of macro values keyed by name,
15021# likewise P contains macro parameters if any. Preserve backslash
15022# newline sequences.
15023
15024ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15025sed -n '
15026s/.\{148\}/&'"$ac_delim"'/g
15027t rset
15028:rset
15029s/^[ ]*#[ ]*define[ ][ ]*/ /
15030t def
15031d
15032:def
15033s/\\$//
15034t bsnl
15035s/["\\]/\\&/g
15036s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15037D["\1"]=" \3"/p
15038s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15039d
15040:bsnl
15041s/["\\]/\\&/g
15042s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15043D["\1"]=" \3\\\\\\n"\\/p
15044t cont
15045s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15046t cont
15047d
15048:cont
15049n
15050s/.\{148\}/&'"$ac_delim"'/g
15051t clear
15052:clear
15053s/\\$//
15054t bsnlc
15055s/["\\]/\\&/g; s/^/"/; s/$/"/p
15056d
15057:bsnlc
15058s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15059b cont
15060' <confdefs.h | sed '
15061s/'"$ac_delim"'/"\\\
15062"/g' >>$CONFIG_STATUS || ac_write_fail=1
15063
15064cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15065 for (key in D) D_is_set[key] = 1
15066 FS = ""
15067}
15068/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15069 line = \$ 0
15070 split(line, arg, " ")
15071 if (arg[1] == "#") {
15072 defundef = arg[2]
15073 mac1 = arg[3]
15074 } else {
15075 defundef = substr(arg[1], 2)
15076 mac1 = arg[2]
15077 }
15078 split(mac1, mac2, "(") #)
15079 macro = mac2[1]
15080 prefix = substr(line, 1, index(line, defundef) - 1)
15081 if (D_is_set[macro]) {
15082 # Preserve the white space surrounding the "#".
15083 print prefix "define", macro P[macro] D[macro]
15084 next
15085 } else {
15086 # Replace #undef with comments. This is necessary, for example,
15087 # in the case of _POSIX_SOURCE, which is predefined and required
15088 # on some systems where configure will not decide to define it.
15089 if (defundef == "undef") {
15090 print "/*", prefix defundef, macro, "*/"
15091 next
15092 }
15093 }
15094}
15095{ print }
15096_ACAWK
15097_ACEOF
15098cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015099 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015100fi # test -n "$CONFIG_HEADERS"
15101
15102
15103eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15104shift
15105for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015106do
15107 case $ac_tag in
15108 :[FHLC]) ac_mode=$ac_tag; continue;;
15109 esac
15110 case $ac_mode$ac_tag in
15111 :[FHL]*:*);;
Gregory P. Smith69140482012-01-16 02:05:55 -080015112 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113 :[FH]-) ac_tag=-:-;;
15114 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15115 esac
15116 ac_save_IFS=$IFS
15117 IFS=:
15118 set x $ac_tag
15119 IFS=$ac_save_IFS
15120 shift
15121 ac_file=$1
15122 shift
15123
15124 case $ac_mode in
15125 :L) ac_source=$1;;
15126 :[FH])
15127 ac_file_inputs=
15128 for ac_f
15129 do
15130 case $ac_f in
Gregory P. Smith69140482012-01-16 02:05:55 -080015131 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132 *) # Look for the file first in the build tree, then in the source tree
15133 # (if the path is not absolute). The absolute path cannot be DOS-style,
15134 # because $ac_f cannot contain `:'.
15135 test -f "$ac_f" ||
15136 case $ac_f in
15137 [\\/$]*) false;;
15138 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15139 esac ||
Gregory P. Smith69140482012-01-16 02:05:55 -080015140 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15143 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144 done
15145
15146 # Let's still pretend it is `configure' which instantiates (i.e., don't
15147 # use $as_me), people would be surprised to read:
15148 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015149 configure_input='Generated from '`
15150 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15151 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152 if test x"$ac_file" != x-; then
15153 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015154 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15155$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 # Neutralize special characters interpreted by sed in replacement strings.
15158 case $configure_input in #(
15159 *\&* | *\|* | *\\* )
15160 ac_sed_conf_input=`$as_echo "$configure_input" |
15161 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15162 *) ac_sed_conf_input=$configure_input;;
15163 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015164
15165 case $ac_tag in
Gregory P. Smith69140482012-01-16 02:05:55 -080015166 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15167 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168 esac
15169 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015170 esac
15171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015173$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015174 X"$ac_file" : 'X\(//\)[^/]' \| \
15175 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015177$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15179 s//\1/
15180 q
15181 }
15182 /^X\(\/\/\)[^/].*/{
15183 s//\1/
15184 q
15185 }
15186 /^X\(\/\/\)$/{
15187 s//\1/
15188 q
15189 }
15190 /^X\(\/\).*/{
15191 s//\1/
15192 q
15193 }
15194 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 ac_builddir=.
15197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015198case "$ac_dir" in
15199.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15200*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015203 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204 case $ac_top_builddir_sub in
15205 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15206 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15207 esac ;;
15208esac
15209ac_abs_top_builddir=$ac_pwd
15210ac_abs_builddir=$ac_pwd$ac_dir_suffix
15211# for backward compatibility:
15212ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015213
15214case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015217 ac_top_srcdir=$ac_top_builddir_sub
15218 ac_abs_top_srcdir=$ac_pwd ;;
15219 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015220 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221 ac_top_srcdir=$srcdir
15222 ac_abs_top_srcdir=$srcdir ;;
15223 *) # Relative name.
15224 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15225 ac_top_srcdir=$ac_top_build_prefix$srcdir
15226 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015227esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015229
Martin v. Löwis11437992002-04-12 09:54:03 +000015230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231 case $ac_mode in
15232 :F)
15233 #
15234 # CONFIG_FILE
15235 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015236
15237 case $INSTALL in
15238 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015239 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015240 esac
Trent Nelsona45afca2012-08-30 14:32:02 +000015241 ac_MKDIR_P=$MKDIR_P
15242 case $MKDIR_P in
15243 [\\/$]* | ?:[\\/]* ) ;;
15244 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15245 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015246_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247
Matthias Kloseb9621712010-04-24 17:59:49 +000015248cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015249# If the template does not know about datarootdir, expand it.
15250# FIXME: This hack should be removed a few years after 2.60.
15251ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015252ac_sed_dataroot='
15253/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254 p
15255 q
15256}
15257/@datadir@/p
15258/@docdir@/p
15259/@infodir@/p
15260/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015261/@mandir@/p'
15262case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263*datarootdir*) ac_datarootdir_seen=yes;;
15264*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15266$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015268cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269 ac_datarootdir_hack='
15270 s&@datadir@&$datadir&g
15271 s&@docdir@&$docdir&g
15272 s&@infodir@&$infodir&g
15273 s&@localedir@&$localedir&g
15274 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015275 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015276esac
15277_ACEOF
15278
15279# Neutralize VPATH when `$srcdir' = `.'.
15280# Shell code in configure.ac might set extrasub.
15281# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015282cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15283ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015284$extrasub
15285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015286cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015287:t
15288/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015289s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015291s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292s&@srcdir@&$ac_srcdir&;t t
15293s&@abs_srcdir@&$ac_abs_srcdir&;t t
15294s&@top_srcdir@&$ac_top_srcdir&;t t
15295s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15296s&@builddir@&$ac_builddir&;t t
15297s&@abs_builddir@&$ac_abs_builddir&;t t
15298s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15299s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsona45afca2012-08-30 14:32:02 +000015300s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015301$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015302"
Gregory P. Smith69140482012-01-16 02:05:55 -080015303eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15304 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015306test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Gregory P. Smith69140482012-01-16 02:05:55 -080015307 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15308 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15309 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015310 { $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 +000015311which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015312$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015313which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015314
Gregory P. Smith69140482012-01-16 02:05:55 -080015315 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015316 case $ac_file in
Gregory P. Smith69140482012-01-16 02:05:55 -080015317 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15318 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015319 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015320 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015321 ;;
15322 :H)
15323 #
15324 # CONFIG_HEADER
15325 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 {
15328 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015329 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15330 } >"$ac_tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015331 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080015332 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015333 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15334$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015335 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015336 rm -f "$ac_file"
Gregory P. Smith69140482012-01-16 02:05:55 -080015337 mv "$ac_tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015338 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 fi
15340 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015342 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015343 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015345 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015347
15348 esac
15349
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015350
15351 case $ac_file$ac_mode in
15352 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15353
15354 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355done # for ac_tag
15356
Guido van Rossum627b2d71993-12-24 10:39:16 +000015357
Matthias Kloseb9621712010-04-24 17:59:49 +000015358as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015359_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015360ac_clean_files=$ac_clean_files_save
15361
Matthias Kloseb9621712010-04-24 17:59:49 +000015362test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015363 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015364
Martin v. Löwis11437992002-04-12 09:54:03 +000015365
15366# configure is writing to config.log, and then calls config.status.
15367# config.status does its own redirection, appending to config.log.
15368# Unfortunately, on DOS this fails, as config.log is still kept open
15369# by configure, so config.status won't be able to write to it; its
15370# output is simply discarded. So we exec the FD to /dev/null,
15371# effectively closing config.log, so it can be properly (re)opened and
15372# appended to by config.status. When coming back to configure, we
15373# need to make the FD available again.
15374if test "$no_create" != yes; then
15375 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015376 ac_config_status_args=
15377 test "$silent" = yes &&
15378 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015379 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015380 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 exec 5>>config.log
15382 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15383 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015384 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015385fi
15386if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15387 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15388$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015389fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015390
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015391
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015392echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015393if test ! -f Modules/Setup
15394then
15395 cp $srcdir/Modules/Setup.dist Modules/Setup
15396fi
15397
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015398echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015399if test ! -f Modules/Setup.local
15400then
15401 echo "# Edit this file for local setup changes" >Modules/Setup.local
15402fi
15403
15404echo "creating Makefile"
15405$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15406 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015407 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015408mv config.c Modules