blob: 1f00599154cadd3ad2fdc8237a8991cba746affe [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose0f4c16e2012-03-14 23:10:15 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004# Generated by GNU Autoconf 2.69 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027else
Matthias Kloseb9621712010-04-24 17:59:49 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000035
36
Matthias Kloseb9621712010-04-24 17:59:49 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080093as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000094case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000115fi
116
Matthias Kloseb9621712010-04-24 17:59:49 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000134
Matthias Kloseb9621712010-04-24 17:59:49 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
271$0: http://bugs.python.org/ about your system, including
272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000360
361
362} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000411# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000412as_fn_error ()
413{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000418 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Kloseb9621712010-04-24 17:59:49 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000446$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Kloseb9621712010-04-24 17:59:49 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467
468
Matthias Kloseb9621712010-04-24 17:59:49 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000489 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000491
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000505case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000506-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000507 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000522 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000523fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000530 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000532 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000536 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Kloseb9621712010-04-24 17:59:49 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000584PACKAGE_VERSION='3.2'
585PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000586PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000618#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Kloseb9621712010-04-24 17:59:49 +0000626ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000629SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000630LIBC
631LIBM
632HAVE_GETHOSTBYNAME
633HAVE_GETHOSTBYNAME_R
634HAVE_GETHOSTBYNAME_R_3_ARG
635HAVE_GETHOSTBYNAME_R_5_ARG
636HAVE_GETHOSTBYNAME_R_6_ARG
637LIBOBJS
638TRUE
639MACHDEP_OBJS
640DYNLOADFILE
641DLINCLDIR
642THREADOBJ
643LDLAST
644USE_THREAD_MODULE
645SIGNAL_OBJS
646USE_SIGNAL_MODULE
647LIBFFI_INCLUDEDIR
648PKG_CONFIG
649SHLIBS
650CFLAGSFORSHARED
651LINKFORSHARED
652CCSHARED
653BLDSHARED
654LDCXXSHARED
655LDSHARED
656SO
657LIBTOOL_CRUFT
658OTHER_LIBTOOL_OPT
659UNIVERSAL_ARCH_FLAGS
660BASECFLAGS
661OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000662ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000663LN
Trent Nelsona45afca2012-08-30 14:32:02 +0000664MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000665INSTALL_DATA
666INSTALL_SCRIPT
667INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200668PYTHON
669ASDLGEN
Georg Brandl1ca2e792011-03-05 20:51:24 +0100670HAS_HG
671HGBRANCH
672HGTAG
673HGVERSION
Trent Nelson9effe692012-10-16 08:41:32 -0400674BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000675SVNVERSION
676ARFLAGS
677AR
678RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000679USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000680GNULD
681LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000682LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000683RUNSHARED
684INSTSONAME
685LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000686PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000687BLDLIBRARY
688DLLLIBRARY
689LDLIBRARY
690LIBRARY
691BUILDEXEEXT
692EGREP
693GREP
694CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200695NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000696MAINCC
697CXX
698OBJEXT
699EXEEXT
700ac_ct_CC
701CPPFLAGS
702LDFLAGS
703CFLAGS
704CC
705EXPORT_MACOSX_DEPLOYMENT_TARGET
706CONFIGURE_MACOSX_DEPLOYMENT_TARGET
707SGI_ABI
708MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000709FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000710FRAMEWORKUNIXTOOLSPREFIX
711FRAMEWORKALTINSTALLLAST
712FRAMEWORKALTINSTALLFIRST
713FRAMEWORKINSTALLLAST
714FRAMEWORKINSTALLFIRST
715PYTHONFRAMEWORKINSTALLDIR
716PYTHONFRAMEWORKPREFIX
717PYTHONFRAMEWORKDIR
718PYTHONFRAMEWORKIDENTIFIER
719PYTHONFRAMEWORK
720LIPO_32BIT_FLAGS
721ARCH_RUN_32BIT
722UNIVERSALSDK
723CONFIG_ARGS
724SOVERSION
725VERSION
726target_alias
727host_alias
728build_alias
729LIBS
730ECHO_T
731ECHO_N
732ECHO_C
733DEFS
734mandir
735localedir
736libdir
737psdir
738pdfdir
739dvidir
740htmldir
741infodir
742docdir
743oldincludedir
744includedir
745localstatedir
746sharedstatedir
747sysconfdir
748datadir
749datarootdir
750libexecdir
751sbindir
752bindir
753program_transform_name
754prefix
755exec_prefix
756PACKAGE_URL
757PACKAGE_BUGREPORT
758PACKAGE_STRING
759PACKAGE_VERSION
760PACKAGE_TARNAME
761PACKAGE_NAME
762PATH_SEPARATOR
763SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000764ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000765ac_user_opts='
766enable_option_checking
767enable_universalsdk
768with_universal_archs
769with_framework_name
770enable_framework
771with_gcc
772with_cxx_main
773with_suffix
774enable_shared
775enable_profiling
776with_pydebug
777with_libs
778with_system_expat
779with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000780enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000781with_dbmliborder
782with_signal_module
783with_dec_threads
784with_threads
785with_thread
786enable_ipv6
787with_doc_strings
788with_tsc
789with_pymalloc
790with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000791with_fpectl
792with_libm
793with_libc
794enable_big_digits
795with_wide_unicode
796with_computed_gotos
797'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798 ac_precious_vars='build_alias
799host_alias
800target_alias
801CC
802CFLAGS
803LDFLAGS
804LIBS
805CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000806CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000807
Guido van Rossum627b2d71993-12-24 10:39:16 +0000808
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000810ac_init_help=
811ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000812ac_unrecognized_opts=
813ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814# The variables have the same names as the options, with
815# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000816cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000817exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819no_recursion=
820prefix=NONE
821program_prefix=NONE
822program_suffix=NONE
823program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828x_includes=NONE
829x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000830
831# Installation directory options.
832# These are left unexpanded so users can "make install exec_prefix=/foo"
833# and all the variables that are supposed to be based on exec_prefix
834# by default will actually change.
835# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000836# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837bindir='${exec_prefix}/bin'
838sbindir='${exec_prefix}/sbin'
839libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840datarootdir='${prefix}/share'
841datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842sysconfdir='${prefix}/etc'
843sharedstatedir='${prefix}/com'
844localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845includedir='${prefix}/include'
846oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
848infodir='${datarootdir}/info'
849htmldir='${docdir}'
850dvidir='${docdir}'
851pdfdir='${docdir}'
852psdir='${docdir}'
853libdir='${exec_prefix}/lib'
854localedir='${datarootdir}/locale'
855mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861 # If the previous option needs an argument, assign it.
862 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864 ac_prev=
865 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000866 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000868 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000869 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
870 *=) ac_optarg= ;;
871 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874 # Accept the important Cygnus configure options, so we can diagnose typos.
875
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000876 case $ac_dashdash$ac_option in
877 --)
878 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880 -bindir | --bindir | --bindi | --bind | --bin | --bi)
881 ac_prev=bindir ;;
882 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000883 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884
885 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000886 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 -cache-file | --cache-file | --cache-fil | --cache-fi \
891 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
892 ac_prev=cache_file ;;
893 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
894 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000895 cache_file=$ac_optarg ;;
896
897 --config-cache | -C)
898 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
906 | --dataroo | --dataro | --datar)
907 ac_prev=datarootdir ;;
908 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
909 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
910 datarootdir=$ac_optarg ;;
911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000913 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000915 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000916 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000917 ac_useropt_orig=$ac_useropt
918 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
919 case $ac_user_opts in
920 *"
921"enable_$ac_useropt"
922"*) ;;
923 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
924 ac_unrecognized_sep=', ';;
925 esac
926 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927
928 -docdir | --docdir | --docdi | --doc | --do)
929 ac_prev=docdir ;;
930 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
931 docdir=$ac_optarg ;;
932
933 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
934 ac_prev=dvidir ;;
935 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
936 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
938 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000939 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000941 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000942 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000943 ac_useropt_orig=$ac_useropt
944 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
945 case $ac_user_opts in
946 *"
947"enable_$ac_useropt"
948"*) ;;
949 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
950 ac_unrecognized_sep=', ';;
951 esac
952 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
955 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
956 | --exec | --exe | --ex)
957 ac_prev=exec_prefix ;;
958 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
959 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
960 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
963 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 # Obsolete; use --with-gas.
965 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 -help | --help | --hel | --he | -h)
968 ac_init_help=long ;;
969 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
970 ac_init_help=recursive ;;
971 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
972 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
974 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
980 ac_prev=htmldir ;;
981 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
982 | --ht=*)
983 htmldir=$ac_optarg ;;
984
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000985 -includedir | --includedir | --includedi | --included | --include \
986 | --includ | --inclu | --incl | --inc)
987 ac_prev=includedir ;;
988 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
989 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
992 -infodir | --infodir | --infodi | --infod | --info | --inf)
993 ac_prev=infodir ;;
994 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996
997 -libdir | --libdir | --libdi | --libd)
998 ac_prev=libdir ;;
999 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001000 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001001
1002 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1003 | --libexe | --libex | --libe)
1004 ac_prev=libexecdir ;;
1005 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1006 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 -localedir | --localedir | --localedi | --localed | --locale)
1010 ac_prev=localedir ;;
1011 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1012 localedir=$ac_optarg ;;
1013
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001014 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001015 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016 ac_prev=localstatedir ;;
1017 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001018 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
1021 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1022 ac_prev=mandir ;;
1023 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001027 # Obsolete; use --without-fp.
1028 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032 no_create=yes ;;
1033
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001034 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1035 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1036 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1039 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1040 | --oldin | --oldi | --old | --ol | --o)
1041 ac_prev=oldincludedir ;;
1042 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1043 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1044 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1048 ac_prev=prefix ;;
1049 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051
1052 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1053 | --program-pre | --program-pr | --program-p)
1054 ac_prev=program_prefix ;;
1055 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1056 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1060 | --program-suf | --program-su | --program-s)
1061 ac_prev=program_suffix ;;
1062 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1063 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -program-transform-name | --program-transform-name \
1067 | --program-transform-nam | --program-transform-na \
1068 | --program-transform-n | --program-transform- \
1069 | --program-transform | --program-transfor \
1070 | --program-transfo | --program-transf \
1071 | --program-trans | --program-tran \
1072 | --progr-tra | --program-tr | --program-t)
1073 ac_prev=program_transform_name ;;
1074 -program-transform-name=* | --program-transform-name=* \
1075 | --program-transform-nam=* | --program-transform-na=* \
1076 | --program-transform-n=* | --program-transform-=* \
1077 | --program-transform=* | --program-transfor=* \
1078 | --program-transfo=* | --program-transf=* \
1079 | --program-trans=* | --program-tran=* \
1080 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001083 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1084 ac_prev=pdfdir ;;
1085 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1086 pdfdir=$ac_optarg ;;
1087
1088 -psdir | --psdir | --psdi | --psd | --ps)
1089 ac_prev=psdir ;;
1090 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1091 psdir=$ac_optarg ;;
1092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1094 | -silent | --silent | --silen | --sile | --sil)
1095 silent=yes ;;
1096
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1098 ac_prev=sbindir ;;
1099 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1100 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001102
1103 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1104 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1105 | --sharedst | --shareds | --shared | --share | --shar \
1106 | --sha | --sh)
1107 ac_prev=sharedstatedir ;;
1108 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1109 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1110 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1111 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114 -site | --site | --sit)
1115 ac_prev=site ;;
1116 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1120 ac_prev=srcdir ;;
1121 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001124 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1125 | --syscon | --sysco | --sysc | --sys | --sy)
1126 ac_prev=sysconfdir ;;
1127 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1128 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001130
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
1136 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1137 verbose=yes ;;
1138
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 -version | --version | --versio | --versi | --vers | -V)
1140 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141
1142 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001143 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001145 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001146 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001147 ac_useropt_orig=$ac_useropt
1148 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1149 case $ac_user_opts in
1150 *"
1151"with_$ac_useropt"
1152"*) ;;
1153 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1154 ac_unrecognized_sep=', ';;
1155 esac
1156 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
1158 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001159 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001160 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001162 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 ac_useropt_orig=$ac_useropt
1164 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1165 case $ac_user_opts in
1166 *"
1167"with_$ac_useropt"
1168"*) ;;
1169 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1170 ac_unrecognized_sep=', ';;
1171 esac
1172 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174 --x)
1175 # Obsolete; use --with-x.
1176 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
1178 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1179 | --x-incl | --x-inc | --x-in | --x-i)
1180 ac_prev=x_includes ;;
1181 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1182 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
1185 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1186 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1187 ac_prev=x_libraries ;;
1188 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1189 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001192 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1193Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 ;;
1195
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 *=*)
1197 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1198 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 case $ac_envvar in #(
1200 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001201 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001203 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 export $ac_envvar ;;
1205
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001206 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Gregory P. Smith69140482012-01-16 02:05:55 -08001211 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212 ;;
1213
1214 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215done
1216
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001219 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220fi
1221
Matthias Kloseb9621712010-04-24 17:59:49 +00001222if test -n "$ac_unrecognized_opts"; then
1223 case $enable_option_checking in
1224 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001225 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1227 esac
1228fi
1229
1230# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001231for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1232 datadir sysconfdir sharedstatedir localstatedir includedir \
1233 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1234 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 # Remove trailing slashes.
1238 case $ac_val in
1239 */ )
1240 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1241 eval $ac_var=\$ac_val;;
1242 esac
1243 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245 [\\/$]* | ?:[\\/]* ) continue;;
1246 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001248 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001249done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001250
Martin v. Löwis11437992002-04-12 09:54:03 +00001251# There might be people who depend on the old broken behavior: `$host'
1252# used to hold the argument of --host etc.
1253# FIXME: To remove some day.
1254build=$build_alias
1255host=$host_alias
1256target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257
Martin v. Löwis11437992002-04-12 09:54:03 +00001258# FIXME: To remove some day.
1259if test "x$host_alias" != x; then
1260 if test "x$build_alias" = x; then
1261 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 elif test "x$build_alias" != "x$host_alias"; then
1263 cross_compiling=yes
1264 fi
1265fi
1266
1267ac_tool_prefix=
1268test -n "$host_alias" && ac_tool_prefix=$host_alias-
1269
1270test "$silent" = yes && exec 6>/dev/null
1271
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001273ac_pwd=`pwd` && test -n "$ac_pwd" &&
1274ac_ls_di=`ls -di .` &&
1275ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001276 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001278 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279
1280
Guido van Rossum627b2d71993-12-24 10:39:16 +00001281# Find the source files, if location was not specified.
1282if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001285 ac_confdir=`$as_dirname -- "$as_myself" ||
1286$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1287 X"$as_myself" : 'X\(//\)[^/]' \| \
1288 X"$as_myself" : 'X\(//\)$' \| \
1289 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1290$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1292 s//\1/
1293 q
1294 }
1295 /^X\(\/\/\)[^/].*/{
1296 s//\1/
1297 q
1298 }
1299 /^X\(\/\/\)$/{
1300 s//\1/
1301 q
1302 }
1303 /^X\(\/\).*/{
1304 s//\1/
1305 q
1306 }
1307 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001308 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310 srcdir=..
1311 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312else
1313 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001315if test ! -r "$srcdir/$ac_unique_file"; then
1316 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001317 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001319ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1320ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001321 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001322 pwd)`
1323# When building in place, set srcdir=.
1324if test "$ac_abs_confdir" = "$ac_pwd"; then
1325 srcdir=.
1326fi
1327# Remove unnecessary trailing slashes from srcdir.
1328# Double slashes in file names in object file debugging info
1329# mess up M-x gdb in Emacs.
1330case $srcdir in
1331*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1332esac
1333for ac_var in $ac_precious_vars; do
1334 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1335 eval ac_env_${ac_var}_value=\$${ac_var}
1336 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1337 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1338done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339
Martin v. Löwis11437992002-04-12 09:54:03 +00001340#
1341# Report the --help message.
1342#
1343if test "$ac_init_help" = "long"; then
1344 # Omit some internal or obsolete options to make the list less imposing.
1345 # This message is too long to be a string in the A/UX 3.1 sh.
1346 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001347\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001348
1349Usage: $0 [OPTION]... [VAR=VALUE]...
1350
1351To assign environment variables (e.g., CC, CFLAGS...), specify them as
1352VAR=VALUE. See below for descriptions of some of the useful variables.
1353
1354Defaults for the options are specified in brackets.
1355
1356Configuration:
1357 -h, --help display this help and exit
1358 --help=short display options specific to this package
1359 --help=recursive display the short help of all the included packages
1360 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001361 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001362 --cache-file=FILE cache test results in FILE [disabled]
1363 -C, --config-cache alias for \`--cache-file=config.cache'
1364 -n, --no-create do not create output files
1365 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1366
Martin v. Löwis11437992002-04-12 09:54:03 +00001367Installation directories:
1368 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001369 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001370 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001371 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001372
1373By default, \`make install' will install all the files in
1374\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1375an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1376for instance \`--prefix=\$HOME'.
1377
1378For better control, use the options below.
1379
1380Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001381 --bindir=DIR user executables [EPREFIX/bin]
1382 --sbindir=DIR system admin executables [EPREFIX/sbin]
1383 --libexecdir=DIR program executables [EPREFIX/libexec]
1384 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1385 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1386 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1387 --libdir=DIR object code libraries [EPREFIX/lib]
1388 --includedir=DIR C header files [PREFIX/include]
1389 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1390 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1391 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1392 --infodir=DIR info documentation [DATAROOTDIR/info]
1393 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1394 --mandir=DIR man documentation [DATAROOTDIR/man]
1395 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1396 --htmldir=DIR html documentation [DOCDIR]
1397 --dvidir=DIR dvi documentation [DOCDIR]
1398 --pdfdir=DIR pdf documentation [DOCDIR]
1399 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001400_ACEOF
1401
1402 cat <<\_ACEOF
1403_ACEOF
1404fi
1405
1406if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001407 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001408 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001409 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001410 cat <<\_ACEOF
1411
1412Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001413 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1415 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001416 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001417 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --enable-framework[=INSTALLDIR]
1419 Build (MacOSX|Darwin) framework
1420 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001421 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001422 --enable-loadable-sqlite-extensions
1423 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --enable-ipv6 Enable ipv6 (with ipv4) support
1425 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001426 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428
1429Optional Packages:
1430 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1431 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001432 --with-universal-archs=ARCH
1433 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001434 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001435 --with-framework-name=FRAMEWORK
1436 specify an alternate name of the framework built
1437 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001439 --with-cxx-main=<compiler>
1440 compile main() and link python executable with C++
1441 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --with-suffix=.exe set executable suffix
1443 --with-pydebug build with Py_DEBUG defined
1444 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001445 --with-system-expat build pyexpat module using an installed expat
1446 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001447 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001448 --with-dbmliborder=db1:db2:...
1449 order to check db backends for dbm. Valid value is a
1450 colon separated string with the backend names
1451 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --with-signal-module disable/enable signal module
1453 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1454 --with(out)-threads[=DIRECTORY]
1455 disable/enable thread support
1456 --with(out)-thread[=DIRECTORY]
1457 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001458 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001459 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001461 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --with-fpectl enable SIGFPE catching
1463 --with-libm=STRING math library
1464 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001465 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001466 --with(out)-computed-gotos
1467 Use computed gotos in evaluation loop (enabled by
1468 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001469
1470Some influential environment variables:
1471 CC C compiler command
1472 CFLAGS C compiler flags
1473 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1474 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001476 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 CPP C preprocessor
1479
1480Use these variables to override the choices made by `configure' or to help
1481it to find libraries and programs with nonstandard names/locations.
1482
Georg Brandle2e15612009-05-20 18:25:10 +00001483Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001484_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001486fi
1487
1488if test "$ac_init_help" = "recursive"; then
1489 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 test -d "$ac_dir" ||
1492 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1493 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 ac_builddir=.
1495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496case "$ac_dir" in
1497.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1498*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001499 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001501 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 case $ac_top_builddir_sub in
1503 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1504 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1505 esac ;;
1506esac
1507ac_abs_top_builddir=$ac_pwd
1508ac_abs_builddir=$ac_pwd$ac_dir_suffix
1509# for backward compatibility:
1510ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001511
1512case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001513 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 ac_top_srcdir=$ac_top_builddir_sub
1516 ac_abs_top_srcdir=$ac_pwd ;;
1517 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519 ac_top_srcdir=$srcdir
1520 ac_abs_top_srcdir=$srcdir ;;
1521 *) # Relative name.
1522 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1523 ac_top_srcdir=$ac_top_build_prefix$srcdir
1524 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001525esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528 cd "$ac_dir" || { ac_status=$?; continue; }
1529 # Check for guested configure.
1530 if test -f "$ac_srcdir/configure.gnu"; then
1531 echo &&
1532 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1533 elif test -f "$ac_srcdir/configure"; then
1534 echo &&
1535 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001537 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538 fi || ac_status=$?
1539 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001540 done
1541fi
1542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001543test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001544if $ac_init_version; then
1545 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001546python configure 3.2
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001547generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001549Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001550This configure script is free software; the Free Software Foundation
1551gives unlimited permission to copy, distribute and modify it.
1552_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001555
1556## ------------------------ ##
1557## Autoconf initialization. ##
1558## ------------------------ ##
1559
1560# ac_fn_c_try_compile LINENO
1561# --------------------------
1562# Try to compile conftest.$ac_ext, and return whether this succeeded.
1563ac_fn_c_try_compile ()
1564{
1565 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1566 rm -f conftest.$ac_objext
1567 if { { ac_try="$ac_compile"
1568case "(($ac_try" in
1569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1570 *) ac_try_echo=$ac_try;;
1571esac
1572eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1573$as_echo "$ac_try_echo"; } >&5
1574 (eval "$ac_compile") 2>conftest.err
1575 ac_status=$?
1576 if test -s conftest.err; then
1577 grep -v '^ *+' conftest.err >conftest.er1
1578 cat conftest.er1 >&5
1579 mv -f conftest.er1 conftest.err
1580 fi
1581 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1582 test $ac_status = 0; } && {
1583 test -z "$ac_c_werror_flag" ||
1584 test ! -s conftest.err
1585 } && test -s conftest.$ac_objext; then :
1586 ac_retval=0
1587else
1588 $as_echo "$as_me: failed program was:" >&5
1589sed 's/^/| /' conftest.$ac_ext >&5
1590
1591 ac_retval=1
1592fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001593 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001594 as_fn_set_status $ac_retval
1595
1596} # ac_fn_c_try_compile
1597
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001598# ac_fn_c_try_link LINENO
1599# -----------------------
1600# Try to link conftest.$ac_ext, and return whether this succeeded.
1601ac_fn_c_try_link ()
1602{
1603 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1604 rm -f conftest.$ac_objext conftest$ac_exeext
1605 if { { ac_try="$ac_link"
1606case "(($ac_try" in
1607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1608 *) ac_try_echo=$ac_try;;
1609esac
1610eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1611$as_echo "$ac_try_echo"; } >&5
1612 (eval "$ac_link") 2>conftest.err
1613 ac_status=$?
1614 if test -s conftest.err; then
1615 grep -v '^ *+' conftest.err >conftest.er1
1616 cat conftest.er1 >&5
1617 mv -f conftest.er1 conftest.err
1618 fi
1619 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1620 test $ac_status = 0; } && {
1621 test -z "$ac_c_werror_flag" ||
1622 test ! -s conftest.err
1623 } && test -s conftest$ac_exeext && {
1624 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001625 test -x conftest$ac_exeext
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001626 }; then :
1627 ac_retval=0
1628else
1629 $as_echo "$as_me: failed program was:" >&5
1630sed 's/^/| /' conftest.$ac_ext >&5
1631
1632 ac_retval=1
1633fi
1634 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1635 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1636 # interfere with the next link command; also delete a directory that is
1637 # left behind by Apple's compiler. We do this before executing the actions.
1638 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001639 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001640 as_fn_set_status $ac_retval
1641
1642} # ac_fn_c_try_link
1643
Matthias Kloseb9621712010-04-24 17:59:49 +00001644# ac_fn_c_try_cpp LINENO
1645# ----------------------
1646# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1647ac_fn_c_try_cpp ()
1648{
1649 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1650 if { { ac_try="$ac_cpp conftest.$ac_ext"
1651case "(($ac_try" in
1652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1653 *) ac_try_echo=$ac_try;;
1654esac
1655eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1656$as_echo "$ac_try_echo"; } >&5
1657 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1658 ac_status=$?
1659 if test -s conftest.err; then
1660 grep -v '^ *+' conftest.err >conftest.er1
1661 cat conftest.er1 >&5
1662 mv -f conftest.er1 conftest.err
1663 fi
1664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001665 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001666 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1667 test ! -s conftest.err
1668 }; then :
1669 ac_retval=0
1670else
1671 $as_echo "$as_me: failed program was:" >&5
1672sed 's/^/| /' conftest.$ac_ext >&5
1673
1674 ac_retval=1
1675fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001676 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001677 as_fn_set_status $ac_retval
1678
1679} # ac_fn_c_try_cpp
1680
1681# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1682# -------------------------------------------------------
1683# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1684# the include files in INCLUDES and setting the cache variable VAR
1685# accordingly.
1686ac_fn_c_check_header_mongrel ()
1687{
1688 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Gregory P. Smith69140482012-01-16 02:05:55 -08001689 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1691$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001692if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001693 $as_echo_n "(cached) " >&6
1694fi
1695eval ac_res=\$$3
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1697$as_echo "$ac_res" >&6; }
1698else
1699 # Is the header compilable?
1700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1701$as_echo_n "checking $2 usability... " >&6; }
1702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1703/* end confdefs.h. */
1704$4
1705#include <$2>
1706_ACEOF
1707if ac_fn_c_try_compile "$LINENO"; then :
1708 ac_header_compiler=yes
1709else
1710 ac_header_compiler=no
1711fi
1712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1714$as_echo "$ac_header_compiler" >&6; }
1715
1716# Is the header present?
1717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1718$as_echo_n "checking $2 presence... " >&6; }
1719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1720/* end confdefs.h. */
1721#include <$2>
1722_ACEOF
1723if ac_fn_c_try_cpp "$LINENO"; then :
1724 ac_header_preproc=yes
1725else
1726 ac_header_preproc=no
1727fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001728rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1730$as_echo "$ac_header_preproc" >&6; }
1731
1732# So? What about this header?
1733case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1734 yes:no: )
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1736$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1738$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1739 ;;
1740 no:yes:* )
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1742$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1744$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1746$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1747 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1748$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1750$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001751( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001752## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001753## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001754 ) | sed "s/^/$as_me: WARNING: /" >&2
1755 ;;
1756esac
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1758$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001759if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 $as_echo_n "(cached) " >&6
1761else
1762 eval "$3=\$ac_header_compiler"
1763fi
1764eval ac_res=\$$3
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1766$as_echo "$ac_res" >&6; }
1767fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001768 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001769
1770} # ac_fn_c_check_header_mongrel
1771
1772# ac_fn_c_try_run LINENO
1773# ----------------------
1774# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1775# that executables *can* be run.
1776ac_fn_c_try_run ()
1777{
1778 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1779 if { { ac_try="$ac_link"
1780case "(($ac_try" in
1781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1782 *) ac_try_echo=$ac_try;;
1783esac
1784eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1785$as_echo "$ac_try_echo"; } >&5
1786 (eval "$ac_link") 2>&5
1787 ac_status=$?
1788 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1789 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1790 { { case "(($ac_try" in
1791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1792 *) ac_try_echo=$ac_try;;
1793esac
1794eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1795$as_echo "$ac_try_echo"; } >&5
1796 (eval "$ac_try") 2>&5
1797 ac_status=$?
1798 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1799 test $ac_status = 0; }; }; then :
1800 ac_retval=0
1801else
1802 $as_echo "$as_me: program exited with status $ac_status" >&5
1803 $as_echo "$as_me: failed program was:" >&5
1804sed 's/^/| /' conftest.$ac_ext >&5
1805
1806 ac_retval=$ac_status
1807fi
1808 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001809 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001810 as_fn_set_status $ac_retval
1811
1812} # ac_fn_c_try_run
1813
1814# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1815# -------------------------------------------------------
1816# Tests whether HEADER exists and can be compiled using the include files in
1817# INCLUDES, setting the cache variable VAR accordingly.
1818ac_fn_c_check_header_compile ()
1819{
1820 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1822$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001823if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001824 $as_echo_n "(cached) " >&6
1825else
1826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1827/* end confdefs.h. */
1828$4
1829#include <$2>
1830_ACEOF
1831if ac_fn_c_try_compile "$LINENO"; then :
1832 eval "$3=yes"
1833else
1834 eval "$3=no"
1835fi
1836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1837fi
1838eval ac_res=\$$3
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1840$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001841 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001842
1843} # ac_fn_c_check_header_compile
1844
Matthias Kloseb9621712010-04-24 17:59:49 +00001845# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1846# -------------------------------------------
1847# Tests whether TYPE exists after having included INCLUDES, setting cache
1848# variable VAR accordingly.
1849ac_fn_c_check_type ()
1850{
1851 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1853$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001854if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001855 $as_echo_n "(cached) " >&6
1856else
1857 eval "$3=no"
1858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1859/* end confdefs.h. */
1860$4
1861int
1862main ()
1863{
1864if (sizeof ($2))
1865 return 0;
1866 ;
1867 return 0;
1868}
1869_ACEOF
1870if ac_fn_c_try_compile "$LINENO"; then :
1871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1872/* end confdefs.h. */
1873$4
1874int
1875main ()
1876{
1877if (sizeof (($2)))
1878 return 0;
1879 ;
1880 return 0;
1881}
1882_ACEOF
1883if ac_fn_c_try_compile "$LINENO"; then :
1884
1885else
1886 eval "$3=yes"
1887fi
1888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1889fi
1890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1891fi
1892eval ac_res=\$$3
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1894$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001896
1897} # ac_fn_c_check_type
1898
1899# ac_fn_c_find_uintX_t LINENO BITS VAR
1900# ------------------------------------
1901# Finds an unsigned integer type with width BITS, setting cache variable VAR
1902# accordingly.
1903ac_fn_c_find_uintX_t ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1907$as_echo_n "checking for uint$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001908if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 $as_echo_n "(cached) " >&6
1910else
1911 eval "$3=no"
1912 # Order is important - never check a type that is potentially smaller
1913 # than half of the expected target width.
1914 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1915 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1917/* end confdefs.h. */
1918$ac_includes_default
1919int
1920main ()
1921{
1922static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001923test_array [0] = 0;
1924return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926 ;
1927 return 0;
1928}
1929_ACEOF
1930if ac_fn_c_try_compile "$LINENO"; then :
1931 case $ac_type in #(
1932 uint$2_t) :
1933 eval "$3=yes" ;; #(
1934 *) :
1935 eval "$3=\$ac_type" ;;
1936esac
1937fi
1938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001939 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001940
1941else
1942 break
1943fi
1944 done
1945fi
1946eval ac_res=\$$3
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001949 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001950
1951} # ac_fn_c_find_uintX_t
1952
1953# ac_fn_c_find_intX_t LINENO BITS VAR
1954# -----------------------------------
1955# Finds a signed integer type with width BITS, setting cache variable VAR
1956# accordingly.
1957ac_fn_c_find_intX_t ()
1958{
1959 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1961$as_echo_n "checking for int$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001962if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001963 $as_echo_n "(cached) " >&6
1964else
1965 eval "$3=no"
1966 # Order is important - never check a type that is potentially smaller
1967 # than half of the expected target width.
1968 for ac_type in int$2_t 'int' 'long int' \
1969 'long long int' 'short int' 'signed char'; do
1970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h. */
1972$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001973 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001974int
1975main ()
1976{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001977static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001978test_array [0] = 0;
1979return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001980
1981 ;
1982 return 0;
1983}
1984_ACEOF
1985if ac_fn_c_try_compile "$LINENO"; then :
1986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987/* end confdefs.h. */
1988$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001989 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001990int
1991main ()
1992{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001993static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001994 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001995test_array [0] = 0;
1996return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001997
1998 ;
1999 return 0;
2000}
2001_ACEOF
2002if ac_fn_c_try_compile "$LINENO"; then :
2003
2004else
2005 case $ac_type in #(
2006 int$2_t) :
2007 eval "$3=yes" ;; #(
2008 *) :
2009 eval "$3=\$ac_type" ;;
2010esac
2011fi
2012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2013fi
2014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002015 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002016
2017else
2018 break
2019fi
2020 done
2021fi
2022eval ac_res=\$$3
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2024$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002025 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002026
2027} # ac_fn_c_find_intX_t
2028
2029# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2030# --------------------------------------------
2031# Tries to find the compile-time value of EXPR in a program that includes
2032# INCLUDES, setting VAR accordingly. Returns whether the value could be
2033# computed
2034ac_fn_c_compute_int ()
2035{
2036 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2037 if test "$cross_compiling" = yes; then
2038 # Depending upon the size, compute the lo and hi bounds.
2039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002046test_array [0] = 0;
2047return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002048
2049 ;
2050 return 0;
2051}
2052_ACEOF
2053if ac_fn_c_try_compile "$LINENO"; then :
2054 ac_lo=0 ac_mid=0
2055 while :; do
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002063test_array [0] = 0;
2064return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002065
2066 ;
2067 return 0;
2068}
2069_ACEOF
2070if ac_fn_c_try_compile "$LINENO"; then :
2071 ac_hi=$ac_mid; break
2072else
2073 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2074 if test $ac_lo -le $ac_mid; then
2075 ac_lo= ac_hi=
2076 break
2077 fi
2078 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081 done
2082else
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002090test_array [0] = 0;
2091return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_hi=-1 ac_mid=-1
2099 while :; do
2100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101/* end confdefs.h. */
2102$4
2103int
2104main ()
2105{
2106static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002107test_array [0] = 0;
2108return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002109
2110 ;
2111 return 0;
2112}
2113_ACEOF
2114if ac_fn_c_try_compile "$LINENO"; then :
2115 ac_lo=$ac_mid; break
2116else
2117 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2118 if test $ac_mid -le $ac_hi; then
2119 ac_lo= ac_hi=
2120 break
2121 fi
2122 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125 done
2126else
2127 ac_lo= ac_hi=
2128fi
2129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2130fi
2131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132# Binary search between lo and hi bounds.
2133while test "x$ac_lo" != "x$ac_hi"; do
2134 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136/* end confdefs.h. */
2137$4
2138int
2139main ()
2140{
2141static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002142test_array [0] = 0;
2143return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002144
2145 ;
2146 return 0;
2147}
2148_ACEOF
2149if ac_fn_c_try_compile "$LINENO"; then :
2150 ac_hi=$ac_mid
2151else
2152 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2153fi
2154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2155done
2156case $ac_lo in #((
2157?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2158'') ac_retval=1 ;;
2159esac
2160 else
2161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162/* end confdefs.h. */
2163$4
2164static long int longval () { return $2; }
2165static unsigned long int ulongval () { return $2; }
2166#include <stdio.h>
2167#include <stdlib.h>
2168int
2169main ()
2170{
2171
2172 FILE *f = fopen ("conftest.val", "w");
2173 if (! f)
2174 return 1;
2175 if (($2) < 0)
2176 {
2177 long int i = longval ();
2178 if (i != ($2))
2179 return 1;
2180 fprintf (f, "%ld", i);
2181 }
2182 else
2183 {
2184 unsigned long int i = ulongval ();
2185 if (i != ($2))
2186 return 1;
2187 fprintf (f, "%lu", i);
2188 }
2189 /* Do not output a trailing newline, as this causes \r\n confusion
2190 on some platforms. */
2191 return ferror (f) || fclose (f) != 0;
2192
2193 ;
2194 return 0;
2195}
2196_ACEOF
2197if ac_fn_c_try_run "$LINENO"; then :
2198 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2199else
2200 ac_retval=1
2201fi
2202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2203 conftest.$ac_objext conftest.beam conftest.$ac_ext
2204rm -f conftest.val
2205
2206 fi
Gregory P. Smith69140482012-01-16 02:05:55 -08002207 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002208 as_fn_set_status $ac_retval
2209
2210} # ac_fn_c_compute_int
2211
2212# ac_fn_c_check_func LINENO FUNC VAR
2213# ----------------------------------
2214# Tests whether FUNC exists, setting the cache variable VAR accordingly
2215ac_fn_c_check_func ()
2216{
2217 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2219$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002220if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002221 $as_echo_n "(cached) " >&6
2222else
2223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224/* end confdefs.h. */
2225/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2226 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2227#define $2 innocuous_$2
2228
2229/* System header to define __stub macros and hopefully few prototypes,
2230 which can conflict with char $2 (); below.
2231 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2232 <limits.h> exists even on freestanding compilers. */
2233
2234#ifdef __STDC__
2235# include <limits.h>
2236#else
2237# include <assert.h>
2238#endif
2239
2240#undef $2
2241
2242/* Override any GCC internal prototype to avoid an error.
2243 Use char because int might match the return type of a GCC
2244 builtin and then its argument prototype would still apply. */
2245#ifdef __cplusplus
2246extern "C"
2247#endif
2248char $2 ();
2249/* The GNU C library defines this for functions which it implements
2250 to always fail with ENOSYS. Some functions are actually named
2251 something starting with __ and the normal name is an alias. */
2252#if defined __stub_$2 || defined __stub___$2
2253choke me
2254#endif
2255
2256int
2257main ()
2258{
2259return $2 ();
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_link "$LINENO"; then :
2265 eval "$3=yes"
2266else
2267 eval "$3=no"
2268fi
2269rm -f core conftest.err conftest.$ac_objext \
2270 conftest$ac_exeext conftest.$ac_ext
2271fi
2272eval ac_res=\$$3
2273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2274$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002275 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002276
2277} # ac_fn_c_check_func
2278
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002279# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2280# ---------------------------------------------
2281# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2282# accordingly.
2283ac_fn_c_check_decl ()
2284{
2285 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2286 as_decl_name=`echo $2|sed 's/ *(.*//'`
2287 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2289$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2290if eval \${$3+:} false; then :
2291 $as_echo_n "(cached) " >&6
2292else
2293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294/* end confdefs.h. */
2295$4
2296int
2297main ()
2298{
2299#ifndef $as_decl_name
2300#ifdef __cplusplus
2301 (void) $as_decl_use;
2302#else
2303 (void) $as_decl_name;
2304#endif
2305#endif
2306
2307 ;
2308 return 0;
2309}
2310_ACEOF
2311if ac_fn_c_try_compile "$LINENO"; then :
2312 eval "$3=yes"
2313else
2314 eval "$3=no"
2315fi
2316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2317fi
2318eval ac_res=\$$3
2319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2320$as_echo "$ac_res" >&6; }
2321 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2322
2323} # ac_fn_c_check_decl
2324
Matthias Kloseb9621712010-04-24 17:59:49 +00002325# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2326# ----------------------------------------------------
2327# Tries to find if the field MEMBER exists in type AGGR, after including
2328# INCLUDES, setting cache variable VAR accordingly.
2329ac_fn_c_check_member ()
2330{
2331 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2333$as_echo_n "checking for $2.$3... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002334if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002335 $as_echo_n "(cached) " >&6
2336else
2337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2338/* end confdefs.h. */
2339$5
2340int
2341main ()
2342{
2343static $2 ac_aggr;
2344if (ac_aggr.$3)
2345return 0;
2346 ;
2347 return 0;
2348}
2349_ACEOF
2350if ac_fn_c_try_compile "$LINENO"; then :
2351 eval "$4=yes"
2352else
2353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h. */
2355$5
2356int
2357main ()
2358{
2359static $2 ac_aggr;
2360if (sizeof ac_aggr.$3)
2361return 0;
2362 ;
2363 return 0;
2364}
2365_ACEOF
2366if ac_fn_c_try_compile "$LINENO"; then :
2367 eval "$4=yes"
2368else
2369 eval "$4=no"
2370fi
2371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2372fi
2373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2374fi
2375eval ac_res=\$$4
2376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2377$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002378 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002379
2380} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002382This file contains any messages produced by compilers while
2383running configure, to aid debugging if configure makes a mistake.
2384
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002385It was created by python $as_me 3.2, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002386generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002387
2388 $ $0 $@
2389
2390_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002391exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002392{
2393cat <<_ASUNAME
2394## --------- ##
2395## Platform. ##
2396## --------- ##
2397
2398hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2399uname -m = `(uname -m) 2>/dev/null || echo unknown`
2400uname -r = `(uname -r) 2>/dev/null || echo unknown`
2401uname -s = `(uname -s) 2>/dev/null || echo unknown`
2402uname -v = `(uname -v) 2>/dev/null || echo unknown`
2403
2404/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2405/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2406
2407/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2408/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2409/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002411/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2412/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2413/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2414
2415_ASUNAME
2416
2417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2418for as_dir in $PATH
2419do
2420 IFS=$as_save_IFS
2421 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002422 $as_echo "PATH: $as_dir"
2423 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002425
2426} >&5
2427
2428cat >&5 <<_ACEOF
2429
2430
2431## ----------- ##
2432## Core tests. ##
2433## ----------- ##
2434
2435_ACEOF
2436
2437
2438# Keep a trace of the command line.
2439# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002440# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002441# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002442# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002443ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002444ac_configure_args0=
2445ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002446ac_must_keep_next=false
2447for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002448do
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 for ac_arg
2450 do
2451 case $ac_arg in
2452 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2453 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2454 | -silent | --silent | --silen | --sile | --sil)
2455 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002457 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 esac
2459 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002461 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002463 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002464 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002465 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002466 case $ac_arg in
2467 *=* | --config-cache | -C | -disable-* | --disable-* \
2468 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2469 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2470 | -with-* | --with-* | -without-* | --without-* | --x)
2471 case "$ac_configure_args0 " in
2472 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2473 esac
2474 ;;
2475 -* ) ac_must_keep_next=true ;;
2476 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002477 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002479 ;;
2480 esac
2481 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002482done
Matthias Kloseb9621712010-04-24 17:59:49 +00002483{ ac_configure_args0=; unset ac_configure_args0;}
2484{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002485
2486# When interrupted or exit'd, cleanup temporary files, and complete
2487# config.log. We remove comments because anyway the quotes in there
2488# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489# WARNING: Use '\'' to represent an apostrophe within the trap.
2490# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002491trap 'exit_status=$?
2492 # Save into config.log some information that might help in debugging.
2493 {
2494 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002495
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002496 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002497## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002498## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 echo
2500 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501(
2502 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2503 eval ac_val=\$$ac_var
2504 case $ac_val in #(
2505 *${as_nl}*)
2506 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2508$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
2510 case $ac_var in #(
2511 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2513 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac ;;
2515 esac
2516 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2519 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 "s/'\''/'\''\\\\'\'''\''/g;
2522 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2523 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002524 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002526 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 esac |
2528 sort
2529)
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002531
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002532 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002533## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002534## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002535 echo
2536 for ac_var in $ac_subst_vars
2537 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 eval ac_val=\$$ac_var
2539 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002542 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 done | sort
2544 echo
2545
2546 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002547 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002549## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002550 echo
2551 for ac_var in $ac_subst_files
2552 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 eval ac_val=\$$ac_var
2554 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002555 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002557 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002558 done | sort
2559 echo
2560 fi
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002563 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002564## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002565## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 echo
2569 fi
2570 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002571 $as_echo "$as_me: caught signal $ac_signal"
2572 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002573 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574 rm -f core *.core core.conftest.* &&
2575 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002578for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002580done
2581ac_signal=0
2582
2583# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002585
Matthias Kloseb9621712010-04-24 17:59:49 +00002586$as_echo "/* confdefs.h */" > confdefs.h
2587
Martin v. Löwis11437992002-04-12 09:54:03 +00002588# Predefined preprocessor variables.
2589
2590cat >>confdefs.h <<_ACEOF
2591#define PACKAGE_NAME "$PACKAGE_NAME"
2592_ACEOF
2593
Martin v. Löwis11437992002-04-12 09:54:03 +00002594cat >>confdefs.h <<_ACEOF
2595#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2596_ACEOF
2597
Martin v. Löwis11437992002-04-12 09:54:03 +00002598cat >>confdefs.h <<_ACEOF
2599#define PACKAGE_VERSION "$PACKAGE_VERSION"
2600_ACEOF
2601
Martin v. Löwis11437992002-04-12 09:54:03 +00002602cat >>confdefs.h <<_ACEOF
2603#define PACKAGE_STRING "$PACKAGE_STRING"
2604_ACEOF
2605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606cat >>confdefs.h <<_ACEOF
2607#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2608_ACEOF
2609
Matthias Kloseb9621712010-04-24 17:59:49 +00002610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_URL "$PACKAGE_URL"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614
2615# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002616# Prefer an explicitly selected file to automatically selected ones.
2617ac_site_file1=NONE
2618ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002620 # We do not want a PATH search for config.site.
2621 case $CONFIG_SITE in #((
2622 -*) ac_site_file1=./$CONFIG_SITE;;
2623 */*) ac_site_file1=$CONFIG_SITE;;
2624 *) ac_site_file1=./$CONFIG_SITE;;
2625 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 ac_site_file1=$prefix/share/config.site
2628 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629else
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 ac_site_file1=$ac_default_prefix/share/config.site
2631 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002633for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634do
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 test "x$ac_site_file" = xNONE && continue
2636 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2638$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002640 . "$ac_site_file" \
2641 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2643as_fn_error $? "failed to load site script $ac_site_file
Gregory P. Smith69140482012-01-16 02:05:55 -08002644See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002645 fi
2646done
2647
2648if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 # Some versions of bash will fail to source /dev/null (special files
2650 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2651 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2653$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2656 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 esac
2658 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002659else
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2661$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 >$cache_file
2663fi
2664
2665# Check that the precious variables saved in the cache have kept the same
2666# value.
2667ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2670 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2672 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 case $ac_old_set,$ac_new_set in
2674 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2676$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 ac_cache_corrupted=: ;;
2678 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2680$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 ac_cache_corrupted=: ;;
2682 ,);;
2683 *)
2684 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 # differences in whitespace do not lead to failure.
2686 ac_old_val_w=`echo x $ac_old_val`
2687 ac_new_val_w=`echo x $ac_new_val`
2688 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2690$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2691 ac_cache_corrupted=:
2692 else
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2694$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2695 eval $ac_var=\$ac_old_val
2696 fi
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2698$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2700$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 fi;;
2702 esac
2703 # Pass precious variables to config.status.
2704 if test "$ac_new_set" = set; then
2705 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002706 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 *) ac_arg=$ac_var=$ac_new_val ;;
2708 esac
2709 case " $ac_configure_args " in
2710 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002711 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 esac
2713 fi
2714done
2715if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2719$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002720 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002722## -------------------- ##
2723## Main body of script. ##
2724## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725
Guido van Rossum7f43da71994-08-01 12:15:30 +00002726ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002727ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002728ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2729ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2730ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002731
Guido van Rossum627b2d71993-12-24 10:39:16 +00002732
Michael W. Hudson54241132001-12-07 15:38:26 +00002733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002734ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002735
2736
Martin v. Löwis11437992002-04-12 09:54:03 +00002737
Benjamin Petersond23f8222009-04-05 19:13:16 +00002738if test "$prefix" != "/"; then
2739 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2740fi
2741
2742
Martin v. Löwis11437992002-04-12 09:54:03 +00002743
2744
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002745# We don't use PACKAGE_ variables, and they cause conflicts
2746# with other autoconf-based packages that include Python.h
2747grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2748rm confdefs.h
2749mv confdefs.h.new confdefs.h
2750
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002751
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002752VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002753
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002754# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002755
2756SOVERSION=1.0
2757
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002758# The later defininition of _XOPEN_SOURCE disables certain features
2759# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2760
Matthias Kloseb9621712010-04-24 17:59:49 +00002761$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002762
2763
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002764# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2765# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2766# them.
2767
Matthias Kloseb9621712010-04-24 17:59:49 +00002768$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002769
2770
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002771# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2772# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2773# them.
2774
Matthias Kloseb9621712010-04-24 17:59:49 +00002775$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002776
2777
Martin v. Löwisd6320502004-08-12 13:45:08 +00002778# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2779# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2780
Matthias Kloseb9621712010-04-24 17:59:49 +00002781$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002782
2783
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002784# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2785# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2786# them.
2787
Matthias Kloseb9621712010-04-24 17:59:49 +00002788$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002789
2790
2791
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002792define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002793
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002794# Arguments passed to configure.
2795
2796CONFIG_ARGS="$ac_configure_args"
2797
Matthias Kloseb9621712010-04-24 17:59:49 +00002798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2799$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002800# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002801if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002802 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002803 case $enableval in
2804 yes)
2805 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002806 if test ! -d "${enableval}"
2807 then
2808 enableval=/
2809 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002810 ;;
2811 esac
2812 case $enableval in
2813 no)
2814 UNIVERSALSDK=
2815 enable_universalsdk=
2816 ;;
2817 *)
2818 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002819 if test ! -d "${UNIVERSALSDK}"
2820 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002821 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002822 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002823 ;;
2824 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002825
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002826
Thomas Wouters477c8d52006-05-27 19:21:47 +00002827else
2828
2829 UNIVERSALSDK=
2830 enable_universalsdk=
2831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002832fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002833
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002834if test -n "${UNIVERSALSDK}"
2835then
Matthias Kloseb9621712010-04-24 17:59:49 +00002836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2837$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002838else
Matthias Kloseb9621712010-04-24 17:59:49 +00002839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2840$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002841fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002843
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002844
2845
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002846UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002847
Matthias Kloseb9621712010-04-24 17:59:49 +00002848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2849$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002850
2851# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002852if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002853 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2855$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002856 UNIVERSAL_ARCHS="$withval"
2857
2858else
2859
Matthias Kloseb9621712010-04-24 17:59:49 +00002860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2861$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002862
2863fi
2864
2865
2866
2867
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002868
2869# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002870if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002871 withval=$with_framework_name;
2872 PYTHONFRAMEWORK=${withval}
2873 PYTHONFRAMEWORKDIR=${withval}.framework
2874 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2875
2876else
2877
2878 PYTHONFRAMEWORK=Python
2879 PYTHONFRAMEWORKDIR=Python.framework
2880 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2881
2882fi
2883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002884# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002885if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002886 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002887 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002888 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002889 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002890 esac
2891 case $enableval in
2892 no)
2893 PYTHONFRAMEWORK=
2894 PYTHONFRAMEWORKDIR=no-framework
2895 PYTHONFRAMEWORKPREFIX=
2896 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002897 FRAMEWORKINSTALLFIRST=
2898 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002899 FRAMEWORKALTINSTALLFIRST=
2900 FRAMEWORKALTINSTALLLAST=
2901 if test "x${prefix}" = "xNONE"; then
2902 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2903 else
2904 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2905 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002906 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002907 ;;
2908 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002909 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002910 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002911 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002912 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002913 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2914 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002915 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002916
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002917 if test "x${prefix}" = "xNONE" ; then
2918 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002919
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002920 else
2921 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2922 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002923
2924 case "${enableval}" in
2925 /System*)
2926 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2927 if test "${prefix}" = "NONE" ; then
2928 # See below
2929 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2930 fi
2931 ;;
2932
2933 /Library*)
2934 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2935 ;;
2936
2937 */Library/Frameworks)
2938 MDIR="`dirname "${enableval}"`"
2939 MDIR="`dirname "${MDIR}"`"
2940 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2941
2942 if test "${prefix}" = "NONE"; then
2943 # User hasn't specified the
2944 # --prefix option, but wants to install
2945 # the framework in a non-default location,
2946 # ensure that the compatibility links get
2947 # installed relative to that prefix as well
2948 # instead of in /usr/local.
2949 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2950 fi
2951 ;;
2952
2953 *)
2954 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2955 ;;
2956 esac
2957
Jack Jansen127e56e2001-09-11 14:41:54 +00002958 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002959
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002960 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002961 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002962 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002964 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002965
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002966 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2967
2968 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2969
Jack Jansene578a632001-08-15 01:27:14 +00002970 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002971
Guido van Rossum563e7081996-09-10 18:20:48 +00002972else
Martin v. Löwis11437992002-04-12 09:54:03 +00002973
Jack Jansene578a632001-08-15 01:27:14 +00002974 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002975 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002976 PYTHONFRAMEWORKPREFIX=
2977 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002978 FRAMEWORKINSTALLFIRST=
2979 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002980 FRAMEWORKALTINSTALLFIRST=
2981 FRAMEWORKALTINSTALLLAST=
2982 if test "x${prefix}" = "xNONE" ; then
2983 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2984 else
2985 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2986 fi
Jack Jansene578a632001-08-15 01:27:14 +00002987 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002988
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002990fi
2991
Thomas Wouters477c8d52006-05-27 19:21:47 +00002992
2993
Michael W. Hudson54241132001-12-07 15:38:26 +00002994
2995
2996
2997
Jack Jansene578a632001-08-15 01:27:14 +00002998
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002999
3000
3001
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003002
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003003
Jack Jansene578a632001-08-15 01:27:14 +00003004##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003005## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003006## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003007##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003008# Set name for machine-dependent library files
3009
Matthias Kloseb9621712010-04-24 17:59:49 +00003010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3011$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003012if test -z "$MACHDEP"
3013then
Guido van Rossum563e7081996-09-10 18:20:48 +00003014 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003015 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003016 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003017 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003018 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003019 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003020 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003021 ac_md_system=`echo $ac_sys_system |
3022 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3023 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003024 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003025 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003026
Guido van Rossum07397971997-04-29 21:49:50 +00003027 case $MACHDEP in
Victor Stinner0c17d0d2011-08-20 14:01:05 +02003028 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003029 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003030 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003031 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003032 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003033 esac
3034fi
Guido van Rossum91922671997-10-09 20:24:13 +00003035
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003036# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3037# disable features if it is defined, without any means to access these
3038# features as extensions. For these systems, we skip the definition of
3039# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3040# some feature, make sure there is no alternative way to access this
3041# feature. Also, when using wildcards, make sure you have verified the
3042# need for not defining _XOPEN_SOURCE on all systems matching the
3043# wildcard, and that the wildcard does not include future systems
3044# (which may remove their limitations).
3045case $ac_sys_system/$ac_sys_release in
3046 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3047 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003048 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003049 # In addition, Stefan Krah confirms that issue #1244610 exists through
3050 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003051 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003052 define_xopen_source=no
3053 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3054 # also defined. This can be overridden by defining _BSD_SOURCE
3055 # As this has a different meaning on Linux, only define it on OpenBSD
3056
Matthias Kloseb9621712010-04-24 17:59:49 +00003057$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003058
3059 ;;
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003060 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003061 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3062 # also defined. This can be overridden by defining _BSD_SOURCE
3063 # As this has a different meaning on Linux, only define it on OpenBSD
3064
Matthias Kloseb9621712010-04-24 17:59:49 +00003065$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003066
3067 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003068 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3069 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3070 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003071 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003072 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003073 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3074 # request to enable features supported by the standard as a request
3075 # to disable features not supported by the standard. The best way
3076 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3077 # entirely and define __EXTENSIONS__ instead.
3078 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003079 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003080 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3081 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003082 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003083 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003084 define_xopen_source=no;;
3085 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003086 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003087 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003088 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003089 # On FreeBSD 4, the math functions C89 does not cover are never defined
3090 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3091 FreeBSD/4.*)
3092 define_xopen_source=no;;
3093 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3094 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3095 # identifies itself as Darwin/7.*
3096 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3097 # disables platform specific features beyond repair.
3098 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3099 # has no effect, don't bother defining them
3100 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003101 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003102 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003103 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003104 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3105 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3106 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003107 AIX/4)
3108 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003109 AIX/5)
3110 if test `uname -r` -eq 1; then
3111 define_xopen_source=no
3112 fi
3113 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003114 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3115 # defining NI_NUMERICHOST.
3116 QNX/6.3.2)
3117 define_xopen_source=no
3118 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003119
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003120esac
3121
3122if test $define_xopen_source = yes
3123then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003124
Matthias Kloseb9621712010-04-24 17:59:49 +00003125$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003126
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003127
3128 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3129 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3130 # several APIs are not declared. Since this is also needed in some
3131 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003132
Matthias Kloseb9621712010-04-24 17:59:49 +00003133$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003134
3135
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003136
Matthias Kloseb9621712010-04-24 17:59:49 +00003137$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003138
3139
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003140fi
3141
Guido van Rossum91922671997-10-09 20:24:13 +00003142#
3143# SGI compilers allow the specification of the both the ABI and the
3144# ISA on the command line. Depending on the values of these switches,
3145# different and often incompatable code will be generated.
3146#
3147# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3148# thus supply support for various ABI/ISA combinations. The MACHDEP
3149# variable is also adjusted.
3150#
3151
3152if test ! -z "$SGI_ABI"
3153then
3154 CC="cc $SGI_ABI"
3155 LDFLAGS="$SGI_ABI $LDFLAGS"
3156 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3159$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003160
Jack Jansen6b08a402004-06-03 12:41:45 +00003161# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3162# it may influence the way we can build extensions, so distutils
3163# needs to check it
3164
Thomas Wouters477c8d52006-05-27 19:21:47 +00003165
Jack Jansen6b08a402004-06-03 12:41:45 +00003166CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003167EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003168
Matthias Kloseb9621712010-04-24 17:59:49 +00003169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3170$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003171ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3173$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003174
Guido van Rossum627b2d71993-12-24 10:39:16 +00003175# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003176
3177# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3178# for debug/optimization stuff. BASECFLAGS is for flags that are required
3179# just to get things to compile and link. Users are free to override OPT
3180# when running configure or make. The build should not break if they do.
3181# BASECFLAGS should generally not be messed with, however.
3182
3183# XXX shouldn't some/most/all of this code be merged with the stuff later
3184# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3186$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003187
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003188# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003189if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003191 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003192 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003193 without_gcc=yes;;
3194 yes) CC=gcc
3195 without_gcc=no;;
3196 *) CC=$withval
3197 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003198 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003199else
Martin v. Löwis11437992002-04-12 09:54:03 +00003200
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003201 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003202 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003203 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003204 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003205 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003206fi
3207
Matthias Kloseb9621712010-04-24 17:59:49 +00003208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3209$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003210
Guido van Rossum8b131c51995-03-09 14:10:13 +00003211# If the user switches compilers, we can't believe the cache
3212if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3213then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003214 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003215(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003216fi
3217
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003218# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3219# when the compiler supports them, but we don't always want -O2, and
3220# we set -g later.
3221if test -z "$CFLAGS"; then
3222 CFLAGS=
3223fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003224ac_ext=c
3225ac_cpp='$CPP $CPPFLAGS'
3226ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3227ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3228ac_compiler_gnu=$ac_cv_c_compiler_gnu
3229if test -n "$ac_tool_prefix"; then
3230 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3231set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3233$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003234if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003235 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003236else
3237 if test -n "$CC"; then
3238 ac_cv_prog_CC="$CC" # Let the user override the test.
3239else
Martin v. Löwis11437992002-04-12 09:54:03 +00003240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3241for as_dir in $PATH
3242do
3243 IFS=$as_save_IFS
3244 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003245 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003246 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003247 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003248 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003249 break 2
3250 fi
3251done
Matthias Kloseb9621712010-04-24 17:59:49 +00003252 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003254
Jack Jansendd19cf82001-12-06 22:36:17 +00003255fi
3256fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003257CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003258if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3260$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003261else
Matthias Kloseb9621712010-04-24 17:59:49 +00003262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3263$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003264fi
3265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003266
Martin v. Löwis11437992002-04-12 09:54:03 +00003267fi
3268if test -z "$ac_cv_prog_CC"; then
3269 ac_ct_CC=$CC
3270 # Extract the first word of "gcc", so it can be a program name with args.
3271set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3273$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003274if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003275 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003276else
3277 if test -n "$ac_ct_CC"; then
3278 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3279else
3280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3281for as_dir in $PATH
3282do
3283 IFS=$as_save_IFS
3284 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003285 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003286 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003287 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003289 break 2
3290 fi
3291done
Matthias Kloseb9621712010-04-24 17:59:49 +00003292 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003293IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003294
3295fi
3296fi
3297ac_ct_CC=$ac_cv_prog_ac_ct_CC
3298if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3300$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003301else
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3303$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003304fi
3305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003306 if test "x$ac_ct_CC" = x; then
3307 CC=""
3308 else
3309 case $cross_compiling:$ac_tool_warned in
3310yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003311{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3312$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003313ac_tool_warned=yes ;;
3314esac
3315 CC=$ac_ct_CC
3316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003317else
3318 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003319fi
3320
Jack Jansendd19cf82001-12-06 22:36:17 +00003321if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003322 if test -n "$ac_tool_prefix"; then
3323 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003324set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3326$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003327if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003328 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003329else
3330 if test -n "$CC"; then
3331 ac_cv_prog_CC="$CC" # Let the user override the test.
3332else
Martin v. Löwis11437992002-04-12 09:54:03 +00003333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3334for as_dir in $PATH
3335do
3336 IFS=$as_save_IFS
3337 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003338 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003339 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003340 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003341 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003342 break 2
3343 fi
3344done
Matthias Kloseb9621712010-04-24 17:59:49 +00003345 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003346IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003347
3348fi
3349fi
3350CC=$ac_cv_prog_CC
3351if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3353$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003354else
Matthias Kloseb9621712010-04-24 17:59:49 +00003355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3356$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003357fi
3358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003359
Martin v. Löwis11437992002-04-12 09:54:03 +00003360 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003361fi
3362if test -z "$CC"; then
3363 # Extract the first word of "cc", so it can be a program name with args.
3364set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3366$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003367if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003368 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003369else
3370 if test -n "$CC"; then
3371 ac_cv_prog_CC="$CC" # Let the user override the test.
3372else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003373 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3375for as_dir in $PATH
3376do
3377 IFS=$as_save_IFS
3378 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003379 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003380 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003381 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3382 ac_prog_rejected=yes
3383 continue
3384 fi
3385 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003386 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 break 2
3388 fi
3389done
Matthias Kloseb9621712010-04-24 17:59:49 +00003390 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003391IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003392
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003393if test $ac_prog_rejected = yes; then
3394 # We found a bogon in the path, so make sure we never use it.
3395 set dummy $ac_cv_prog_CC
3396 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003397 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003398 # We chose a different compiler from the bogus one.
3399 # However, it has the same basename, so the bogon will be chosen
3400 # first if we set CC to just the basename; use the full file name.
3401 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003402 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003403 fi
3404fi
3405fi
3406fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003407CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003408if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3410$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003411else
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3413$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003414fi
3415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003416
Martin v. Löwis11437992002-04-12 09:54:03 +00003417fi
3418if test -z "$CC"; then
3419 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003420 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003421 do
3422 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3423set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3425$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003426if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003427 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003428else
3429 if test -n "$CC"; then
3430 ac_cv_prog_CC="$CC" # Let the user override the test.
3431else
Martin v. Löwis11437992002-04-12 09:54:03 +00003432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3433for as_dir in $PATH
3434do
3435 IFS=$as_save_IFS
3436 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003437 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003438 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003442 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003443done
Matthias Kloseb9621712010-04-24 17:59:49 +00003444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003445IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003446
3447fi
3448fi
3449CC=$ac_cv_prog_CC
3450if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3452$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003453else
Matthias Kloseb9621712010-04-24 17:59:49 +00003454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3455$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003456fi
3457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458
Martin v. Löwis11437992002-04-12 09:54:03 +00003459 test -n "$CC" && break
3460 done
3461fi
3462if test -z "$CC"; then
3463 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003465do
3466 # Extract the first word of "$ac_prog", so it can be a program name with args.
3467set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3469$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003470if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003471 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003472else
3473 if test -n "$ac_ct_CC"; then
3474 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3475else
3476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3477for as_dir in $PATH
3478do
3479 IFS=$as_save_IFS
3480 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003481 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003482 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003484 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 break 2
3486 fi
3487done
Matthias Kloseb9621712010-04-24 17:59:49 +00003488 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003490
Martin v. Löwis11437992002-04-12 09:54:03 +00003491fi
3492fi
3493ac_ct_CC=$ac_cv_prog_ac_ct_CC
3494if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3496$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003497else
Matthias Kloseb9621712010-04-24 17:59:49 +00003498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3499$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003500fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003502
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 test -n "$ac_ct_CC" && break
3504done
Michael W. Hudson54241132001-12-07 15:38:26 +00003505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003506 if test "x$ac_ct_CC" = x; then
3507 CC=""
3508 else
3509 case $cross_compiling:$ac_tool_warned in
3510yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003511{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3512$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003513ac_tool_warned=yes ;;
3514esac
3515 CC=$ac_ct_CC
3516 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003517fi
3518
3519fi
3520
3521
Matthias Kloseb9621712010-04-24 17:59:49 +00003522test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3523$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003524as_fn_error $? "no acceptable C compiler found in \$PATH
Gregory P. Smith69140482012-01-16 02:05:55 -08003525See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003526
3527# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003528$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3529set X $ac_compile
3530ac_compiler=$2
3531for ac_option in --version -v -V -qversion; do
3532 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533case "(($ac_try" in
3534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3535 *) ac_try_echo=$ac_try;;
3536esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003537eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3538$as_echo "$ac_try_echo"; } >&5
3539 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003541 if test -s conftest.err; then
3542 sed '10a\
3543... rest of stderr output deleted ...
3544 10q' conftest.err >conftest.er1
3545 cat conftest.er1 >&5
3546 fi
3547 rm -f conftest.er1 conftest.err
3548 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3549 test $ac_status = 0; }
3550done
Martin v. Löwis11437992002-04-12 09:54:03 +00003551
Matthias Kloseb9621712010-04-24 17:59:49 +00003552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003553/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003554
Martin v. Löwis11437992002-04-12 09:54:03 +00003555int
3556main ()
3557{
3558
3559 ;
3560 return 0;
3561}
3562_ACEOF
3563ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003564ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003565# Try to create an executable without -o first, disregard a.out.
3566# It will help us diagnose broken compilers, and finding out an intuition
3567# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3569$as_echo_n "checking whether the C compiler works... " >&6; }
3570ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3571
3572# The possible output files:
3573ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003575ac_rmfiles=
3576for ac_file in $ac_files
3577do
3578 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3581 esac
3582done
3583rm -f $ac_rmfiles
3584
Matthias Kloseb9621712010-04-24 17:59:49 +00003585if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003586case "(($ac_try" in
3587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3588 *) ac_try_echo=$ac_try;;
3589esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003590eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3591$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003592 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3595 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003596 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3597# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3598# in a Makefile. We should not override ac_cv_exeext if it was cached,
3599# so that the user can short-circuit this test for compilers unknown to
3600# Autoconf.
3601for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003602do
3603 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003606 ;;
3607 [ab].out )
3608 # We found the default executable, but exeext='' is most
3609 # certainly right.
3610 break;;
3611 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613 then :; else
3614 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3615 fi
3616 # We set ac_cv_exeext here because the later test for it is not
3617 # safe: cross compilers may not add the suffix if given an `-o'
3618 # argument, so we may need to know it at that point already.
3619 # Even if this section looks crufty: it has the advantage of
3620 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003621 break;;
3622 * )
3623 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 esac
3625done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626test "$ac_cv_exeext" = no && ac_cv_exeext=
3627
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003628else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629 ac_file=''
3630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003631if test -z "$ac_file"; then :
3632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3633$as_echo "no" >&6; }
3634$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003635sed 's/^/| /' conftest.$ac_ext >&5
3636
Matthias Kloseb9621712010-04-24 17:59:49 +00003637{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003639as_fn_error 77 "C compiler cannot create executables
Gregory P. Smith69140482012-01-16 02:05:55 -08003640See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003641else
3642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3643$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3646$as_echo_n "checking for C compiler default output file name... " >&6; }
3647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3648$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003649ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003650
Matthias Kloseb9621712010-04-24 17:59:49 +00003651rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003652ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3654$as_echo_n "checking for suffix of executables... " >&6; }
3655if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656case "(($ac_try" in
3657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3658 *) ac_try_echo=$ac_try;;
3659esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3661$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003663 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3665 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003666 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3667# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3668# work properly (i.e., refer to `conftest.exe'), while it won't with
3669# `rm'.
3670for ac_file in conftest.exe conftest conftest.*; do
3671 test -f "$ac_file" || continue
3672 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003674 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3675 break;;
3676 * ) break;;
3677 esac
3678done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003679else
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003682as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Gregory P. Smith69140482012-01-16 02:05:55 -08003683See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003685rm -f conftest conftest$ac_cv_exeext
3686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3687$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003688
3689rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003690EXEEXT=$ac_cv_exeext
3691ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3693/* end confdefs.h. */
3694#include <stdio.h>
3695int
3696main ()
3697{
3698FILE *f = fopen ("conftest.out", "w");
3699 return ferror (f) || fclose (f) != 0;
3700
3701 ;
3702 return 0;
3703}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003705ac_clean_files="$ac_clean_files conftest.out"
3706# Check that the compiler produces executables we can run. If not, either
3707# the compiler is broken, or we cross compile.
3708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3709$as_echo_n "checking whether we are cross compiling... " >&6; }
3710if test "$cross_compiling" != yes; then
3711 { { ac_try="$ac_link"
3712case "(($ac_try" in
3713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3714 *) ac_try_echo=$ac_try;;
3715esac
3716eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3717$as_echo "$ac_try_echo"; } >&5
3718 (eval "$ac_link") 2>&5
3719 ac_status=$?
3720 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3721 test $ac_status = 0; }
3722 if { ac_try='./conftest$ac_cv_exeext'
3723 { { case "(($ac_try" in
3724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3725 *) ac_try_echo=$ac_try;;
3726esac
3727eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3728$as_echo "$ac_try_echo"; } >&5
3729 (eval "$ac_try") 2>&5
3730 ac_status=$?
3731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3732 test $ac_status = 0; }; }; then
3733 cross_compiling=no
3734 else
3735 if test "$cross_compiling" = maybe; then
3736 cross_compiling=yes
3737 else
3738 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3739$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003740as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003741If you meant to cross compile, use \`--host'.
Gregory P. Smith69140482012-01-16 02:05:55 -08003742See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 fi
3744 fi
3745fi
3746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3747$as_echo "$cross_compiling" >&6; }
3748
3749rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3750ac_clean_files=$ac_clean_files_save
3751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3752$as_echo_n "checking for suffix of object files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003753if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 $as_echo_n "(cached) " >&6
3755else
3756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003757/* end confdefs.h. */
3758
3759int
3760main ()
3761{
3762
3763 ;
3764 return 0;
3765}
3766_ACEOF
3767rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003768if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769case "(($ac_try" in
3770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3771 *) ac_try_echo=$ac_try;;
3772esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3774$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3778 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003779 for ac_file in conftest.o conftest.obj conftest.*; do
3780 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3784 break;;
3785 esac
3786done
3787else
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003789sed 's/^/| /' conftest.$ac_ext >&5
3790
Matthias Kloseb9621712010-04-24 17:59:49 +00003791{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003793as_fn_error $? "cannot compute suffix of object files: cannot compile
Gregory P. Smith69140482012-01-16 02:05:55 -08003794See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003795fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003796rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3799$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003800OBJEXT=$ac_cv_objext
3801ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3803$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003804if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003806else
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003809
Martin v. Löwis11437992002-04-12 09:54:03 +00003810int
3811main ()
3812{
3813#ifndef __GNUC__
3814 choke me
3815#endif
3816
3817 ;
3818 return 0;
3819}
3820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003821if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003822 ac_compiler_gnu=yes
3823else
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003827ac_cv_c_compiler_gnu=$ac_compiler_gnu
3828
3829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3831$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3832if test $ac_compiler_gnu = yes; then
3833 GCC=yes
3834else
3835 GCC=
3836fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003837ac_test_CFLAGS=${CFLAGS+set}
3838ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3840$as_echo_n "checking whether $CC accepts -g... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003841if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003843else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844 ac_save_c_werror_flag=$ac_c_werror_flag
3845 ac_c_werror_flag=yes
3846 ac_cv_prog_cc_g=no
3847 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003850
Martin v. Löwis11437992002-04-12 09:54:03 +00003851int
3852main ()
3853{
3854
3855 ;
3856 return 0;
3857}
3858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003859if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003860 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861else
Matthias Kloseb9621712010-04-24 17:59:49 +00003862 CFLAGS=""
3863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864/* end confdefs.h. */
3865
3866int
3867main ()
3868{
3869
3870 ;
3871 return 0;
3872}
3873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003874if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003875
Matthias Kloseb9621712010-04-24 17:59:49 +00003876else
3877 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880/* end confdefs.h. */
3881
3882int
3883main ()
3884{
3885
3886 ;
3887 return 0;
3888}
3889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003890if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3898 ac_c_werror_flag=$ac_save_c_werror_flag
3899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3901$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003902if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003903 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003904elif test $ac_cv_prog_cc_g = yes; then
3905 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003906 CFLAGS="-g -O2"
3907 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003908 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003909 fi
3910else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003911 if test "$GCC" = yes; then
3912 CFLAGS="-O2"
3913 else
3914 CFLAGS=
3915 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3918$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003919if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003921else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003923ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003925/* end confdefs.h. */
3926#include <stdarg.h>
3927#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003928struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00003929/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3930struct buf { int x; };
3931FILE * (*rcsopen) (struct buf *, struct stat *, int);
3932static char *e (p, i)
3933 char **p;
3934 int i;
3935{
3936 return p[i];
3937}
3938static char *f (char * (*g) (char **, int), char **p, ...)
3939{
3940 char *s;
3941 va_list v;
3942 va_start (v,p);
3943 s = g (p, va_arg (v,int));
3944 va_end (v);
3945 return s;
3946}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003947
3948/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3949 function prototypes and stuff, but not '\xHH' hex character constants.
3950 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003952 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3953 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003955int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3958 inside strings and character constants. */
3959#define FOO(x) 'x'
3960int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3961
Skip Montanaro6dead952003-09-25 14:50:04 +00003962int test (int i, double x);
3963struct s1 {int (*f) (int a);};
3964struct s2 {int (*f) (double a);};
3965int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3966int argc;
3967char **argv;
3968int
3969main ()
3970{
3971return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3972 ;
3973 return 0;
3974}
3975_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3977 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003978do
3979 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983rm -f core conftest.err conftest.$ac_objext
3984 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003985done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003987CC=$ac_save_CC
3988
3989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003990# AC_CACHE_VAL
3991case "x$ac_cv_prog_cc_c89" in
3992 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3994$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3997$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003998 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003999 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4001$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004002esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004003if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004004
Matthias Kloseb9621712010-04-24 17:59:49 +00004005fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004006
Martin v. Löwis11437992002-04-12 09:54:03 +00004007ac_ext=c
4008ac_cpp='$CPP $CPPFLAGS'
4009ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4010ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4011ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004012
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004013
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004014
4015
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4017$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004018
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004020if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004022
4023 case $withval in
4024 no) with_cxx_main=no
4025 MAINCC='$(CC)';;
4026 yes) with_cxx_main=yes
4027 MAINCC='$(CXX)';;
4028 *) with_cxx_main=yes
4029 MAINCC=$withval
4030 if test -z "$CXX"
4031 then
4032 CXX=$withval
4033 fi;;
4034 esac
4035else
4036
4037 with_cxx_main=no
4038 MAINCC='$(CC)'
4039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040fi
4041
Matthias Kloseb9621712010-04-24 17:59:49 +00004042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4043$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004044
4045preset_cxx="$CXX"
4046if test -z "$CXX"
4047then
4048 case "$CC" in
4049 gcc) # Extract the first word of "g++", so it can be a program name with args.
4050set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4052$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004053if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004054 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004055else
4056 case $CXX in
4057 [\\/]* | ?:[\\/]*)
4058 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4059 ;;
4060 *)
4061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4062for as_dir in notfound
4063do
4064 IFS=$as_save_IFS
4065 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004067 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004068 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004070 break 2
4071 fi
4072done
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004075
4076 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4077 ;;
4078esac
4079fi
4080CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004081if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4083$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004084else
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4086$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004089 ;;
4090 cc) # Extract the first word of "c++", so it can be a program name with args.
4091set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4093$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004094if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004095 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004096else
4097 case $CXX in
4098 [\\/]* | ?:[\\/]*)
4099 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4100 ;;
4101 *)
4102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4103for as_dir in notfound
4104do
4105 IFS=$as_save_IFS
4106 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004107 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004108 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004109 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004111 break 2
4112 fi
4113done
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004115IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004116
4117 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4118 ;;
4119esac
4120fi
4121CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004122if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4124$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004125else
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4127$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004130 ;;
4131 esac
4132 if test "$CXX" = "notfound"
4133 then
4134 CXX=""
4135 fi
4136fi
4137if test -z "$CXX"
4138then
4139 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4140do
4141 # Extract the first word of "$ac_prog", so it can be a program name with args.
4142set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4144$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004145if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004147else
4148 if test -n "$CXX"; then
4149 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4150else
4151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4152for as_dir in $PATH
4153do
4154 IFS=$as_save_IFS
4155 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004157 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004158 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004160 break 2
4161 fi
4162done
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004164IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004165
4166fi
4167fi
4168CXX=$ac_cv_prog_CXX
4169if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4171$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004172else
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4174$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004175fi
4176
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004177
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004178 test -n "$CXX" && break
4179done
4180test -n "$CXX" || CXX="notfound"
4181
4182 if test "$CXX" = "notfound"
4183 then
4184 CXX=""
4185 fi
4186fi
4187if test "$preset_cxx" != "$CXX"
4188then
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004190
4191 By default, distutils will build C++ extension modules with \"$CXX\".
4192 If this is not intended, then set CXX on the configure command line.
4193 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004194$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004195
4196 By default, distutils will build C++ extension modules with \"$CXX\".
4197 If this is not intended, then set CXX on the configure command line.
4198 " >&2;}
4199fi
4200
4201
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4203$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4204save_LDFLAGS="$LDFLAGS"
4205LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004206
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4208/* end confdefs.h. */
4209
4210int
4211main ()
4212{
4213
4214 ;
4215 return 0;
4216}
4217_ACEOF
4218if ac_fn_c_try_link "$LINENO"; then :
4219 NO_AS_NEEDED="-Wl,--no-as-needed"
4220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4221$as_echo "yes" >&6; }
4222else
4223 NO_AS_NEEDED=""
4224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4225$as_echo "no" >&6; }
4226fi
4227rm -f core conftest.err conftest.$ac_objext \
4228 conftest$ac_exeext conftest.$ac_ext
4229LDFLAGS="$save_LDFLAGS"
4230
4231
4232
4233# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004234ac_ext=c
4235ac_cpp='$CPP $CPPFLAGS'
4236ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4237ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4238ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4240$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004241# On Suns, sometimes $CPP names a directory.
4242if test -n "$CPP" && test -d "$CPP"; then
4243 CPP=
4244fi
4245if test -z "$CPP"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08004246 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004247 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004248else
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 # Double quotes because CPP needs to be expanded
4250 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4251 do
4252 ac_preproc_ok=false
4253for ac_c_preproc_warn_flag in '' yes
4254do
4255 # Use a header file that comes with gcc, so configuring glibc
4256 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004257 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4258 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004259 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004262/* end confdefs.h. */
4263#ifdef __STDC__
4264# include <limits.h>
4265#else
4266# include <assert.h>
4267#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004268 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004270if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004271
Matthias Kloseb9621712010-04-24 17:59:49 +00004272else
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # Broken: fails on valid input.
4274continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004275fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004276rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004277
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004282#include <ac_nonexistent.h>
4283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004284if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004285 # Broken: success on invalid input.
4286continue
4287else
Martin v. Löwis11437992002-04-12 09:54:03 +00004288 # Passes both tests.
4289ac_preproc_ok=:
4290break
4291fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004292rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004293
4294done
4295# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004296rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004297if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004298 break
4299fi
4300
4301 done
4302 ac_cv_prog_CPP=$CPP
4303
4304fi
4305 CPP=$ac_cv_prog_CPP
4306else
4307 ac_cv_prog_CPP=$CPP
4308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4310$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004311ac_preproc_ok=false
4312for ac_c_preproc_warn_flag in '' yes
4313do
4314 # Use a header file that comes with gcc, so configuring glibc
4315 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004316 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4317 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004318 # On the NeXT, cc -E runs the code through the compiler's parser,
4319 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004321/* end confdefs.h. */
4322#ifdef __STDC__
4323# include <limits.h>
4324#else
4325# include <assert.h>
4326#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004327 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004329if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004330
Matthias Kloseb9621712010-04-24 17:59:49 +00004331else
Martin v. Löwis11437992002-04-12 09:54:03 +00004332 # Broken: fails on valid input.
4333continue
4334fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004335rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004338 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004341#include <ac_nonexistent.h>
4342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004343if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 # Broken: success on invalid input.
4345continue
4346else
Martin v. Löwis11437992002-04-12 09:54:03 +00004347 # Passes both tests.
4348ac_preproc_ok=:
4349break
4350fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004351rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004352
4353done
4354# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004355rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004356if $ac_preproc_ok; then :
4357
Martin v. Löwis11437992002-04-12 09:54:03 +00004358else
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4360$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004361as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Gregory P. Smith69140482012-01-16 02:05:55 -08004362See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004363fi
4364
4365ac_ext=c
4366ac_cpp='$CPP $CPPFLAGS'
4367ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4368ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4369ac_compiler_gnu=$ac_cv_c_compiler_gnu
4370
4371
Matthias Kloseb9621712010-04-24 17:59:49 +00004372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4373$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004374if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004376else
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 # Loop through the user's path and test for each of PROGNAME-LIST
4380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4382do
4383 IFS=$as_save_IFS
4384 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 for ac_prog in grep ggrep; do
4386 for ac_exec_ext in '' $ac_executable_extensions; do
4387 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004388 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004389# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390 # Check for GNU $ac_path_GREP
4391case `"$ac_path_GREP" --version 2>&1` in
4392*GNU*)
4393 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4394*)
4395 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004396 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397 while :
4398 do
4399 cat "conftest.in" "conftest.in" >"conftest.tmp"
4400 mv "conftest.tmp" "conftest.in"
4401 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004403 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4404 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4407 # Best one so far, save it but keep looking for a better one
4408 ac_cv_path_GREP="$ac_path_GREP"
4409 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004410 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411 # 10*(2^10) chars as input seems more than enough
4412 test $ac_count -gt 10 && break
4413 done
4414 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4415esac
4416
Matthias Kloseb9621712010-04-24 17:59:49 +00004417 $ac_path_GREP_found && break 3
4418 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004419 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004420 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004422 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004423 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004424 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004425else
4426 ac_cv_path_GREP=$GREP
4427fi
4428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4431$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004432 GREP="$ac_cv_path_GREP"
4433
4434
Matthias Kloseb9621712010-04-24 17:59:49 +00004435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4436$as_echo_n "checking for egrep... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004437if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004438 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439else
4440 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4441 then ac_cv_path_EGREP="$GREP -E"
4442 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004443 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004444 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 # Loop through the user's path and test for each of PROGNAME-LIST
4446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004447for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4448do
4449 IFS=$as_save_IFS
4450 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004451 for ac_prog in egrep; do
4452 for ac_exec_ext in '' $ac_executable_extensions; do
4453 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004454 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004455# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004456 # Check for GNU $ac_path_EGREP
4457case `"$ac_path_EGREP" --version 2>&1` in
4458*GNU*)
4459 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4460*)
4461 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004462 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004463 while :
4464 do
4465 cat "conftest.in" "conftest.in" >"conftest.tmp"
4466 mv "conftest.tmp" "conftest.in"
4467 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004468 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004469 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4470 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004471 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004472 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4473 # Best one so far, save it but keep looking for a better one
4474 ac_cv_path_EGREP="$ac_path_EGREP"
4475 ac_path_EGREP_max=$ac_count
4476 fi
4477 # 10*(2^10) chars as input seems more than enough
4478 test $ac_count -gt 10 && break
4479 done
4480 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4481esac
4482
Matthias Kloseb9621712010-04-24 17:59:49 +00004483 $ac_path_EGREP_found && break 3
4484 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004485 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004486 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004487IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004488 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004489 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004490 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491else
4492 ac_cv_path_EGREP=$EGREP
4493fi
4494
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004495 fi
4496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4498$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004499 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004500
4501
Matthias Kloseb9621712010-04-24 17:59:49 +00004502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4503$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004504if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004505 $as_echo_n "(cached) " >&6
4506else
4507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004508/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004509#include <stdlib.h>
4510#include <stdarg.h>
4511#include <string.h>
4512#include <float.h>
4513
4514int
4515main ()
4516{
4517
4518 ;
4519 return 0;
4520}
4521_ACEOF
4522if ac_fn_c_try_compile "$LINENO"; then :
4523 ac_cv_header_stdc=yes
4524else
4525 ac_cv_header_stdc=no
4526fi
4527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4528
4529if test $ac_cv_header_stdc = yes; then
4530 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4532/* end confdefs.h. */
4533#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004534
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004535_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004537 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004538
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004539else
Matthias Kloseb9621712010-04-24 17:59:49 +00004540 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004541fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004542rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004543
Matthias Kloseb9621712010-04-24 17:59:49 +00004544fi
4545
4546if test $ac_cv_header_stdc = yes; then
4547 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4549/* end confdefs.h. */
4550#include <stdlib.h>
4551
4552_ACEOF
4553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4554 $EGREP "free" >/dev/null 2>&1; then :
4555
4556else
4557 ac_cv_header_stdc=no
4558fi
4559rm -f conftest*
4560
4561fi
4562
4563if test $ac_cv_header_stdc = yes; then
4564 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4565 if test "$cross_compiling" = yes; then :
4566 :
4567else
4568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4569/* end confdefs.h. */
4570#include <ctype.h>
4571#include <stdlib.h>
4572#if ((' ' & 0x0FF) == 0x020)
4573# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4574# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4575#else
4576# define ISLOWER(c) \
4577 (('a' <= (c) && (c) <= 'i') \
4578 || ('j' <= (c) && (c) <= 'r') \
4579 || ('s' <= (c) && (c) <= 'z'))
4580# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4581#endif
4582
4583#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4584int
4585main ()
4586{
4587 int i;
4588 for (i = 0; i < 256; i++)
4589 if (XOR (islower (i), ISLOWER (i))
4590 || toupper (i) != TOUPPER (i))
4591 return 2;
4592 return 0;
4593}
4594_ACEOF
4595if ac_fn_c_try_run "$LINENO"; then :
4596
4597else
4598 ac_cv_header_stdc=no
4599fi
4600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4601 conftest.$ac_objext conftest.beam conftest.$ac_ext
4602fi
4603
4604fi
4605fi
4606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4607$as_echo "$ac_cv_header_stdc" >&6; }
4608if test $ac_cv_header_stdc = yes; then
4609
4610$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4611
4612fi
4613
4614# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4615for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4616 inttypes.h stdint.h unistd.h
4617do :
4618 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4619ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4620"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004621if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004622 cat >>confdefs.h <<_ACEOF
4623#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4624_ACEOF
4625
4626fi
4627
4628done
4629
4630
4631
4632 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08004633if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004634 MINIX=yes
4635else
4636 MINIX=
4637fi
4638
4639
4640 if test "$MINIX" = yes; then
4641
4642$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4643
4644
4645$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4646
4647
4648$as_echo "#define _MINIX 1" >>confdefs.h
4649
4650 fi
4651
4652
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4654$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004655if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004656 $as_echo_n "(cached) " >&6
4657else
4658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4659/* end confdefs.h. */
4660
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004661# define __EXTENSIONS__ 1
4662 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00004663int
4664main ()
4665{
4666
4667 ;
4668 return 0;
4669}
4670_ACEOF
4671if ac_fn_c_try_compile "$LINENO"; then :
4672 ac_cv_safe_to_define___extensions__=yes
4673else
4674 ac_cv_safe_to_define___extensions__=no
4675fi
4676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4677fi
4678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4679$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4680 test $ac_cv_safe_to_define___extensions__ = yes &&
4681 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4682
4683 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4684
4685 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4686
4687 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4688
4689 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4690
4691
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004693# Check for unsupported systems
4694case $ac_sys_system/$ac_sys_release in
4695atheos*|Linux*/1*)
4696 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4697 echo See README for details.
4698 exit 1;;
4699esac
4700
4701
Matthias Kloseb9621712010-04-24 17:59:49 +00004702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4703$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004704
4705# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004706if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004707 withval=$with_suffix;
4708 case $withval in
4709 no) EXEEXT=;;
4710 yes) EXEEXT=.exe;;
4711 *) EXEEXT=$withval;;
4712 esac
4713fi
4714
Matthias Kloseb9621712010-04-24 17:59:49 +00004715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4716$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004717
4718# Test whether we're running on a non-case-sensitive system, in which
4719# case we give a warning if no ext is given
4720
Matthias Kloseb9621712010-04-24 17:59:49 +00004721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4722$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004723if test ! -d CaseSensitiveTestDir; then
4724mkdir CaseSensitiveTestDir
4725fi
4726
4727if test -d casesensitivetestdir
4728then
Matthias Kloseb9621712010-04-24 17:59:49 +00004729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4730$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004731 BUILDEXEEXT=.exe
4732else
Matthias Kloseb9621712010-04-24 17:59:49 +00004733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4734$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735 BUILDEXEEXT=$EXEEXT
4736fi
4737rmdir CaseSensitiveTestDir
4738
4739case $MACHDEP in
4740bsdos*)
4741 case $CC in
4742 gcc) CC="$CC -D_HAVE_BSDI";;
4743 esac;;
4744esac
4745
4746case $ac_sys_system in
4747hp*|HP*)
4748 case $CC in
4749 cc|*/cc) CC="$CC -Ae";;
4750 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751esac
4752
4753
4754
Matthias Kloseb9621712010-04-24 17:59:49 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4756$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757if test -z "$LIBRARY"
4758then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004759 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4762$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004763
4764# LDLIBRARY is the name of the library to link against (as opposed to the
4765# name of the library into which to insert object files). BLDLIBRARY is also
4766# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4767# is blank as the main program is not linked directly against LDLIBRARY.
4768# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4769# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4770# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4771# DLLLIBRARY is the shared (i.e., DLL) library.
4772#
4773# RUNSHARED is used to run shared python without installed libraries
4774#
4775# INSTSONAME is the name of the shared library that will be use to install
4776# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004777#
4778# LDVERSION is the shared library version number, normally the Python version
4779# with the ABI build flags appended.
4780
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781
4782
4783
4784
4785
4786
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004787
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004788LDLIBRARY="$LIBRARY"
4789BLDLIBRARY='$(LDLIBRARY)'
4790INSTSONAME='$(LDLIBRARY)'
4791DLLLIBRARY=''
4792LDLIBRARYDIR=''
4793RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004794LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004795
4796# LINKCC is the command that links the python executable -- default is $(CC).
4797# If CXX is set, and if it is needed to link a main function that was
4798# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4799# python might then depend on the C++ runtime
4800# This is altered for AIX in order to build the export list before
4801# linking.
4802
Matthias Kloseb9621712010-04-24 17:59:49 +00004803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4804$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004805if test -z "$LINKCC"
4806then
4807 LINKCC='$(PURIFY) $(MAINCC)'
4808 case $ac_sys_system in
4809 AIX*)
4810 exp_extra="\"\""
4811 if test $ac_sys_release -ge 5 -o \
4812 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4813 exp_extra="."
4814 fi
4815 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004816 QNX*)
4817 # qcc must be used because the other compilers do not
4818 # support -N.
4819 LINKCC=qcc;;
4820 esac
4821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4823$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004824
4825# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4826# make sure we default having it set to "no": this is used by
4827# distutils.unixccompiler to know if it should add --enable-new-dtags
4828# to linker command lines, and failing to detect GNU ld simply results
4829# in the same bahaviour as before.
4830
Matthias Kloseb9621712010-04-24 17:59:49 +00004831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4832$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004833ac_prog=ld
4834if test "$GCC" = yes; then
4835 ac_prog=`$CC -print-prog-name=ld`
4836fi
4837case `"$ac_prog" -V 2>&1 < /dev/null` in
4838 *GNU*)
4839 GNULD=yes;;
4840 *)
4841 GNULD=no;;
4842esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4844$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4847$as_echo_n "checking for inline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004848if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004849 $as_echo_n "(cached) " >&6
4850else
4851 ac_cv_c_inline=no
4852for ac_kw in inline __inline__ __inline; do
4853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4854/* end confdefs.h. */
4855#ifndef __cplusplus
4856typedef int foo_t;
4857static $ac_kw foo_t static_foo () {return 0; }
4858$ac_kw foo_t foo () {return 0; }
4859#endif
4860
4861_ACEOF
4862if ac_fn_c_try_compile "$LINENO"; then :
4863 ac_cv_c_inline=$ac_kw
4864fi
4865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4866 test "$ac_cv_c_inline" != no && break
4867done
4868
4869fi
4870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4871$as_echo "$ac_cv_c_inline" >&6; }
4872
4873case $ac_cv_c_inline in
4874 inline | yes) ;;
4875 *)
4876 case $ac_cv_c_inline in
4877 no) ac_val=;;
4878 *) ac_val=$ac_cv_c_inline;;
4879 esac
4880 cat >>confdefs.h <<_ACEOF
4881#ifndef __cplusplus
4882#define inline $ac_val
4883#endif
4884_ACEOF
4885 ;;
4886esac
4887
4888if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004889
4890$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004891
4892
4893fi
4894
4895
Matthias Kloseb9621712010-04-24 17:59:49 +00004896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4897$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004898# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004899if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900 enableval=$enable_shared;
4901fi
4902
4903
4904if test -z "$enable_shared"
4905then
4906 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004907 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908 enable_shared="yes";;
4909 *)
4910 enable_shared="no";;
4911 esac
4912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4914$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004915
Matthias Kloseb9621712010-04-24 17:59:49 +00004916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4917$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004919if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004920 enableval=$enable_profiling; ac_save_cc="$CC"
4921 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004922 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004923 ac_enable_profiling="no"
4924else
Matthias Kloseb9621712010-04-24 17:59:49 +00004925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926/* end confdefs.h. */
4927int main() { return 0; }
4928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004929if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004930 ac_enable_profiling="yes"
4931else
Matthias Kloseb9621712010-04-24 17:59:49 +00004932 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004934rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4935 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936fi
4937
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 CC="$ac_save_cc"
4939fi
4940
Matthias Kloseb9621712010-04-24 17:59:49 +00004941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4942$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943
4944case "$ac_enable_profiling" in
4945 "yes")
4946 BASECFLAGS="-pg $BASECFLAGS"
4947 LDFLAGS="-pg $LDFLAGS"
4948 ;;
4949esac
4950
Matthias Kloseb9621712010-04-24 17:59:49 +00004951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4952$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953
4954# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4955# library that we build, but we do not want to link against it (we
4956# will find it with a -framework option). For this reason there is an
4957# extra variable BLDLIBRARY against which Python and the extension
4958# modules are linked, BLDLIBRARY. This is normally the same as
4959# LDLIBRARY, but empty for MacOSX framework builds.
4960if test "$enable_framework"
4961then
4962 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4963 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4964 BLDLIBRARY=''
4965else
4966 BLDLIBRARY='$(LDLIBRARY)'
4967fi
4968
4969# Other platforms follow
4970if test $enable_shared = "yes"; then
4971
Matthias Kloseb9621712010-04-24 17:59:49 +00004972$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973
4974 case $ac_sys_system in
4975 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004976 LDLIBRARY='libpython$(LDVERSION).dll.a'
4977 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 ;;
4979 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004980 LDLIBRARY='libpython$(LDVERSION).so'
4981 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4983 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004984 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004985 then
4986 PY3LIBRARY=libpython3.so
4987 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004988 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02004989 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004990 LDLIBRARY='libpython$(LDVERSION).so'
4991 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4993 case $ac_sys_system in
4994 FreeBSD*)
4995 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4996 ;;
4997 esac
4998 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004999 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005000 then
5001 PY3LIBRARY=libpython3.so
5002 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003 ;;
5004 hp*|HP*)
5005 case `uname -m` in
5006 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005007 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008 ;;
5009 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005010 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011 ;;
5012 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005013 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005014 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5015 ;;
5016 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005017 LDLIBRARY='libpython$(LDVERSION).so'
5018 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5020 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005021 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005022 LDLIBRARY='libpython$(LDVERSION).dylib'
5023 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005024 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5025 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005026 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005027 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005028 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5029 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030
5031 esac
5032else # shared is disabled
5033 case $ac_sys_system in
5034 CYGWIN*)
5035 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005036 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037 ;;
5038 esac
5039fi
5040
Matthias Kloseb9621712010-04-24 17:59:49 +00005041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5042$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043
5044if test -n "$ac_tool_prefix"; then
5045 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5046set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5048$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005049if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051else
5052 if test -n "$RANLIB"; then
5053 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5054else
5055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5056for as_dir in $PATH
5057do
5058 IFS=$as_save_IFS
5059 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064 break 2
5065 fi
5066done
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005068IFS=$as_save_IFS
5069
5070fi
5071fi
5072RANLIB=$ac_cv_prog_RANLIB
5073if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5075$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076else
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5078$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005079fi
5080
5081
5082fi
5083if test -z "$ac_cv_prog_RANLIB"; then
5084 ac_ct_RANLIB=$RANLIB
5085 # Extract the first word of "ranlib", so it can be a program name with args.
5086set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005089if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005091else
5092 if test -n "$ac_ct_RANLIB"; then
5093 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5094else
5095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096for as_dir in $PATH
5097do
5098 IFS=$as_save_IFS
5099 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005102 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005104 break 2
5105 fi
5106done
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005108IFS=$as_save_IFS
5109
5110fi
5111fi
5112ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5113if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5115$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116else
Matthias Kloseb9621712010-04-24 17:59:49 +00005117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119fi
5120
5121 if test "x$ac_ct_RANLIB" = x; then
5122 RANLIB=":"
5123 else
5124 case $cross_compiling:$ac_tool_warned in
5125yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128ac_tool_warned=yes ;;
5129esac
5130 RANLIB=$ac_ct_RANLIB
5131 fi
5132else
5133 RANLIB="$ac_cv_prog_RANLIB"
5134fi
5135
5136
5137for ac_prog in ar aal
5138do
5139 # Extract the first word of "$ac_prog", so it can be a program name with args.
5140set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5142$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005143if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005144 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145else
5146 if test -n "$AR"; then
5147 ac_cv_prog_AR="$AR" # Let the user override the test.
5148else
5149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5150for as_dir in $PATH
5151do
5152 IFS=$as_save_IFS
5153 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005154 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005155 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005156 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158 break 2
5159 fi
5160done
Matthias Kloseb9621712010-04-24 17:59:49 +00005161 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005162IFS=$as_save_IFS
5163
5164fi
5165fi
5166AR=$ac_cv_prog_AR
5167if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5169$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005170else
Matthias Kloseb9621712010-04-24 17:59:49 +00005171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5172$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005173fi
5174
5175
5176 test -n "$AR" && break
5177done
5178test -n "$AR" || AR="ar"
5179
5180
5181# tweak ARFLAGS only if the user didn't set it on the command line
5182
5183if test -z "$ARFLAGS"
5184then
5185 ARFLAGS="rc"
5186fi
5187
5188
5189# Extract the first word of "svnversion", so it can be a program name with args.
5190set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5192$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005193if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005194 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195else
5196 if test -n "$SVNVERSION"; then
5197 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5198else
5199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5200for as_dir in $PATH
5201do
5202 IFS=$as_save_IFS
5203 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005204 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005205 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005206 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005207 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005208 break 2
5209 fi
5210done
Matthias Kloseb9621712010-04-24 17:59:49 +00005211 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005212IFS=$as_save_IFS
5213
5214 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5215fi
5216fi
5217SVNVERSION=$ac_cv_prog_SVNVERSION
5218if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5220$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005221else
Matthias Kloseb9621712010-04-24 17:59:49 +00005222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5223$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005224fi
5225
5226
5227if test $SVNVERSION = found
5228then
5229 SVNVERSION="svnversion \$(srcdir)"
5230else
5231 SVNVERSION="echo Unversioned directory"
5232fi
5233
Trent Nelson9effe692012-10-16 08:41:32 -04005234
Trent Nelson739fc542012-10-17 04:45:30 -04005235if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson9effe692012-10-16 08:41:32 -04005236 # If we're building out-of-tree, we need to make sure the following
5237 # resources get picked up before their $srcdir counterparts.
5238 # Objects/ -> typeslots.inc
5239 # Include/ -> Python-ast.h, graminit.h
5240 # Python/ -> importlib.h
5241 # (A side effect of this is that these resources will automatically be
5242 # regenerated when building out-of-tree, regardless of whether or not
5243 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5244 # off.)
5245 BASECPPFLAGS="-IObjects -IInclude -IPython"
5246else
5247 BASECPPFLAGS=""
5248fi
5249
Georg Brandl1ca2e792011-03-05 20:51:24 +01005250
5251
5252
Georg Brandl187c1112011-07-03 09:23:20 +02005253
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005254if test -e $srcdir/.hg/dirstate
Georg Brandl187c1112011-07-03 09:23:20 +02005255then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005256# Extract the first word of "hg", so it can be a program name with args.
5257set dummy hg; ac_word=$2
5258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5259$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005260if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005261 $as_echo_n "(cached) " >&6
5262else
5263 if test -n "$HAS_HG"; then
5264 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5265else
5266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5267for as_dir in $PATH
5268do
5269 IFS=$as_save_IFS
5270 test -z "$as_dir" && as_dir=.
5271 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005272 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005273 ac_cv_prog_HAS_HG="found"
5274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5275 break 2
5276 fi
5277done
5278 done
5279IFS=$as_save_IFS
5280
5281 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5282fi
5283fi
5284HAS_HG=$ac_cv_prog_HAS_HG
5285if test -n "$HAS_HG"; then
5286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5287$as_echo "$HAS_HG" >&6; }
5288else
5289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5290$as_echo "no" >&6; }
5291fi
5292
5293
Georg Brandl187c1112011-07-03 09:23:20 +02005294else
5295HAS_HG=no-repository
5296fi
Georg Brandl1ca2e792011-03-05 20:51:24 +01005297if test $HAS_HG = found
5298then
5299 HGVERSION="hg id -i \$(srcdir)"
5300 HGTAG="hg id -t \$(srcdir)"
5301 HGBRANCH="hg id -b \$(srcdir)"
5302else
5303 HGVERSION=""
5304 HGTAG=""
5305 HGBRANCH=""
5306fi
5307
Georg Brandl187c1112011-07-03 09:23:20 +02005308
Matthias Klosec4c48422012-10-21 23:05:35 +02005309for ac_prog in python$PACKAGE_VERSION python3 python
5310do
5311 # Extract the first word of "$ac_prog", so it can be a program name with args.
5312set dummy $ac_prog; ac_word=$2
Georg Brandl187c1112011-07-03 09:23:20 +02005313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5314$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005315if ${ac_cv_prog_PYTHON+:} false; then :
Georg Brandl187c1112011-07-03 09:23:20 +02005316 $as_echo_n "(cached) " >&6
5317else
Matthias Klosec4c48422012-10-21 23:05:35 +02005318 if test -n "$PYTHON"; then
5319 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Georg Brandl187c1112011-07-03 09:23:20 +02005320else
5321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5322for as_dir in $PATH
5323do
5324 IFS=$as_save_IFS
5325 test -z "$as_dir" && as_dir=.
5326 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005327 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005328 ac_cv_prog_PYTHON="$ac_prog"
Georg Brandl187c1112011-07-03 09:23:20 +02005329 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5330 break 2
5331 fi
5332done
5333 done
5334IFS=$as_save_IFS
5335
Georg Brandl187c1112011-07-03 09:23:20 +02005336fi
5337fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005338PYTHON=$ac_cv_prog_PYTHON
5339if test -n "$PYTHON"; then
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5341$as_echo "$PYTHON" >&6; }
Georg Brandl187c1112011-07-03 09:23:20 +02005342else
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5344$as_echo "no" >&6; }
5345fi
5346
5347
Matthias Klosec4c48422012-10-21 23:05:35 +02005348 test -n "$PYTHON" && break
5349done
5350test -n "$PYTHON" || PYTHON="not-found"
5351
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005352if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005353 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5354else
5355 ASDLGEN="$PYTHON"
Georg Brandl187c1112011-07-03 09:23:20 +02005356fi
5357
5358
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359case $MACHDEP in
5360bsdos*|hp*|HP*)
5361 # install -d does not work on BSDI or HP-UX
5362 if test -z "$INSTALL"
5363 then
5364 INSTALL="${srcdir}/install-sh -c"
5365 fi
5366esac
5367ac_aux_dir=
5368for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005369 if test -f "$ac_dir/install-sh"; then
5370 ac_aux_dir=$ac_dir
5371 ac_install_sh="$ac_aux_dir/install-sh -c"
5372 break
5373 elif test -f "$ac_dir/install.sh"; then
5374 ac_aux_dir=$ac_dir
5375 ac_install_sh="$ac_aux_dir/install.sh -c"
5376 break
5377 elif test -f "$ac_dir/shtool"; then
5378 ac_aux_dir=$ac_dir
5379 ac_install_sh="$ac_aux_dir/shtool install -c"
5380 break
5381 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005382done
5383if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005384 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385fi
5386
5387# These three variables are undocumented and unsupported,
5388# and are intended to be withdrawn in a future Autoconf release.
5389# They can cause serious problems if a builder's source tree is in a directory
5390# whose full name contains unusual characters.
5391ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5392ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5393ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5394
5395
5396# Find a good install program. We prefer a C program (faster),
5397# so one script is as good as another. But avoid the broken or
5398# incompatible versions:
5399# SysV /etc/install, /usr/sbin/install
5400# SunOS /usr/etc/install
5401# IRIX /sbin/install
5402# AIX /bin/install
5403# AmigaOS /C/install, which installs bootblocks on floppy discs
5404# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5405# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5406# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5407# OS/2's system install, which has a completely different semantic
5408# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005409# Reject install programs that cannot install multiple files.
5410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5411$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412if test -z "$INSTALL"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08005413if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005414 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415else
5416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5417for as_dir in $PATH
5418do
5419 IFS=$as_save_IFS
5420 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 # Account for people who put trailing slashes in PATH elements.
5422case $as_dir/ in #((
5423 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426 /usr/ucb/* ) ;;
5427 *)
5428 # OSF1 and SCO ODT 3.0 have their own names for install.
5429 # Don't use installbsd from OSF since it installs stuff as root
5430 # by default.
5431 for ac_prog in ginstall scoinst install; do
5432 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005433 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434 if test $ac_prog = install &&
5435 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5436 # AIX install. It has an incompatible calling convention.
5437 :
5438 elif test $ac_prog = install &&
5439 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5440 # program-specific install script used by HP pwplus--don't use.
5441 :
5442 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 rm -rf conftest.one conftest.two conftest.dir
5444 echo one > conftest.one
5445 echo two > conftest.two
5446 mkdir conftest.dir
5447 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5448 test -s conftest.one && test -s conftest.two &&
5449 test -s conftest.dir/conftest.one &&
5450 test -s conftest.dir/conftest.two
5451 then
5452 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5453 break 3
5454 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455 fi
5456 fi
5457 done
5458 done
5459 ;;
5460esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005461
5462 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005463IFS=$as_save_IFS
5464
Matthias Kloseb9621712010-04-24 17:59:49 +00005465rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005466
5467fi
5468 if test "${ac_cv_path_install+set}" = set; then
5469 INSTALL=$ac_cv_path_install
5470 else
5471 # As a last resort, use the slow shell script. Don't cache a
5472 # value for INSTALL within a source directory, because that will
5473 # break other packages using the cache if that directory is
5474 # removed, or if the value is a relative name.
5475 INSTALL=$ac_install_sh
5476 fi
5477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5479$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480
5481# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5482# It thinks the first close brace ends the variable substitution.
5483test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5484
5485test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5486
5487test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5488
Trent Nelsona45afca2012-08-30 14:32:02 +00005489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5490$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5491if test -z "$MKDIR_P"; then
5492 if ${ac_cv_path_mkdir+:} false; then :
5493 $as_echo_n "(cached) " >&6
5494else
5495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5496for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5497do
5498 IFS=$as_save_IFS
5499 test -z "$as_dir" && as_dir=.
5500 for ac_prog in mkdir gmkdir; do
5501 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005502 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsona45afca2012-08-30 14:32:02 +00005503 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5504 'mkdir (GNU coreutils) '* | \
5505 'mkdir (coreutils) '* | \
5506 'mkdir (fileutils) '4.1*)
5507 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5508 break 3;;
5509 esac
5510 done
5511 done
5512 done
5513IFS=$as_save_IFS
5514
5515fi
5516
5517 test -d ./--version && rmdir ./--version
5518 if test "${ac_cv_path_mkdir+set}" = set; then
5519 MKDIR_P="$ac_cv_path_mkdir -p"
5520 else
5521 # As a last resort, use the slow shell script. Don't cache a
5522 # value for MKDIR_P within a source directory, because that will
5523 # break other packages using the cache if that directory is
5524 # removed, or if the value is a relative name.
5525 MKDIR_P="$ac_install_sh -d"
5526 fi
5527fi
5528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5529$as_echo "$MKDIR_P" >&6; }
5530
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005531
5532# Not every filesystem supports hard links
5533
5534if test -z "$LN" ; then
5535 case $ac_sys_system in
5536 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537 *) LN=ln;;
5538 esac
5539fi
5540
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005541# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005542
5543ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005544
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5547$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548
5549# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005550if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551 withval=$with_pydebug;
5552if test "$withval" != no
5553then
5554
Matthias Kloseb9621712010-04-24 17:59:49 +00005555$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556
Matthias Kloseb9621712010-04-24 17:59:49 +00005557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5558$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005560 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005561else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5562$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563fi
5564else
Matthias Kloseb9621712010-04-24 17:59:49 +00005565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567fi
5568
5569
5570# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5571# merged with this chunk of code?
5572
5573# Optimizer/debugger flags
5574# ------------------------
5575# (The following bit of code is complicated enough - please keep things
5576# indented properly. Just pretend you're editing Python code. ;-)
5577
5578# There are two parallel sets of case statements below, one that checks to
5579# see if OPT was set and one that does BASECFLAGS setting based upon
5580# compiler and platform. BASECFLAGS tweaks need to be made even if the
5581# user set OPT.
5582
5583# tweak OPT based on compiler and platform, only if the user didn't set
5584# it on the command line
5585
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005586if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587then
5588 case $GCC in
5589 yes)
5590 if test "$CC" != 'g++' ; then
5591 STRICT_PROTO="-Wstrict-prototypes"
5592 fi
5593 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5594 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5595 WRAP="-fwrapv"
5596 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005597
5598 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005599 case $CC in
5600 *clang*) WRAP="-fwrapv"
5601 ;;
5602 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005603
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604 case $ac_cv_prog_cc_g in
5605 yes)
5606 if test "$Py_DEBUG" = 'true' ; then
5607 # Optimization messes up debuggers, so turn it off for
5608 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005609 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610 else
5611 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5612 fi
5613 ;;
5614 *)
5615 OPT="-O3 -Wall $STRICT_PROTO"
5616 ;;
5617 esac
5618 case $ac_sys_system in
5619 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5620 ;;
5621 esac
5622 ;;
5623
5624 *)
5625 OPT="-O"
5626 ;;
5627 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628fi
5629
5630
5631
5632# The -arch flags for universal builds on OSX
5633UNIVERSAL_ARCH_FLAGS=
5634
5635
5636# tweak BASECFLAGS based on compiler and platform
5637case $GCC in
5638yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005639 # Python doesn't violate C99 aliasing rules, but older versions of
5640 # GCC produce warnings for legal Python code. Enable
5641 # -fno-strict-aliasing on versions of GCC that support but produce
5642 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5644$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645 ac_save_cc="$CC"
5646 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005647 save_CFLAGS="$CFLAGS"
Gregory P. Smith69140482012-01-16 02:05:55 -08005648 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005649 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005650else
Matthias Kloseb9621712010-04-24 17:59:49 +00005651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005653
Matthias Kloseb159a552010-04-25 21:00:44 +00005654
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005655int
5656main ()
5657{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005658
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005659 ;
5660 return 0;
5661}
Matthias Kloseb159a552010-04-25 21:00:44 +00005662
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005664if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005665
5666 CC="$ac_save_cc -fstrict-aliasing"
5667 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005669/* end confdefs.h. */
5670
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005671 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005672int
5673main ()
5674{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005675double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005676 ;
5677 return 0;
5678}
Matthias Kloseb159a552010-04-25 21:00:44 +00005679
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005681if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005682
5683 ac_cv_no_strict_aliasing=no
5684
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685else
Matthias Kloseb159a552010-04-25 21:00:44 +00005686
5687 ac_cv_no_strict_aliasing=yes
5688
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005689fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005691
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005692else
Matthias Kloseb159a552010-04-25 21:00:44 +00005693
5694 ac_cv_no_strict_aliasing=no
5695
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005698fi
5699
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005700 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5703$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005704 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705 then
5706 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5707 fi
5708
5709 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5710 # support. Without this, treatment of subnormals doesn't follow
5711 # the standard.
5712 case $ac_sys_machine in
5713 alpha*)
5714 BASECFLAGS="$BASECFLAGS -mieee"
5715 ;;
5716 esac
5717
5718 case $ac_sys_system in
5719 SCO_SV*)
5720 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5721 ;;
5722 # is there any other compiler on Darwin besides gcc?
5723 Darwin*)
5724 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5725 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005726 if test "${CC}" = gcc
5727 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5729$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005730 case "${UNIVERSALSDK}" in
5731 */MacOSX10.4u.sdk)
5732 # Build using 10.4 SDK, force usage of gcc when the
5733 # compiler is gcc, otherwise the user will get very
5734 # confusing error messages when building on OSX 10.6
5735 CC=gcc-4.0
5736 CPP=cpp-4.0
5737 ;;
5738 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5740$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005741 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742
5743
5744 if test "${enable_universalsdk}"; then
5745 UNIVERSAL_ARCH_FLAGS=""
5746 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5747 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5748 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005749 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5751 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005752 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005753 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754
5755 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5756 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005757 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005758 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005760 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5761 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005762 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005763 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005764
5765 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5766 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005767 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005768 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005769
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005771 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772
5773 fi
5774
5775
Ronald Oussoren666028b2010-04-18 19:07:43 +00005776 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5777 if test "${UNIVERSALSDK}" != "/"
5778 then
5779 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5780 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005781 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782 fi
5783 fi
5784
5785 # Calculate the right deployment target for this build.
5786 #
5787 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5788 if test ${cur_target} '>' 10.2; then
5789 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005790 if test ${enable_universalsdk}; then
5791 if test "${UNIVERSAL_ARCHS}" = "all"; then
5792 # Ensure that the default platform for a
5793 # 4-way universal build is OSX 10.5,
5794 # that's the first OS release where
5795 # 4-way builds make sense.
5796 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005797
5798 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5799 cur_target='10.5'
5800
5801 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5802 cur_target='10.5'
5803
5804 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5805 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005806 fi
5807 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005808 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005809 # On Intel macs default to a deployment
5810 # target of 10.4, that's the first OSX
5811 # release with Intel support.
5812 cur_target="10.4"
5813 fi
5814 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815 fi
5816 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5817
5818 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5819 # environment with a value that is the same as what we'll use
5820 # in the Makefile to ensure that we'll get the same compiler
5821 # environment during configure and build time.
5822 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5823 export MACOSX_DEPLOYMENT_TARGET
5824 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5825
5826 ;;
5827 OSF*)
5828 BASECFLAGS="$BASECFLAGS -mieee"
5829 ;;
5830 esac
5831 ;;
5832
5833*)
5834 case $ac_sys_system in
5835 OpenUNIX*|UnixWare*)
5836 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5837 ;;
5838 OSF*)
5839 BASECFLAGS="$BASECFLAGS -ieee -std"
5840 ;;
5841 SCO_SV*)
5842 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5843 ;;
5844 esac
5845 ;;
5846esac
5847
5848if test "$Py_DEBUG" = 'true'; then
5849 :
5850else
5851 OPT="-DNDEBUG $OPT"
5852fi
5853
5854if test "$ac_arch_flags"
5855then
5856 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5857fi
5858
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859# Check whether GCC supports PyArg_ParseTuple format
5860if test "$GCC" = "yes"
5861then
Matthias Kloseb9621712010-04-24 17:59:49 +00005862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5863$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864 save_CFLAGS=$CFLAGS
5865 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867/* end confdefs.h. */
5868
5869 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870int
5871main ()
5872{
5873
5874 ;
5875 return 0;
5876}
Matthias Kloseb159a552010-04-25 21:00:44 +00005877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005879if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880
Matthias Kloseb159a552010-04-25 21:00:44 +00005881
Matthias Kloseb9621712010-04-24 17:59:49 +00005882$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883
Matthias Kloseb159a552010-04-25 21:00:44 +00005884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005885$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005886
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887else
Matthias Kloseb159a552010-04-25 21:00:44 +00005888
5889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005890$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891
5892fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5894 CFLAGS=$save_CFLAGS
5895fi
5896
5897# On some compilers, pthreads are available without further options
5898# (e.g. MacOS X). On some of these systems, the compiler will not
5899# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5900# So we have to see first whether pthreads are available without
5901# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5903$as_echo_n "checking whether pthreads are available without options... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005904if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906else
Matthias Kloseb9621712010-04-24 17:59:49 +00005907 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 ac_cv_pthread_is_default=no
5909else
Matthias Kloseb9621712010-04-24 17:59:49 +00005910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911/* end confdefs.h. */
5912
5913#include <pthread.h>
5914
5915void* routine(void* p){return NULL;}
5916
5917int main(){
5918 pthread_t p;
5919 if(pthread_create(&p,NULL,routine,NULL)!=0)
5920 return 1;
5921 (void)pthread_detach(p);
5922 return 0;
5923}
5924
5925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005926if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
5928 ac_cv_pthread_is_default=yes
5929 ac_cv_kthread=no
5930 ac_cv_pthread=no
5931
5932else
Matthias Kloseb9621712010-04-24 17:59:49 +00005933 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5936 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937fi
5938
5939
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940fi
5941
Matthias Kloseb9621712010-04-24 17:59:49 +00005942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5943$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944
5945
5946if test $ac_cv_pthread_is_default = yes
5947then
5948 ac_cv_kpthread=no
5949else
5950# -Kpthread, if available, provides the right #defines
5951# and linker options to make pthread_create available
5952# Some compilers won't report that they do not support -Kpthread,
5953# so we need to run a program to see whether it really made the
5954# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5956$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005957if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959else
5960 ac_save_cc="$CC"
5961CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005962if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ac_cv_kpthread=no
5964else
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966/* end confdefs.h. */
5967
5968#include <pthread.h>
5969
5970void* routine(void* p){return NULL;}
5971
5972int main(){
5973 pthread_t p;
5974 if(pthread_create(&p,NULL,routine,NULL)!=0)
5975 return 1;
5976 (void)pthread_detach(p);
5977 return 0;
5978}
5979
5980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005981if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982 ac_cv_kpthread=yes
5983else
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5987 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988fi
5989
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990CC="$ac_save_cc"
5991fi
5992
Matthias Kloseb9621712010-04-24 17:59:49 +00005993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5994$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995fi
5996
5997if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5998then
5999# -Kthread, if available, provides the right #defines
6000# and linker options to make pthread_create available
6001# Some compilers won't report that they do not support -Kthread,
6002# so we need to run a program to see whether it really made the
6003# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6005$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006006if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008else
6009 ac_save_cc="$CC"
6010CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006011if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012 ac_cv_kthread=no
6013else
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015/* end confdefs.h. */
6016
6017#include <pthread.h>
6018
6019void* routine(void* p){return NULL;}
6020
6021int main(){
6022 pthread_t p;
6023 if(pthread_create(&p,NULL,routine,NULL)!=0)
6024 return 1;
6025 (void)pthread_detach(p);
6026 return 0;
6027}
6028
6029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006030if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031 ac_cv_kthread=yes
6032else
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6036 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037fi
6038
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039CC="$ac_save_cc"
6040fi
6041
Matthias Kloseb9621712010-04-24 17:59:49 +00006042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6043$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044fi
6045
6046if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6047then
6048# -pthread, if available, provides the right #defines
6049# and linker options to make pthread_create available
6050# Some compilers won't report that they do not support -pthread,
6051# so we need to run a program to see whether it really made the
6052# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6054$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006055if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006056 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057else
6058 ac_save_cc="$CC"
6059CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006060if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061 ac_cv_pthread=no
6062else
Matthias Kloseb9621712010-04-24 17:59:49 +00006063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006064/* end confdefs.h. */
6065
6066#include <pthread.h>
6067
6068void* routine(void* p){return NULL;}
6069
6070int main(){
6071 pthread_t p;
6072 if(pthread_create(&p,NULL,routine,NULL)!=0)
6073 return 1;
6074 (void)pthread_detach(p);
6075 return 0;
6076}
6077
6078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006079if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080 ac_cv_pthread=yes
6081else
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6085 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086fi
6087
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088CC="$ac_save_cc"
6089fi
6090
Matthias Kloseb9621712010-04-24 17:59:49 +00006091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6092$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093fi
6094
6095# If we have set a CC compiler flag for thread support then
6096# check if it works for CXX, too.
6097ac_cv_cxx_thread=no
6098if test ! -z "$CXX"
6099then
Matthias Kloseb9621712010-04-24 17:59:49 +00006100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6101$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102ac_save_cxx="$CXX"
6103
6104if test "$ac_cv_kpthread" = "yes"
6105then
6106 CXX="$CXX -Kpthread"
6107 ac_cv_cxx_thread=yes
6108elif test "$ac_cv_kthread" = "yes"
6109then
6110 CXX="$CXX -Kthread"
6111 ac_cv_cxx_thread=yes
6112elif test "$ac_cv_pthread" = "yes"
6113then
6114 CXX="$CXX -pthread"
6115 ac_cv_cxx_thread=yes
6116fi
6117
6118if test $ac_cv_cxx_thread = yes
6119then
6120 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6121 $CXX -c conftest.$ac_ext 2>&5
6122 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6123 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6124 then
6125 ac_cv_cxx_thread=yes
6126 else
6127 ac_cv_cxx_thread=no
6128 fi
6129 rm -fr conftest*
6130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6132$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133fi
6134CXX="$ac_save_cxx"
6135
6136
6137# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6139$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006140if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006141 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142else
Matthias Kloseb9621712010-04-24 17:59:49 +00006143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144/* end confdefs.h. */
6145#include <stdlib.h>
6146#include <stdarg.h>
6147#include <string.h>
6148#include <float.h>
6149
6150int
6151main ()
6152{
6153
6154 ;
6155 return 0;
6156}
6157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006158if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159 ac_cv_header_stdc=yes
6160else
Matthias Kloseb9621712010-04-24 17:59:49 +00006161 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6164
6165if test $ac_cv_header_stdc = yes; then
6166 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168/* end confdefs.h. */
6169#include <string.h>
6170
6171_ACEOF
6172if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006173 $EGREP "memchr" >/dev/null 2>&1; then :
6174
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175else
6176 ac_cv_header_stdc=no
6177fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006178rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179
6180fi
6181
6182if test $ac_cv_header_stdc = yes; then
6183 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006185/* end confdefs.h. */
6186#include <stdlib.h>
6187
6188_ACEOF
6189if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 $EGREP "free" >/dev/null 2>&1; then :
6191
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192else
6193 ac_cv_header_stdc=no
6194fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006195rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196
6197fi
6198
6199if test $ac_cv_header_stdc = yes; then
6200 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202 :
6203else
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006205/* end confdefs.h. */
6206#include <ctype.h>
6207#include <stdlib.h>
6208#if ((' ' & 0x0FF) == 0x020)
6209# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6210# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6211#else
6212# define ISLOWER(c) \
6213 (('a' <= (c) && (c) <= 'i') \
6214 || ('j' <= (c) && (c) <= 'r') \
6215 || ('s' <= (c) && (c) <= 'z'))
6216# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6217#endif
6218
6219#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6220int
6221main ()
6222{
6223 int i;
6224 for (i = 0; i < 256; i++)
6225 if (XOR (islower (i), ISLOWER (i))
6226 || toupper (i) != TOUPPER (i))
6227 return 2;
6228 return 0;
6229}
6230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006231if ac_fn_c_try_run "$LINENO"; then :
6232
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233else
Matthias Kloseb9621712010-04-24 17:59:49 +00006234 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6237 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238fi
6239
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240fi
6241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6243$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244if test $ac_cv_header_stdc = yes; then
6245
Matthias Kloseb9621712010-04-24 17:59:49 +00006246$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006247
6248fi
6249
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006250for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6251fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006252ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006253shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006254unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006255sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6256sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006257sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Gregory P. Smith8facece2012-01-21 14:01:08 -08006258sys/syscall.h sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006259sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006260sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006261bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006262do :
6263 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6264ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006265if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006266 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006267#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006268_ACEOF
6269
6270fi
6271
Guido van Rossum627b2d71993-12-24 10:39:16 +00006272done
6273
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006274ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006275for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006276 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6278$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006279if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006280 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006281else
Matthias Kloseb9621712010-04-24 17:59:49 +00006282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006283/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006284#include <sys/types.h>
6285#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006286
Martin v. Löwis11437992002-04-12 09:54:03 +00006287int
6288main ()
6289{
6290if ((DIR *) 0)
6291return 0;
6292 ;
6293 return 0;
6294}
6295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006297 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006298else
Matthias Kloseb9621712010-04-24 17:59:49 +00006299 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006302fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006303eval ac_res=\$$as_ac_Header
6304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6305$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006306if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006307 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006308#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006309_ACEOF
6310
6311ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006312fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006313
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006314done
6315# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6316if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6318$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006319if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006320 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006321else
Martin v. Löwis11437992002-04-12 09:54:03 +00006322 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006326/* Override any GCC internal prototype to avoid an error.
6327 Use char because int might match the return type of a GCC
6328 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006329#ifdef __cplusplus
6330extern "C"
6331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006332char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006333int
6334main ()
6335{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006336return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006337 ;
6338 return 0;
6339}
6340_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006341for ac_lib in '' dir; do
6342 if test -z "$ac_lib"; then
6343 ac_res="none required"
6344 else
6345 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006346 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006347 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006348 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006349 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006350fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006351rm -f core conftest.err conftest.$ac_objext \
6352 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006353 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006354 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006356done
Gregory P. Smith69140482012-01-16 02:05:55 -08006357if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006359else
6360 ac_cv_search_opendir=no
6361fi
6362rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006363LIBS=$ac_func_search_save_LIBS
6364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6366$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006367ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006368if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006369 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006370
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006371fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006372
Michael W. Hudson54241132001-12-07 15:38:26 +00006373else
Matthias Kloseb9621712010-04-24 17:59:49 +00006374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6375$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006376if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006377 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006378else
6379 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006382
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006383/* Override any GCC internal prototype to avoid an error.
6384 Use char because int might match the return type of a GCC
6385 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006386#ifdef __cplusplus
6387extern "C"
6388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006389char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006390int
6391main ()
6392{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006393return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006394 ;
6395 return 0;
6396}
6397_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006398for ac_lib in '' x; do
6399 if test -z "$ac_lib"; then
6400 ac_res="none required"
6401 else
6402 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006403 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006404 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006405 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006406 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006408rm -f core conftest.err conftest.$ac_objext \
6409 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006410 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006411 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006413done
Gregory P. Smith69140482012-01-16 02:05:55 -08006414if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006416else
6417 ac_cv_search_opendir=no
6418fi
6419rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006420LIBS=$ac_func_search_save_LIBS
6421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6423$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006424ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006425if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006426 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006427
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006428fi
6429
6430fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006431
Matthias Kloseb9621712010-04-24 17:59:49 +00006432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6433$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006434if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006435 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006436else
Matthias Kloseb9621712010-04-24 17:59:49 +00006437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006438/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006439#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006440int
6441main ()
6442{
6443return makedev(0, 0);
6444 ;
6445 return 0;
6446}
6447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006448if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006449 ac_cv_header_sys_types_h_makedev=yes
6450else
Matthias Kloseb9621712010-04-24 17:59:49 +00006451 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006453rm -f core conftest.err conftest.$ac_objext \
6454 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006455
6456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6458$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006459
6460if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006461ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006462if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006463
Matthias Kloseb9621712010-04-24 17:59:49 +00006464$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006465
6466fi
6467
6468
6469
6470 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006471 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006472if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006473
Matthias Kloseb9621712010-04-24 17:59:49 +00006474$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006475
6476fi
6477
6478
6479 fi
6480fi
6481
Michael W. Hudson54241132001-12-07 15:38:26 +00006482
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006483# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006484for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006485do :
6486 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006487#ifdef HAVE_CURSES_H
6488#include <curses.h>
6489#endif
6490
Matthias Kloseb9621712010-04-24 17:59:49 +00006491"
Gregory P. Smith69140482012-01-16 02:05:55 -08006492if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006493 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006494#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006495_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006496
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006497fi
6498
6499done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006500
6501
Martin v. Löwis11017b12006-01-14 18:12:57 +00006502# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006503for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006504do :
6505 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00006506#ifdef HAVE_ASM_TYPES_H
6507#include <asm/types.h>
6508#endif
6509#ifdef HAVE_SYS_SOCKET_H
6510#include <sys/socket.h>
6511#endif
6512
Matthias Kloseb9621712010-04-24 17:59:49 +00006513"
Gregory P. Smith69140482012-01-16 02:05:55 -08006514if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006515 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006516#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006517_ACEOF
6518
6519fi
6520
6521done
6522
6523
Guido van Rossum627b2d71993-12-24 10:39:16 +00006524# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006525was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6527$as_echo_n "checking for clock_t in time.h... " >&6; }
6528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006529/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006530#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006531
6532_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006534 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006535 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006536else
Martin v. Löwis11437992002-04-12 09:54:03 +00006537
6538
Matthias Kloseb9621712010-04-24 17:59:49 +00006539$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006540
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006541
Guido van Rossum627b2d71993-12-24 10:39:16 +00006542fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006543rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006544
Matthias Kloseb9621712010-04-24 17:59:49 +00006545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6546$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006547
Neal Norwitz11690112002-07-30 01:08:28 +00006548# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6550$as_echo_n "checking for makedev... " >&6; }
6551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006552/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006553
Jesus Cea740f53a2010-04-28 11:35:30 +00006554#if defined(MAJOR_IN_MKDEV)
6555#include <sys/mkdev.h>
6556#elif defined(MAJOR_IN_SYSMACROS)
6557#include <sys/sysmacros.h>
6558#else
6559#include <sys/types.h>
6560#endif
6561
Neal Norwitz11690112002-07-30 01:08:28 +00006562int
6563main ()
6564{
Jesus Cea740f53a2010-04-28 11:35:30 +00006565
6566 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006567 ;
6568 return 0;
6569}
Matthias Kloseb159a552010-04-25 21:00:44 +00006570
Neal Norwitz11690112002-07-30 01:08:28 +00006571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006572if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006573 ac_cv_has_makedev=yes
6574else
Matthias Kloseb9621712010-04-24 17:59:49 +00006575 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006577rm -f core conftest.err conftest.$ac_objext \
6578 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006579if test "$ac_cv_has_makedev" = "no"; then
6580 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006582/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006583
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006584#define _OSF_SOURCE 1
6585#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006586
Neal Norwitz11690112002-07-30 01:08:28 +00006587int
6588main ()
6589{
6590 makedev(0, 0)
6591 ;
6592 return 0;
6593}
6594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006595if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006596 ac_cv_has_makedev=yes
6597else
Matthias Kloseb9621712010-04-24 17:59:49 +00006598 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006600rm -f core conftest.err conftest.$ac_objext \
6601 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006602 if test "$ac_cv_has_makedev" = "yes"; then
6603
Matthias Kloseb9621712010-04-24 17:59:49 +00006604$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006605
6606 fi
6607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6609$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006610if test "$ac_cv_has_makedev" = "yes"; then
6611
Matthias Kloseb9621712010-04-24 17:59:49 +00006612$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006613
6614fi
6615
Martin v. Löwis399a6892002-10-04 10:22:02 +00006616# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6617# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6618# defined, but the compiler does not support pragma redefine_extname,
6619# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6620# structures (such as rlimit64) without declaring them. As a
6621# work-around, disable LFS on such configurations
6622
6623use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6625$as_echo_n "checking Solaris LFS bug... " >&6; }
6626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006627/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006628
6629#define _LARGEFILE_SOURCE 1
6630#define _FILE_OFFSET_BITS 64
6631#include <sys/resource.h>
6632
Martin v. Löwis399a6892002-10-04 10:22:02 +00006633int
6634main ()
6635{
6636struct rlimit foo;
6637 ;
6638 return 0;
6639}
6640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006641if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006642 sol_lfs_bug=no
6643else
Matthias Kloseb9621712010-04-24 17:59:49 +00006644 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6648$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006649if test "$sol_lfs_bug" = "yes"; then
6650 use_lfs=no
6651fi
6652
6653if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006654# Two defines needed to enable largefile support on various platforms
6655# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006656case $ac_sys_system/$ac_sys_release in
6657AIX*)
6658
6659$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6660
6661 ;;
6662esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006663
Matthias Kloseb9621712010-04-24 17:59:49 +00006664$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006665
6666
Matthias Kloseb9621712010-04-24 17:59:49 +00006667$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006668
Martin v. Löwis399a6892002-10-04 10:22:02 +00006669fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006670
Guido van Rossum84e7b241996-08-19 21:59:00 +00006671# Add some code to confdefs.h so that the test for off_t works on SCO
6672cat >> confdefs.h <<\EOF
6673#if defined(SCO_DS)
6674#undef _OFF_T
6675#endif
6676EOF
6677
Guido van Rossumef2255b2000-03-10 22:30:29 +00006678# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006679ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006680if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006681
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006682else
Martin v. Löwis11437992002-04-12 09:54:03 +00006683
6684cat >>confdefs.h <<_ACEOF
6685#define mode_t int
6686_ACEOF
6687
6688fi
6689
Matthias Kloseb9621712010-04-24 17:59:49 +00006690ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006691if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006692
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006693else
Martin v. Löwis11437992002-04-12 09:54:03 +00006694
6695cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006696#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006697_ACEOF
6698
6699fi
6700
Matthias Kloseb9621712010-04-24 17:59:49 +00006701ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006702if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006703
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006704else
Martin v. Löwis11437992002-04-12 09:54:03 +00006705
6706cat >>confdefs.h <<_ACEOF
6707#define pid_t int
6708_ACEOF
6709
6710fi
6711
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006712
Martin v. Löwis11437992002-04-12 09:54:03 +00006713cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006714#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006715_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006716
Matthias Kloseb9621712010-04-24 17:59:49 +00006717ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006718if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006719
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006720else
Martin v. Löwis11437992002-04-12 09:54:03 +00006721
6722cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006723#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006724_ACEOF
6725
6726fi
6727
Matthias Kloseb9621712010-04-24 17:59:49 +00006728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6729$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006730if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006731 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006732else
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006734/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006735#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006736
6737_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006738if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006739 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006740 ac_cv_type_uid_t=yes
6741else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006742 ac_cv_type_uid_t=no
6743fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006744rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006745
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6748$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006749if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006750
Matthias Kloseb9621712010-04-24 17:59:49 +00006751$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006752
6753
Matthias Kloseb9621712010-04-24 17:59:49 +00006754$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006755
6756fi
6757
Mark Dickinsonce31f662012-12-02 13:20:22 +00006758
6759# There are two separate checks for each of the exact-width integer types we
6760# need. First we check whether the type is available using the usual
6761# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
6762# and <stdint.h> where available). We then also use the special type checks of
6763# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
6764# directly, #define's uint32_t to be a suitable type.
6765
6766ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
6767if test "x$ac_cv_type_uint32_t" = xyes; then :
6768
6769$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
6770
6771fi
6772
Matthias Kloseb9621712010-04-24 17:59:49 +00006773ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6774case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006775 no|yes) ;; #(
6776 *)
6777
Matthias Kloseb9621712010-04-24 17:59:49 +00006778$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006779
6780
6781cat >>confdefs.h <<_ACEOF
6782#define uint32_t $ac_cv_c_uint32_t
6783_ACEOF
6784;;
6785 esac
6786
Mark Dickinsonce31f662012-12-02 13:20:22 +00006787
6788ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
6789if test "x$ac_cv_type_uint64_t" = xyes; then :
6790
6791$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
6792
6793fi
6794
Matthias Kloseb9621712010-04-24 17:59:49 +00006795ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6796case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006797 no|yes) ;; #(
6798 *)
6799
Matthias Kloseb9621712010-04-24 17:59:49 +00006800$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006801
6802
6803cat >>confdefs.h <<_ACEOF
6804#define uint64_t $ac_cv_c_uint64_t
6805_ACEOF
6806;;
6807 esac
6808
Mark Dickinsonce31f662012-12-02 13:20:22 +00006809
6810ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
6811if test "x$ac_cv_type_int32_t" = xyes; then :
6812
6813$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
6814
6815fi
6816
Matthias Kloseb9621712010-04-24 17:59:49 +00006817ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6818case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006819 no|yes) ;; #(
6820 *)
6821
6822cat >>confdefs.h <<_ACEOF
6823#define int32_t $ac_cv_c_int32_t
6824_ACEOF
6825;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006826esac
6827
Mark Dickinsonce31f662012-12-02 13:20:22 +00006828
6829ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
6830if test "x$ac_cv_type_int64_t" = xyes; then :
6831
6832$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
6833
6834fi
6835
Matthias Kloseb9621712010-04-24 17:59:49 +00006836ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6837case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006838 no|yes) ;; #(
6839 *)
6840
6841cat >>confdefs.h <<_ACEOF
6842#define int64_t $ac_cv_c_int64_t
6843_ACEOF
6844;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006845esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006846
Mark Dickinsonce31f662012-12-02 13:20:22 +00006847
Matthias Kloseb9621712010-04-24 17:59:49 +00006848ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006849if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006850
Matthias Kloseb9621712010-04-24 17:59:49 +00006851$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006852
6853fi
6854
Jack Jansendd19cf82001-12-06 22:36:17 +00006855
Michael W. Hudson54241132001-12-07 15:38:26 +00006856# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006857# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006858# The cast to long int works around a bug in the HP C Compiler
6859# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6860# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6861# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6863$as_echo_n "checking size of int... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006864if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006865 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006866else
Matthias Kloseb9621712010-04-24 17:59:49 +00006867 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006868
Martin v. Löwis11437992002-04-12 09:54:03 +00006869else
Matthias Kloseb9621712010-04-24 17:59:49 +00006870 if test "$ac_cv_type_int" = yes; then
6871 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006873as_fn_error 77 "cannot compute sizeof (int)
Gregory P. Smith69140482012-01-16 02:05:55 -08006874See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006875 else
6876 ac_cv_sizeof_int=0
6877 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006879
Martin v. Löwis11437992002-04-12 09:54:03 +00006880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6882$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006883
6884
6885
Martin v. Löwis11437992002-04-12 09:54:03 +00006886cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006887#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006888_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006889
6890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006891# The cast to long int works around a bug in the HP C Compiler
6892# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6893# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6894# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6896$as_echo_n "checking size of long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006897if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006898 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006899else
Matthias Kloseb9621712010-04-24 17:59:49 +00006900 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006901
Martin v. Löwis11437992002-04-12 09:54:03 +00006902else
Matthias Kloseb9621712010-04-24 17:59:49 +00006903 if test "$ac_cv_type_long" = yes; then
6904 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006906as_fn_error 77 "cannot compute sizeof (long)
Gregory P. Smith69140482012-01-16 02:05:55 -08006907See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006908 else
6909 ac_cv_sizeof_long=0
6910 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006912
Martin v. Löwis11437992002-04-12 09:54:03 +00006913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6915$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006916
6917
6918
Martin v. Löwis11437992002-04-12 09:54:03 +00006919cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006920#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006921_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006922
6923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006924# The cast to long int works around a bug in the HP C Compiler
6925# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6926# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6927# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6929$as_echo_n "checking size of void *... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006930if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006932else
Matthias Kloseb9621712010-04-24 17:59:49 +00006933 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006934
Martin v. Löwis11437992002-04-12 09:54:03 +00006935else
Matthias Kloseb9621712010-04-24 17:59:49 +00006936 if test "$ac_cv_type_void_p" = yes; then
6937 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6938$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006939as_fn_error 77 "cannot compute sizeof (void *)
Gregory P. Smith69140482012-01-16 02:05:55 -08006940See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006941 else
6942 ac_cv_sizeof_void_p=0
6943 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006945
Martin v. Löwis11437992002-04-12 09:54:03 +00006946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6948$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006949
6950
6951
Martin v. Löwis11437992002-04-12 09:54:03 +00006952cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006953#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006954_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006955
6956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006957# The cast to long int works around a bug in the HP C Compiler
6958# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6959# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6960# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6962$as_echo_n "checking size of short... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006963if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006965else
Matthias Kloseb9621712010-04-24 17:59:49 +00006966 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006967
Martin v. Löwis11437992002-04-12 09:54:03 +00006968else
Matthias Kloseb9621712010-04-24 17:59:49 +00006969 if test "$ac_cv_type_short" = yes; then
6970 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006972as_fn_error 77 "cannot compute sizeof (short)
Gregory P. Smith69140482012-01-16 02:05:55 -08006973See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006974 else
6975 ac_cv_sizeof_short=0
6976 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006978
Martin v. Löwis11437992002-04-12 09:54:03 +00006979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6981$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006982
6983
6984
Martin v. Löwis11437992002-04-12 09:54:03 +00006985cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006986#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006987_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006988
6989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006990# The cast to long int works around a bug in the HP C Compiler
6991# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6992# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6993# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6995$as_echo_n "checking size of float... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006996if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006997 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006998else
Matthias Kloseb9621712010-04-24 17:59:49 +00006999 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007000
Martin v. Löwis11437992002-04-12 09:54:03 +00007001else
Matthias Kloseb9621712010-04-24 17:59:49 +00007002 if test "$ac_cv_type_float" = yes; then
7003 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007005as_fn_error 77 "cannot compute sizeof (float)
Gregory P. Smith69140482012-01-16 02:05:55 -08007006See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007007 else
7008 ac_cv_sizeof_float=0
7009 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007011
Martin v. Löwis11437992002-04-12 09:54:03 +00007012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7014$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015
7016
7017
Martin v. Löwis11437992002-04-12 09:54:03 +00007018cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007019#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007020_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007021
7022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007023# The cast to long int works around a bug in the HP C Compiler
7024# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7025# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7026# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7028$as_echo_n "checking size of double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007029if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007030 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007031else
Matthias Kloseb9621712010-04-24 17:59:49 +00007032 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007033
Martin v. Löwis11437992002-04-12 09:54:03 +00007034else
Matthias Kloseb9621712010-04-24 17:59:49 +00007035 if test "$ac_cv_type_double" = yes; then
7036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007038as_fn_error 77 "cannot compute sizeof (double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007039See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040 else
7041 ac_cv_sizeof_double=0
7042 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007044
Martin v. Löwis11437992002-04-12 09:54:03 +00007045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7047$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007048
7049
7050
Martin v. Löwis11437992002-04-12 09:54:03 +00007051cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007052#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007053_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007054
7055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007056# The cast to long int works around a bug in the HP C Compiler
7057# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7058# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7059# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7061$as_echo_n "checking size of fpos_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007062if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007063 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007064else
Matthias Kloseb9621712010-04-24 17:59:49 +00007065 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007066
Martin v. Löwis11437992002-04-12 09:54:03 +00007067else
Matthias Kloseb9621712010-04-24 17:59:49 +00007068 if test "$ac_cv_type_fpos_t" = yes; then
7069 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007071as_fn_error 77 "cannot compute sizeof (fpos_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007072See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007073 else
7074 ac_cv_sizeof_fpos_t=0
7075 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007076fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007077
Martin v. Löwis11437992002-04-12 09:54:03 +00007078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7080$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007081
7082
7083
Martin v. Löwis11437992002-04-12 09:54:03 +00007084cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007085#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007086_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007087
Michael W. Hudson54241132001-12-07 15:38:26 +00007088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007089# The cast to long int works around a bug in the HP C Compiler
7090# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7091# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7092# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7094$as_echo_n "checking size of size_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007095if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007096 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007097else
Matthias Kloseb9621712010-04-24 17:59:49 +00007098 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00007099
Martin v. Löwis18e16552006-02-15 17:27:45 +00007100else
Matthias Kloseb9621712010-04-24 17:59:49 +00007101 if test "$ac_cv_type_size_t" = yes; then
7102 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7103$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007104as_fn_error 77 "cannot compute sizeof (size_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007105See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007106 else
7107 ac_cv_sizeof_size_t=0
7108 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007110
Martin v. Löwis18e16552006-02-15 17:27:45 +00007111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7113$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007114
7115
7116
Martin v. Löwis18e16552006-02-15 17:27:45 +00007117cat >>confdefs.h <<_ACEOF
7118#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7119_ACEOF
7120
7121
Christian Heimes400adb02008-02-01 08:12:03 +00007122# The cast to long int works around a bug in the HP C Compiler
7123# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7124# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7125# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7127$as_echo_n "checking size of pid_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007128if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007129 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007130else
Matthias Kloseb9621712010-04-24 17:59:49 +00007131 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00007132
Christian Heimes400adb02008-02-01 08:12:03 +00007133else
Matthias Kloseb9621712010-04-24 17:59:49 +00007134 if test "$ac_cv_type_pid_t" = yes; then
7135 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007137as_fn_error 77 "cannot compute sizeof (pid_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007138See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007139 else
7140 ac_cv_sizeof_pid_t=0
7141 fi
7142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007143
Christian Heimes400adb02008-02-01 08:12:03 +00007144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7146$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007147
7148
7149
7150cat >>confdefs.h <<_ACEOF
7151#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7152_ACEOF
7153
7154
Michael W. Hudson54241132001-12-07 15:38:26 +00007155
Matthias Kloseb9621712010-04-24 17:59:49 +00007156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7157$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007158have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007160/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007161
Martin v. Löwis11437992002-04-12 09:54:03 +00007162int
7163main ()
7164{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007165long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007166 ;
7167 return 0;
7168}
7169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007170if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007171
7172
Matthias Kloseb9621712010-04-24 17:59:49 +00007173$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007174
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007175 have_long_long=yes
7176
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7180$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007181if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007182# The cast to long int works around a bug in the HP C Compiler
7183# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7184# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7185# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7187$as_echo_n "checking size of long long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007188if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007189 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007190else
Matthias Kloseb9621712010-04-24 17:59:49 +00007191 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007192
Martin v. Löwis11437992002-04-12 09:54:03 +00007193else
Matthias Kloseb9621712010-04-24 17:59:49 +00007194 if test "$ac_cv_type_long_long" = yes; then
7195 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7196$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007197as_fn_error 77 "cannot compute sizeof (long long)
Gregory P. Smith69140482012-01-16 02:05:55 -08007198See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007199 else
7200 ac_cv_sizeof_long_long=0
7201 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007203
Martin v. Löwis11437992002-04-12 09:54:03 +00007204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7206$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007207
7208
7209
Martin v. Löwis11437992002-04-12 09:54:03 +00007210cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007211#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007212_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007213
Michael W. Hudson54241132001-12-07 15:38:26 +00007214
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007215fi
7216
Matthias Kloseb9621712010-04-24 17:59:49 +00007217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7218$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007219have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007221/* end confdefs.h. */
7222
7223int
7224main ()
7225{
7226long double x; x = (long double)0;
7227 ;
7228 return 0;
7229}
7230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007231if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007232
7233
Matthias Kloseb9621712010-04-24 17:59:49 +00007234$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007235
7236 have_long_double=yes
7237
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007238fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7241$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007242if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007243# The cast to long int works around a bug in the HP C Compiler
7244# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7245# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7246# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7248$as_echo_n "checking size of long double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007249if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007251else
Matthias Kloseb9621712010-04-24 17:59:49 +00007252 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007253
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007254else
Matthias Kloseb9621712010-04-24 17:59:49 +00007255 if test "$ac_cv_type_long_double" = yes; then
7256 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007258as_fn_error 77 "cannot compute sizeof (long double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007259See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007260 else
7261 ac_cv_sizeof_long_double=0
7262 fi
7263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007264
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7267$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007268
7269
7270
7271cat >>confdefs.h <<_ACEOF
7272#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7273_ACEOF
7274
7275
7276fi
7277
7278
Matthias Kloseb9621712010-04-24 17:59:49 +00007279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7280$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007281have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007283/* end confdefs.h. */
7284
7285int
7286main ()
7287{
7288_Bool x; x = (_Bool)0;
7289 ;
7290 return 0;
7291}
7292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007293if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007294
7295
Matthias Kloseb9621712010-04-24 17:59:49 +00007296$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007297
7298 have_c99_bool=yes
7299
Thomas Woutersb2137042007-02-01 18:02:27 +00007300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7303$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007304if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007305# The cast to long int works around a bug in the HP C Compiler
7306# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7307# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7308# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7310$as_echo_n "checking size of _Bool... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007311if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007312 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007313else
Matthias Kloseb9621712010-04-24 17:59:49 +00007314 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007315
Thomas Woutersb2137042007-02-01 18:02:27 +00007316else
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 if test "$ac_cv_type__Bool" = yes; then
7318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007320as_fn_error 77 "cannot compute sizeof (_Bool)
Gregory P. Smith69140482012-01-16 02:05:55 -08007321See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007322 else
7323 ac_cv_sizeof__Bool=0
7324 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007326
Thomas Woutersb2137042007-02-01 18:02:27 +00007327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7329$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007330
7331
7332
Thomas Woutersb2137042007-02-01 18:02:27 +00007333cat >>confdefs.h <<_ACEOF
7334#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7335_ACEOF
7336
7337
7338fi
7339
Matthias Kloseb9621712010-04-24 17:59:49 +00007340ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007341 #include <stdint.h>
7342 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007343 #ifdef HAVE_INTTYPES_H
7344 #include <inttypes.h>
7345 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007346"
Gregory P. Smith69140482012-01-16 02:05:55 -08007347if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007348
7349cat >>confdefs.h <<_ACEOF
7350#define HAVE_UINTPTR_T 1
7351_ACEOF
7352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007353# The cast to long int works around a bug in the HP C Compiler
7354# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7355# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7356# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7358$as_echo_n "checking size of uintptr_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007359if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007360 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007361else
Matthias Kloseb9621712010-04-24 17:59:49 +00007362 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007363
Martin v. Löwis11437992002-04-12 09:54:03 +00007364else
Matthias Kloseb9621712010-04-24 17:59:49 +00007365 if test "$ac_cv_type_uintptr_t" = yes; then
7366 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7367$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007368as_fn_error 77 "cannot compute sizeof (uintptr_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007369See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007370 else
7371 ac_cv_sizeof_uintptr_t=0
7372 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007374
Martin v. Löwis11437992002-04-12 09:54:03 +00007375fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7377$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007378
7379
7380
Martin v. Löwis11437992002-04-12 09:54:03 +00007381cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007382#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007383_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007384
Michael W. Hudson54241132001-12-07 15:38:26 +00007385
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007386fi
7387
Thomas Wouters89f507f2006-12-13 04:49:30 +00007388
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007389# The cast to long int works around a bug in the HP C Compiler
7390# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7391# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7392# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7394$as_echo_n "checking size of off_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007395if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007397else
Matthias Kloseb9621712010-04-24 17:59:49 +00007398 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007399#ifdef HAVE_SYS_TYPES_H
7400#include <sys/types.h>
7401#endif
7402
Matthias Kloseb9621712010-04-24 17:59:49 +00007403"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007404
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007405else
Matthias Kloseb9621712010-04-24 17:59:49 +00007406 if test "$ac_cv_type_off_t" = yes; then
7407 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007409as_fn_error 77 "cannot compute sizeof (off_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007410See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007411 else
7412 ac_cv_sizeof_off_t=0
7413 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007415
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7418$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007419
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007420
7421
Martin v. Löwis11437992002-04-12 09:54:03 +00007422cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007423#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007424_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007425
Michael W. Hudson54241132001-12-07 15:38:26 +00007426
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007427
Matthias Kloseb9621712010-04-24 17:59:49 +00007428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7429$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007430if test "$have_long_long" = yes
7431then
7432if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007433 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007434
Matthias Kloseb9621712010-04-24 17:59:49 +00007435$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007436
Matthias Kloseb9621712010-04-24 17:59:49 +00007437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7438$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007439else
Matthias Kloseb9621712010-04-24 17:59:49 +00007440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7441$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007442fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007443else
Matthias Kloseb9621712010-04-24 17:59:49 +00007444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7445$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007446fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007447
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007448# The cast to long int works around a bug in the HP C Compiler
7449# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7450# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7451# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7453$as_echo_n "checking size of time_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007454if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007455 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007456else
Matthias Kloseb9621712010-04-24 17:59:49 +00007457 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007458#ifdef HAVE_SYS_TYPES_H
7459#include <sys/types.h>
7460#endif
7461#ifdef HAVE_TIME_H
7462#include <time.h>
7463#endif
7464
Matthias Kloseb9621712010-04-24 17:59:49 +00007465"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007466
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007467else
Matthias Kloseb9621712010-04-24 17:59:49 +00007468 if test "$ac_cv_type_time_t" = yes; then
7469 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7470$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007471as_fn_error 77 "cannot compute sizeof (time_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007472See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007473 else
7474 ac_cv_sizeof_time_t=0
7475 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007477
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7480$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007481
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007482
7483
Martin v. Löwis11437992002-04-12 09:54:03 +00007484cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007485#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007486_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007487
Michael W. Hudson54241132001-12-07 15:38:26 +00007488
7489
Trent Mick635f6fb2000-08-23 21:33:05 +00007490# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007491ac_save_cc="$CC"
7492if test "$ac_cv_kpthread" = "yes"
7493then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007494elif test "$ac_cv_kthread" = "yes"
7495then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007496elif test "$ac_cv_pthread" = "yes"
7497then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007498fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007499
Matthias Kloseb9621712010-04-24 17:59:49 +00007500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7501$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007502have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007504/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007505
7506 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007507int
7508main ()
7509{
Guido van Rossum12580492000-09-24 16:47:19 +00007510pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007511 ;
7512 return 0;
7513}
Matthias Kloseb159a552010-04-25 21:00:44 +00007514
Martin v. Löwis11437992002-04-12 09:54:03 +00007515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007516if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007517 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7521$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007522if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007523 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7526# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7528$as_echo_n "checking size of pthread_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007529if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007530 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007531else
Matthias Kloseb9621712010-04-24 17:59:49 +00007532 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007533#ifdef HAVE_PTHREAD_H
7534#include <pthread.h>
7535#endif
7536
Matthias Kloseb9621712010-04-24 17:59:49 +00007537"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007538
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007539else
Matthias Kloseb9621712010-04-24 17:59:49 +00007540 if test "$ac_cv_type_pthread_t" = yes; then
7541 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007543as_fn_error 77 "cannot compute sizeof (pthread_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007544See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007545 else
7546 ac_cv_sizeof_pthread_t=0
7547 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007549
Trent Mick635f6fb2000-08-23 21:33:05 +00007550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7552$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007553
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007554
7555
Martin v. Löwis11437992002-04-12 09:54:03 +00007556cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007557#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007558_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007559
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007560
Trent Mick635f6fb2000-08-23 21:33:05 +00007561fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007562CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007563
Michael W. Hudson54241132001-12-07 15:38:26 +00007564
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007565case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007566 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007567 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7568 ;;
7569 Darwin/*)
7570 OTHER_LIBTOOL_OPT=""
7571 ;;
7572esac
7573
7574
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007575ARCH_RUN_32BIT=""
7576
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007577case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007578 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007579 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7580 if test "${enable_universalsdk}"; then
7581 :
7582 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007583 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007584 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007585 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007586 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007587 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007588 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007589 if test ${gcc_version} '<' 4.0
7590 then
7591 LIBTOOL_CRUFT="-lcc_dynamic"
7592 else
7593 LIBTOOL_CRUFT=""
7594 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007595 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007596 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007597else
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007599/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007600
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007601 #include <unistd.h>
7602 int main(int argc, char*argv[])
7603 {
7604 if (sizeof(long) == 4) {
7605 return 0;
7606 } else {
7607 return 1;
7608 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007609 }
7610
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007612if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007613 ac_osx_32bit=yes
7614else
Matthias Kloseb9621712010-04-24 17:59:49 +00007615 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7618 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007619fi
7620
7621
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007622 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007623 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007624 i386)
7625 MACOSX_DEFAULT_ARCH="i386"
7626 ;;
7627 ppc)
7628 MACOSX_DEFAULT_ARCH="ppc"
7629 ;;
7630 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007631 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007632 ;;
7633 esac
7634 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007635 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007636 i386)
7637 MACOSX_DEFAULT_ARCH="x86_64"
7638 ;;
7639 ppc)
7640 MACOSX_DEFAULT_ARCH="ppc64"
7641 ;;
7642 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007643 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007644 ;;
7645 esac
7646
7647 #ARCH_RUN_32BIT="true"
7648 fi
7649
7650 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007651 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007652 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007653esac
7654
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7656$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007657if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007658then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007659 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007660 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007661 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007662
Matthias Kloseb9621712010-04-24 17:59:49 +00007663$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007664
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7666$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007667 if test $enable_shared = "yes"
7668 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007669 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00007670 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007671else
Matthias Kloseb9621712010-04-24 17:59:49 +00007672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7673$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007674fi
7675
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7677$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007678case $ac_sys_system/$ac_sys_release in
7679 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007680
Matthias Kloseb9621712010-04-24 17:59:49 +00007681$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007682
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7684$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007685 ;;
7686 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7688$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007689 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007690esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007691
Guido van Rossum0a516c91994-09-12 10:58:40 +00007692# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007693
Michael W. Hudson54241132001-12-07 15:38:26 +00007694
7695
7696
7697
Benjamin Peterson99f03762010-04-11 22:15:28 +00007698
Thomas Wouters477c8d52006-05-27 19:21:47 +00007699
Georg Brandlb1441c72009-01-03 22:33:39 +00007700
Thomas Wouters477c8d52006-05-27 19:21:47 +00007701cat >>confdefs.h <<_ACEOF
7702#define SHLIB_EXT "$SO"
7703_ACEOF
7704
Guido van Rossum0a516c91994-09-12 10:58:40 +00007705# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007706# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007707# (Shared libraries in this instance are shared modules to be loaded into
7708# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7710$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007711if test -z "$LDSHARED"
7712then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007713 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007714 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007715 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007716 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007717 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007718 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007719 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007720 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007721 if test "$GCC" = "yes" ; then
7722 LDSHARED='$(CC) -shared'
7723 LDCXXSHARED='$(CXX) -shared'
7724 else
7725 LDSHARED='$(CC) -G'
7726 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007727 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007728 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007729 if test "$GCC" = "yes" ; then
7730 LDSHARED='$(CC) -shared'
7731 LDCXXSHARED='$(CXX) -shared'
7732 else
7733 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007734 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007735 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007736 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007737 LDSHARED='$(CC) -bundle'
7738 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007739 if test "$enable_framework" ; then
7740 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007741 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7742 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007743 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007744 else
7745 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007746 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007747 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007748 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007749 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007750 LDSHARED='$(CC) -bundle'
7751 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007752 if test "$enable_framework" ; then
7753 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007754 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7755 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007756 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007757 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007758 # No framework, use the Python app as bundle-loader
7759 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007760 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007761 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007762 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007763 Darwin/*)
7764 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7765 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007766
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007767 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007768 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007769 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007770 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007771 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007772 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7773 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007774 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007775 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007776 LDSHARED='$(CC) -bundle'
7777 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007778 if test "$enable_framework" ; then
7779 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007780 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7781 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007782 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007783 else
7784 # No framework, use the Python app as bundle-loader
7785 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7786 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007787 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007788 fi
7789 fi
7790 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007791 Linux*|GNU*|QNX*)
7792 LDSHARED='$(CC) -shared'
7793 LDCXXSHARED='$(CXX) -shared';;
7794 BSD/OS*/4*)
7795 LDSHARED="gcc -shared"
7796 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007797 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007798 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007799 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007800 LDSHARED='$(CC) -shared'
7801 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007802 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007803 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007804 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007805 OpenBSD*)
7806 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7807 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007808 LDSHARED='$(CC) -shared $(CCSHARED)'
7809 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007810 else
7811 case `uname -r` in
7812 [01].* | 2.[0-7] | 2.[0-7].*)
7813 LDSHARED="ld -Bshareable ${LDFLAGS}"
7814 ;;
7815 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007816 LDSHARED='$(CC) -shared $(CCSHARED)'
7817 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007818 ;;
7819 esac
7820 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007821 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007822 LDSHARED='$(CC) -shared'
7823 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007824 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007825 if test "$GCC" = "yes" ; then
7826 LDSHARED='$(CC) -shared'
7827 LDCXXSHARED='$(CXX) -shared'
7828 else
7829 LDSHARED='$(CC) -G'
7830 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007831 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007832 SCO_SV*)
7833 LDSHARED='$(CC) -Wl,-G,-Bexport'
7834 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7835 CYGWIN*)
7836 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7837 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007838 *) LDSHARED="ld";;
7839 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7842$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007843LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007844BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007845# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007846# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7848$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007849if test -z "$CCSHARED"
7850then
Guido van Rossum07397971997-04-29 21:49:50 +00007851 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007852 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007853 then CCSHARED="-fPIC";
7854 elif test `uname -p` = sparc;
7855 then CCSHARED="-xcode=pic32";
7856 else CCSHARED="-Kpic";
7857 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007858 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007859 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007860 else CCSHARED="+z";
7861 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007862 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007863 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007864 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007865 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007866 if test "$GCC" = "yes"
7867 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007868 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007869 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007870 SCO_SV*)
7871 if test "$GCC" = "yes"
7872 then CCSHARED="-fPIC"
7873 else CCSHARED="-Kpic -belf"
7874 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007875 IRIX*/6*) case $CC in
7876 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007877 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007878 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007879 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7882$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007883# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007884# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7886$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007887if test -z "$LINKFORSHARED"
7888then
Guido van Rossum07397971997-04-29 21:49:50 +00007889 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007890 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007891 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007892 LINKFORSHARED="-Wl,-E -Wl,+s";;
7893# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007894 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007895 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007896 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007898 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007899 if test "$enable_framework"
7900 then
Jack Jansenda49e192005-01-07 13:08:22 +00007901 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007902 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007903 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007904 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007905 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007906 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007907 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007908 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7909 then
7910 LINKFORSHARED="-Wl,--export-dynamic"
7911 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007912 SunOS/5*) case $CC in
7913 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007914 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007915 then
7916 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007917 fi;;
7918 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007919 CYGWIN*)
7920 if test $enable_shared = "no"
7921 then
7922 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7923 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007924 QNX*)
7925 # -Wl,-E causes the symbols to be added to the dynamic
7926 # symbol table so that they can be found when a module
7927 # is loaded. -N 2048K causes the stack size to be set
7928 # to 2048 kilobytes so that the stack doesn't overflow
7929 # when running test_compile.py.
7930 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007931 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7934$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007935
Michael W. Hudson54241132001-12-07 15:38:26 +00007936
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007937
Matthias Kloseb9621712010-04-24 17:59:49 +00007938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7939$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007940if test ! "$LIBRARY" = "$LDLIBRARY"
7941then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007942 case $ac_sys_system in
7943 CYGWIN*)
7944 # Cygwin needs CCSHARED when building extension DLLs
7945 # but not when building the interpreter DLL.
7946 CFLAGSFORSHARED='';;
7947 *)
7948 CFLAGSFORSHARED='$(CCSHARED)'
7949 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7952$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007953
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007954# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7955# library (with --enable-shared).
7956# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007957# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7958# if it is not required, since it creates a dependency of the shared library
7959# to LIBS. This, in turn, means that applications linking the shared libpython
7960# don't need to link LIBS explicitly. The default should be only changed
7961# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007962
Matthias Kloseb9621712010-04-24 17:59:49 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7964$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007965case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007966 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007967 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7970$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007971
7972
Guido van Rossum627b2d71993-12-24 10:39:16 +00007973# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7975$as_echo_n "checking for dlopen in -ldl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007976if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007977 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007978else
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007980LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984/* Override any GCC internal prototype to avoid an error.
7985 Use char because int might match the return type of a GCC
7986 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007987#ifdef __cplusplus
7988extern "C"
7989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007990char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007991int
7992main ()
7993{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 ;
7996 return 0;
7997}
7998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007999if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008000 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008001else
Matthias Kloseb9621712010-04-24 17:59:49 +00008002 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008004rm -f core conftest.err conftest.$ac_objext \
8005 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008006LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8009$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008010if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 cat >>confdefs.h <<_ACEOF
8012#define HAVE_LIBDL 1
8013_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008014
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008015 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008017fi
8018 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8020$as_echo_n "checking for shl_load in -ldld... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008021if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008023else
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008025LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029/* Override any GCC internal prototype to avoid an error.
8030 Use char because int might match the return type of a GCC
8031 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008032#ifdef __cplusplus
8033extern "C"
8034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008035char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008036int
8037main ()
8038{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 ;
8041 return 0;
8042}
8043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008044if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008045 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008046else
Matthias Kloseb9621712010-04-24 17:59:49 +00008047 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008048fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008049rm -f core conftest.err conftest.$ac_objext \
8050 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008051LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8054$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008055if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008056 cat >>confdefs.h <<_ACEOF
8057#define HAVE_LIBDLD 1
8058_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008059
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008060 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008062fi
8063 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008064
Georg Brandlb1441c72009-01-03 22:33:39 +00008065# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008066if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8068$as_echo_n "checking for library containing sem_init... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008069if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008070 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008071else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008072 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008074/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008075
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076/* Override any GCC internal prototype to avoid an error.
8077 Use char because int might match the return type of a GCC
8078 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008079#ifdef __cplusplus
8080extern "C"
8081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008082char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008083int
8084main ()
8085{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008086return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008087 ;
8088 return 0;
8089}
8090_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091for ac_lib in '' pthread rt posix4; do
8092 if test -z "$ac_lib"; then
8093 ac_res="none required"
8094 else
8095 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008096 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008099 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008101rm -f core conftest.err conftest.$ac_objext \
8102 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08008103 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106done
Gregory P. Smith69140482012-01-16 02:05:55 -08008107if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109else
8110 ac_cv_search_sem_init=no
8111fi
8112rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008113LIBS=$ac_func_search_save_LIBS
8114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8116$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008117ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008118if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008120
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008121fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008122 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008123 # posix4 on Solaris 2.6
8124 # pthread (first!) on Linux
8125fi
8126
Martin v. Löwis19d17342003-06-14 21:03:05 +00008127# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8129$as_echo_n "checking for textdomain in -lintl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008130if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008132else
8133 ac_check_lib_save_LIBS=$LIBS
8134LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008136/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138/* Override any GCC internal prototype to avoid an error.
8139 Use char because int might match the return type of a GCC
8140 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008141#ifdef __cplusplus
8142extern "C"
8143#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008144char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008145int
8146main ()
8147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008149 ;
8150 return 0;
8151}
8152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008153if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008154 ac_cv_lib_intl_textdomain=yes
8155else
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008158rm -f core conftest.err conftest.$ac_objext \
8159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008160LIBS=$ac_check_lib_save_LIBS
8161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8163$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008164if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008165
Matthias Kloseb9621712010-04-24 17:59:49 +00008166$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008167
Brett Cannonc6d936e2009-06-07 20:09:53 +00008168 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008169fi
8170
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008171
8172# checks for system dependent C++ extensions support
8173case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008174 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8175$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008177/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008178
Georg Brandl59e87bd2011-02-15 19:48:59 +00008179 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008180int
8181main ()
8182{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008183loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008184 ;
8185 return 0;
8186}
Matthias Kloseb159a552010-04-25 21:00:44 +00008187
Martin v. Löwis11437992002-04-12 09:54:03 +00008188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008189if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008190
Matthias Kloseb159a552010-04-25 21:00:44 +00008191
Matthias Kloseb9621712010-04-24 17:59:49 +00008192$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008193
Matthias Kloseb159a552010-04-25 21:00:44 +00008194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008195$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008196
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008197else
Matthias Kloseb159a552010-04-25 21:00:44 +00008198
8199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008200$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008201
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008203rm -f core conftest.err conftest.$ac_objext \
8204 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008205 *) ;;
8206esac
8207
Guido van Rossum70c7f481998-03-26 18:44:10 +00008208# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8210$as_echo_n "checking for t_open in -lnsl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008211if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008213else
Martin v. Löwis11437992002-04-12 09:54:03 +00008214 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008215LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219/* Override any GCC internal prototype to avoid an error.
8220 Use char because int might match the return type of a GCC
8221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008222#ifdef __cplusplus
8223extern "C"
8224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008225char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008226int
8227main ()
8228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 ;
8231 return 0;
8232}
8233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008235 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008239rm -f core conftest.err conftest.$ac_objext \
8240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008241LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8244$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008245if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008246 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008247fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008248 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8250$as_echo_n "checking for socket in -lsocket... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008251if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008252 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008253else
Martin v. Löwis11437992002-04-12 09:54:03 +00008254 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008255LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008259/* Override any GCC internal prototype to avoid an error.
8260 Use char because int might match the return type of a GCC
8261 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008262#ifdef __cplusplus
8263extern "C"
8264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008265char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008266int
8267main ()
8268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008269return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008270 ;
8271 return 0;
8272}
8273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008274if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008275 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008276else
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008279rm -f core conftest.err conftest.$ac_objext \
8280 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008281LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8284$as_echo "$ac_cv_lib_socket_socket" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008285if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008286 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008287fi
8288 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008289
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8291$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008294if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8297$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008298LIBS="$withval $LIBS"
8299
8300else
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8302$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303fi
8304
Guido van Rossum7f43da71994-08-01 12:15:30 +00008305
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008306if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008307 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8308set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8310$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008311if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008313else
8314 case $PKG_CONFIG in
8315 [\\/]* | ?:[\\/]*)
8316 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8317 ;;
8318 *)
8319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8320for as_dir in $PATH
8321do
8322 IFS=$as_save_IFS
8323 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008325 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008326 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008328 break 2
8329 fi
8330done
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008332IFS=$as_save_IFS
8333
8334 ;;
8335esac
8336fi
8337PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8338if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8340$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008341else
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8343$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008344fi
8345
8346
8347fi
8348if test -z "$ac_cv_path_PKG_CONFIG"; then
8349 ac_pt_PKG_CONFIG=$PKG_CONFIG
8350 # Extract the first word of "pkg-config", so it can be a program name with args.
8351set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8353$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008354if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008356else
8357 case $ac_pt_PKG_CONFIG in
8358 [\\/]* | ?:[\\/]*)
8359 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8360 ;;
8361 *)
8362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8363for as_dir in $PATH
8364do
8365 IFS=$as_save_IFS
8366 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008368 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008369 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008371 break 2
8372 fi
8373done
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008375IFS=$as_save_IFS
8376
8377 ;;
8378esac
8379fi
8380ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8381if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8383$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008384else
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008387fi
8388
8389 if test "x$ac_pt_PKG_CONFIG" = x; then
8390 PKG_CONFIG=""
8391 else
8392 case $cross_compiling:$ac_tool_warned in
8393yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008394{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8395$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008396ac_tool_warned=yes ;;
8397esac
8398 PKG_CONFIG=$ac_pt_PKG_CONFIG
8399 fi
8400else
8401 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8402fi
8403
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008404
8405# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8407$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008408
8409# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008410if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008411 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008412else
8413 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008414fi
8415
8416
Matthias Kloseb9621712010-04-24 17:59:49 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8418$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008419
8420# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8422$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008423
8424# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008425if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008426 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008427else
8428 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008429fi
8430
8431
8432if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008433 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8434else
8435 LIBFFI_INCLUDEDIR=""
8436fi
8437
8438
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8440$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008441
Benjamin Peterson076ed002010-10-31 17:11:02 +00008442# Check for support for loadable sqlite extensions
8443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8444$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8445# Check whether --enable-loadable-sqlite-extensions was given.
8446if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8447 enableval=$enable_loadable_sqlite_extensions;
8448else
8449 enable_loadable_sqlite_extensions="no"
8450fi
8451
8452
8453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8454$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8455
Matthias Klose55708cc2009-04-30 08:06:49 +00008456# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8458$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008459
8460# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008461if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008462 withval=$with_dbmliborder;
8463if test x$with_dbmliborder = xyes
8464then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008465as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008466else
8467 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8468 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8469 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008470 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008471 fi
8472 done
8473fi
8474fi
8475
Matthias Kloseb9621712010-04-24 17:59:49 +00008476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8477$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008478
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008479# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008480
8481
Matthias Kloseb9621712010-04-24 17:59:49 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8483$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008486if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487 withval=$with_signal_module;
8488fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008489
8490
8491if test -z "$with_signal_module"
8492then with_signal_module="yes"
8493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8495$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008496
8497if test "${with_signal_module}" = "yes"; then
8498 USE_SIGNAL_MODULE=""
8499 SIGNAL_OBJS=""
8500else
8501 USE_SIGNAL_MODULE="#"
8502 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8503fi
8504
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008505# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008506
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008507USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008508
Matthias Kloseb9621712010-04-24 17:59:49 +00008509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8510$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008511
Guido van Rossumec2f0731997-01-22 20:54:01 +00008512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008514if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8517$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008518LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008519if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008520 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008521fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008522else
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8524$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008525fi
8526
Martin v. Löwis11437992002-04-12 09:54:03 +00008527
8528# Templates for things AC_DEFINEd more than once.
8529# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008530
8531
Martin v. Löwis11437992002-04-12 09:54:03 +00008532
8533
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8535$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008538if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539 withval=$with_threads;
8540fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008541
8542
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008543# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008545# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008546if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547 withval=$with_thread; with_threads=$with_thread
8548fi
8549
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008550
8551if test -z "$with_threads"
8552then with_threads="yes"
8553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8555$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008556
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008557
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008558if test "$with_threads" = "no"
8559then
8560 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008561elif test "$ac_cv_pthread_is_default" = yes
8562then
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008564
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008565 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008567
8568 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008569 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008570elif test "$ac_cv_kpthread" = "yes"
8571then
8572 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008573 if test "$ac_cv_cxx_thread" = "yes"; then
8574 CXX="$CXX -Kpthread"
8575 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008577
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008578 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008579 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008580elif test "$ac_cv_kthread" = "yes"
8581then
8582 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008583 if test "$ac_cv_cxx_thread" = "yes"; then
8584 CXX="$CXX -Kthread"
8585 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008587
8588 posix_threads=yes
8589 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008590elif test "$ac_cv_pthread" = "yes"
8591then
8592 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008593 if test "$ac_cv_cxx_thread" = "yes"; then
8594 CXX="$CXX -pthread"
8595 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008597
8598 posix_threads=yes
8599 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008600else
8601 if test ! -z "$with_threads" -a -d "$with_threads"
8602 then LDFLAGS="$LDFLAGS -L$with_threads"
8603 fi
8604 if test ! -z "$withval" -a -d "$withval"
8605 then LDFLAGS="$LDFLAGS -L$withval"
8606 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008607
8608 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008609 # define _POSIX_THREADS in unistd.h. Some apparently don't
8610 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8612$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008614/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008615
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008616#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008617#ifdef _POSIX_THREADS
8618yes
8619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008620
8621_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008623 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008624 unistd_defines_pthreads=yes
8625else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008626 unistd_defines_pthreads=no
8627fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008628rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008629
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8631$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008632
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008634
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08008636if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008638
Matthias Kloseb9621712010-04-24 17:59:49 +00008639 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008640
Martin v. Löwis11437992002-04-12 09:54:03 +00008641
Matthias Kloseb9621712010-04-24 17:59:49 +00008642$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008643
8644 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008645 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008646else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008647
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08008649if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008651
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008653
Martin v. Löwis11437992002-04-12 09:54:03 +00008654
Matthias Kloseb9621712010-04-24 17:59:49 +00008655$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008656
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008657 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008658else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008659
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008660 # Just looking for pthread_create in libpthread is not enough:
8661 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8662 # So we really have to include pthread.h, and then link.
8663 _libs=$LIBS
8664 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8666$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008668/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008669#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008670
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008671void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008672int
8673main ()
8674{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008675
8676pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 ;
8678 return 0;
8679}
8680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008681if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008682
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8684$as_echo "yes" >&6; }
8685 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008686
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008687 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008688 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008689else
Martin v. Löwis11437992002-04-12 09:54:03 +00008690
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008691 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008692 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Gregory P. Smith69140482012-01-16 02:05:55 -08008693if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008695
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008696 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008697 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008698else
Guido van Rossumad678af1998-10-02 14:42:15 +00008699
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8701$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008702if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008704else
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008706LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710/* Override any GCC internal prototype to avoid an error.
8711 Use char because int might match the return type of a GCC
8712 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008713#ifdef __cplusplus
8714extern "C"
8715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008716char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008717int
8718main ()
8719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008721 ;
8722 return 0;
8723}
8724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008725if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730rm -f core conftest.err conftest.$ac_objext \
8731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008732LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8735$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008736if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008738
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008739 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008740 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008741 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008742else
Greg Steinadf63d62000-07-05 10:38:09 +00008743
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8745$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008746if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008748else
Martin v. Löwis11437992002-04-12 09:54:03 +00008749 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008750LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754/* Override any GCC internal prototype to avoid an error.
8755 Use char because int might match the return type of a GCC
8756 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008757#ifdef __cplusplus
8758extern "C"
8759#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008760char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008761int
8762main ()
8763{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ;
8766 return 0;
8767}
8768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008769if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008771else
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774rm -f core conftest.err conftest.$ac_objext \
8775 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008776LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8779$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008780if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008782
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008783 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008784 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008785 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008786else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008787
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8789$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008790if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008792else
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008794LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798/* Override any GCC internal prototype to avoid an error.
8799 Use char because int might match the return type of a GCC
8800 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008801#ifdef __cplusplus
8802extern "C"
8803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008804char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008805int
8806main ()
8807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008809 ;
8810 return 0;
8811}
8812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008815else
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008818rm -f core conftest.err conftest.$ac_objext \
8819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008820LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8823$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008824if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008826
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008827 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008828 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008829 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008830else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008831
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8833$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008834if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008836else
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008838LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842/* Override any GCC internal prototype to avoid an error.
8843 Use char because int might match the return type of a GCC
8844 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008845#ifdef __cplusplus
8846extern "C"
8847#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008848char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008849int
8850main ()
8851{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008852return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008853 ;
8854 return 0;
8855}
8856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008857if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008859else
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008862rm -f core conftest.err conftest.$ac_objext \
8863 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008864LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8867$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008868if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008870
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008871 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008872 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008873 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008874else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008875
Martin v. Löwis130fb172001-07-19 11:00:41 +00008876 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008877fi
8878
Guido van Rossum627b2d71993-12-24 10:39:16 +00008879
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008880fi
8881
Guido van Rossum0be3e491997-05-22 20:33:33 +00008882fi
8883
Guido van Rossum49545951997-12-02 19:28:29 +00008884fi
8885
Guido van Rossumb93a8621998-05-07 13:27:32 +00008886fi
8887
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008889rm -f core conftest.err conftest.$ac_objext \
8890 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891fi
8892
Martin v. Löwis11437992002-04-12 09:54:03 +00008893
8894fi
8895
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008896
Michael W. Hudson54241132001-12-07 15:38:26 +00008897
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8899$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008900if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008902else
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008904LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908/* Override any GCC internal prototype to avoid an error.
8909 Use char because int might match the return type of a GCC
8910 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008911#ifdef __cplusplus
8912extern "C"
8913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008914char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008915int
8916main ()
8917{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008918return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ;
8920 return 0;
8921}
8922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008925else
Matthias Kloseb9621712010-04-24 17:59:49 +00008926 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008928rm -f core conftest.err conftest.$ac_objext \
8929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008930LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8933$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008934if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008936
Martin v. Löwis130fb172001-07-19 11:00:41 +00008937 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008938 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008939 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008940fi
8941
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008942
Neal Norwitza978ab02002-11-02 16:58:05 +00008943 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8945$as_echo_n "checking for thr_create in -lthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008946if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008948else
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008950LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954/* Override any GCC internal prototype to avoid an error.
8955 Use char because int might match the return type of a GCC
8956 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008957#ifdef __cplusplus
8958extern "C"
8959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008960char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008961int
8962main ()
8963{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008964return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 ;
8966 return 0;
8967}
8968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008969if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008971else
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008974rm -f core conftest.err conftest.$ac_objext \
8975 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008976LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8979$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008980if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008982
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008983 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008984 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008985 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008986fi
8987
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008988 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008989
Martin v. Löwis130fb172001-07-19 11:00:41 +00008990 if test "$USE_THREAD_MODULE" != "#"
8991 then
8992 # If the above checks didn't disable threads, (at least) OSF1
8993 # needs this '-threads' argument during linking.
8994 case $ac_sys_system in
8995 OSF1) LDLAST=-threads;;
8996 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008997 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008998fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008999
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009000if test "$posix_threads" = "yes"; then
9001 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009002
Matthias Kloseb9621712010-04-24 17:59:49 +00009003$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009004
9005 fi
9006
9007 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9008 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009009 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009010$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009011
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009012 ;;
9013 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009014$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009015
9016 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009017 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009018$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009019
9020 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009021 esac
9022
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9024$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009025 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009027else
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009029 ac_cv_pthread_system_supported=no
9030else
Matthias Kloseb9621712010-04-24 17:59:49 +00009031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009032/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009033#include <pthread.h>
9034 void *foo(void *parm) {
9035 return NULL;
9036 }
9037 main() {
9038 pthread_attr_t attr;
9039 pthread_t id;
9040 if (pthread_attr_init(&attr)) exit(-1);
9041 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9042 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9043 exit(0);
9044 }
9045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009046if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009047 ac_cv_pthread_system_supported=yes
9048else
Matthias Kloseb9621712010-04-24 17:59:49 +00009049 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9052 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009053fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055
Guido van Rossum627b2d71993-12-24 10:39:16 +00009056fi
9057
Matthias Kloseb9621712010-04-24 17:59:49 +00009058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9059$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009060 if test "$ac_cv_pthread_system_supported" = "yes"; then
9061
Matthias Kloseb9621712010-04-24 17:59:49 +00009062$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009063
9064 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 for ac_func in pthread_sigmask
9066do :
9067 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Gregory P. Smith69140482012-01-16 02:05:55 -08009068if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009069 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009070#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009071_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009072 case $ac_sys_system in
9073 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009074
Matthias Kloseb9621712010-04-24 17:59:49 +00009075$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009076
9077 ;;
9078 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009079fi
9080done
9081
9082fi
9083
9084
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009086
Matthias Kloseb9621712010-04-24 17:59:49 +00009087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9088$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009090if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009091 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009092 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9094$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009095 ipv6=no
9096 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9098$as_echo "yes" >&6; }
9099 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009100
9101 ipv6=yes
9102 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104else
Martin v. Löwis11437992002-04-12 09:54:03 +00009105
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009107/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009108 /* AF_INET6 available check */
9109#include <sys/types.h>
9110#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009111int
9112main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009113{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009114int domain = AF_INET6;
9115 ;
9116 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117}
Martin v. Löwis11437992002-04-12 09:54:03 +00009118_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009119if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009120
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9122$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009124
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009125else
Matthias Kloseb159a552010-04-25 21:00:44 +00009126
Matthias Kloseb9621712010-04-24 17:59:49 +00009127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9128$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009129 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009130
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009131fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009133
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009134if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9136$as_echo_n "checking if RFC2553 API is available... " >&6; }
9137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009138/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009139
9140 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009141#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009142int
9143main ()
9144{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009145struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009146 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 ;
9148 return 0;
9149}
Matthias Kloseb159a552010-04-25 21:00:44 +00009150
Martin v. Löwis11437992002-04-12 09:54:03 +00009151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009152if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009153
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009155$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009156 ipv6=yes
9157
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009158else
Matthias Kloseb159a552010-04-25 21:00:44 +00009159
9160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009161$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009162 ipv6=no
9163
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009166fi
9167
9168if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009169 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009170
9171fi
9172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009173fi
9174
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009175
9176ipv6type=unknown
9177ipv6lib=none
9178ipv6trylibc=no
9179
9180if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9182$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009183 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9184 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009185 case $i in
9186 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009188/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009189
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009190#include <netinet/in.h>
9191#ifdef IPV6_INRIA_VERSION
9192yes
9193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009194_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009195if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009196 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009197 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009198fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009199rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009200
9201 ;;
9202 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009204/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009205
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009206#include <netinet/in.h>
9207#ifdef __KAME__
9208yes
9209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009210_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009212 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009213 ipv6type=$i;
9214 ipv6lib=inet6
9215 ipv6libdir=/usr/local/v6/lib
9216 ipv6trylibc=yes
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 linux-glibc)
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 <features.h>
9226#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
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 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009234fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009235rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009236
9237 ;;
9238 linux-inet6)
9239 if test -d /usr/inet6; then
9240 ipv6type=$i
9241 ipv6lib=inet6
9242 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009243 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009244 fi
9245 ;;
9246 solaris)
9247 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009248 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009249 ipv6type=$i
9250 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009251 fi
9252 fi
9253 ;;
9254 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009256/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009257
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009258#include <sys/param.h>
9259#ifdef _TOSHIBA_INET6
9260yes
9261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009262_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009263if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009264 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009265 ipv6type=$i;
9266 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009267 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009268fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009269rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009270
9271 ;;
9272 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009274/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009275
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009276#include </usr/local/v6/include/sys/v6config.h>
9277#ifdef __V6D__
9278yes
9279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009280_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009281if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009283 ipv6type=$i;
9284 ipv6lib=v6;
9285 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009286 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
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 zeta)
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 <sys/param.h>
9296#ifdef _ZETA_MINAMI_INET6
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=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009304 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009305fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009306rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009307
9308 ;;
9309 esac
9310 if test "$ipv6type" != "unknown"; then
9311 break
9312 fi
9313 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9315$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009316fi
9317
9318if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9319 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9320 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9321 echo "using lib$ipv6lib"
9322 else
9323 if test $ipv6trylibc = "yes"; then
9324 echo "using libc"
9325 else
9326 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9327 echo "You need to fetch lib$ipv6lib.a from appropriate"
9328 echo 'ipv6 kit and compile beforehand.'
9329 exit 1
9330 fi
9331 fi
9332fi
9333
Matthias Kloseb9621712010-04-24 17:59:49 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9335$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009337/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009338
9339 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009340int
9341main ()
9342{
9343FSIORefNum fRef = 0
9344 ;
9345 return 0;
9346}
Matthias Kloseb159a552010-04-25 21:00:44 +00009347
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009349if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009350
Matthias Kloseb159a552010-04-25 21:00:44 +00009351
Matthias Kloseb9621712010-04-24 17:59:49 +00009352$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009353
Matthias Kloseb9621712010-04-24 17:59:49 +00009354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9355$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009356
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009357else
Matthias Kloseb159a552010-04-25 21:00:44 +00009358
Matthias Kloseb9621712010-04-24 17:59:49 +00009359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9360$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009361
9362fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9364
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009365# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9367$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009368
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009369# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009370if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009371 withval=$with_doc_strings;
9372fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009373
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009374
9375if test -z "$with_doc_strings"
9376then with_doc_strings="yes"
9377fi
9378if test "$with_doc_strings" != "no"
9379then
9380
Matthias Kloseb9621712010-04-24 17:59:49 +00009381$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009382
9383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9385$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009386
Antoine Pitrou042b1282010-08-13 21:15:58 +00009387# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9389$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009391# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009392if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009393 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009394if test "$withval" != no
9395then
9396
Matthias Kloseb9621712010-04-24 17:59:49 +00009397$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009398
Matthias Kloseb9621712010-04-24 17:59:49 +00009399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9400$as_echo "yes" >&6; }
9401else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9402$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009403fi
9404else
Matthias Kloseb9621712010-04-24 17:59:49 +00009405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009407fi
9408
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009409
9410# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9412$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009415if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416 withval=$with_pymalloc;
9417fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009418
Neil Schemenauera35c6882001-02-27 04:45:05 +00009419
Neil Schemenauer16c22972002-03-22 15:34:49 +00009420if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009421then
9422 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009423 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009424fi
9425if test "$with_pymalloc" != "no"
9426then
Martin v. Löwis11437992002-04-12 09:54:03 +00009427
Matthias Kloseb9621712010-04-24 17:59:49 +00009428$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009429
9430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9432$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009433
Benjamin Peterson05159c42009-12-03 03:01:27 +00009434# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9436$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009437
9438# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009439if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009440 withval=$with_valgrind;
9441else
9442 with_valgrind=no
9443fi
9444
Matthias Kloseb9621712010-04-24 17:59:49 +00009445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9446$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009447if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009448 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 -08009449if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009450
Matthias Kloseb9621712010-04-24 17:59:49 +00009451$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009452
9453else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009454 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009455
9456fi
9457
9458
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009459 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009460fi
9461
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009462# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009463
Guido van Rossum98935bf2001-09-05 19:13:16 +00009464DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009465
Guido van Rossume97ee181999-12-20 21:27:22 +00009466# the dlopen() function means we might want to use dynload_shlib.o. some
9467# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009468for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009469do :
9470 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Gregory P. Smith69140482012-01-16 02:05:55 -08009471if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009472 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009473#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009474_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009475
Guido van Rossume97ee181999-12-20 21:27:22 +00009476fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009477done
Guido van Rossume97ee181999-12-20 21:27:22 +00009478
Michael W. Hudson54241132001-12-07 15:38:26 +00009479
Guido van Rossume97ee181999-12-20 21:27:22 +00009480# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9481# loading of modules.
9482
Matthias Kloseb9621712010-04-24 17:59:49 +00009483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9484$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009485if test -z "$DYNLOADFILE"
9486then
9487 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009488 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9489 if test "$ac_cv_func_dlopen" = yes
9490 then DYNLOADFILE="dynload_shlib.o"
9491 else DYNLOADFILE="dynload_aix.o"
9492 fi
9493 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009494 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009495 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9496 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009497 *)
9498 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9499 # out any dynamic loading
9500 if test "$ac_cv_func_dlopen" = yes
9501 then DYNLOADFILE="dynload_shlib.o"
9502 else DYNLOADFILE="dynload_stub.o"
9503 fi
9504 ;;
9505 esac
9506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9508$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009509if test "$DYNLOADFILE" != "dynload_stub.o"
9510then
Martin v. Löwis11437992002-04-12 09:54:03 +00009511
Matthias Kloseb9621712010-04-24 17:59:49 +00009512$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009513
9514fi
9515
Neil Schemenauer4e425612001-06-19 15:44:15 +00009516# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9517
Michael W. Hudson54241132001-12-07 15:38:26 +00009518
Matthias Kloseb9621712010-04-24 17:59:49 +00009519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9520$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009521if test -z "$MACHDEP_OBJS"
9522then
Jack Jansene578a632001-08-15 01:27:14 +00009523 MACHDEP_OBJS=$extra_machdep_objs
9524else
9525 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9528$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009529
Guido van Rossum627b2d71993-12-24 10:39:16 +00009530# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009531for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009532 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009533 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009534 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009535 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009536 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009537 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009538 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9539 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009540 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009541 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009542 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009543 truncate uname unsetenv utimes waitpid wait3 wait4 \
9544 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009545do :
9546 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9547ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009548if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009549 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009550#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009551_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009552
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009553fi
9554done
9555
Michael W. Hudson54241132001-12-07 15:38:26 +00009556
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009557ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9558 #include <dirent.h>
9559"
9560if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9561
9562$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9563
9564fi
9565
9566
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009567# For some functions, having a definition is not sufficient, since
9568# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9570$as_echo_n "checking for chroot... " >&6; }
9571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009572/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009573#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009574int
9575main ()
9576{
9577void *x=chroot
9578 ;
9579 return 0;
9580}
9581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009582if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009583
Matthias Kloseb9621712010-04-24 17:59:49 +00009584$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009585
Matthias Kloseb159a552010-04-25 21:00:44 +00009586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009587$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009588else
Matthias Kloseb9621712010-04-24 17:59:49 +00009589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9590$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009591
9592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9595$as_echo_n "checking for link... " >&6; }
9596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009597/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009598#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009599int
9600main ()
9601{
9602void *x=link
9603 ;
9604 return 0;
9605}
9606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009607if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009608
Matthias Kloseb9621712010-04-24 17:59:49 +00009609$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009610
Matthias Kloseb159a552010-04-25 21:00:44 +00009611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009612$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009613else
Matthias Kloseb9621712010-04-24 17:59:49 +00009614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9615$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009616
9617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9620$as_echo_n "checking for symlink... " >&6; }
9621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009622/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009623#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009624int
9625main ()
9626{
9627void *x=symlink
9628 ;
9629 return 0;
9630}
9631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009632if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009633
Matthias Kloseb9621712010-04-24 17:59:49 +00009634$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009635
Matthias Kloseb159a552010-04-25 21:00:44 +00009636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009637$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009638else
Matthias Kloseb9621712010-04-24 17:59:49 +00009639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9640$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009641
9642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9645$as_echo_n "checking for fchdir... " >&6; }
9646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009647/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009648#include <unistd.h>
9649int
9650main ()
9651{
9652void *x=fchdir
9653 ;
9654 return 0;
9655}
9656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009658
Matthias Kloseb9621712010-04-24 17:59:49 +00009659$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009660
Matthias Kloseb159a552010-04-25 21:00:44 +00009661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009662$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009663else
Matthias Kloseb9621712010-04-24 17:59:49 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9665$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009666
9667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9670$as_echo_n "checking for fsync... " >&6; }
9671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009672/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009673#include <unistd.h>
9674int
9675main ()
9676{
9677void *x=fsync
9678 ;
9679 return 0;
9680}
9681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009682if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009683
Matthias Kloseb9621712010-04-24 17:59:49 +00009684$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009685
Matthias Kloseb159a552010-04-25 21:00:44 +00009686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009687$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009688else
Matthias Kloseb9621712010-04-24 17:59:49 +00009689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9690$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009691
9692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9695$as_echo_n "checking for fdatasync... " >&6; }
9696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009697/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009698#include <unistd.h>
9699int
9700main ()
9701{
9702void *x=fdatasync
9703 ;
9704 return 0;
9705}
9706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009707if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009708
Matthias Kloseb9621712010-04-24 17:59:49 +00009709$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009710
Matthias Kloseb159a552010-04-25 21:00:44 +00009711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009712$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009713else
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9715$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009716
9717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9720$as_echo_n "checking for epoll... " >&6; }
9721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009722/* end confdefs.h. */
9723#include <sys/epoll.h>
9724int
9725main ()
9726{
9727void *x=epoll_create
9728 ;
9729 return 0;
9730}
9731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009733
Matthias Kloseb9621712010-04-24 17:59:49 +00009734$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009735
Matthias Kloseb159a552010-04-25 21:00:44 +00009736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009737$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009738else
Matthias Kloseb9621712010-04-24 17:59:49 +00009739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9740$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009741
9742fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9745$as_echo_n "checking for kqueue... " >&6; }
9746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009747/* end confdefs.h. */
9748
9749#include <sys/types.h>
9750#include <sys/event.h>
9751
9752int
9753main ()
9754{
9755int x=kqueue()
9756 ;
9757 return 0;
9758}
9759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009760if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009761
Matthias Kloseb9621712010-04-24 17:59:49 +00009762$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009763
Matthias Kloseb159a552010-04-25 21:00:44 +00009764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009765$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009766else
Matthias Kloseb9621712010-04-24 17:59:49 +00009767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9768$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009769
9770fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009772# On some systems (eg. FreeBSD 5), we would find a definition of the
9773# functions ctermid_r, setgroups in the library, but no prototype
9774# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9775# address to avoid compiler warnings and potential miscompilations
9776# because of the missing prototypes.
9777
Matthias Kloseb9621712010-04-24 17:59:49 +00009778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9779$as_echo_n "checking for ctermid_r... " >&6; }
9780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009781/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009782
Martin v. Löwisd5843682002-11-21 20:41:28 +00009783#include <stdio.h>
9784
Martin v. Löwisd5843682002-11-21 20:41:28 +00009785int
9786main ()
9787{
9788void* p = ctermid_r
9789 ;
9790 return 0;
9791}
9792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009793if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009794
Matthias Kloseb9621712010-04-24 17:59:49 +00009795$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009796
Matthias Kloseb159a552010-04-25 21:00:44 +00009797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009798$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009799else
Matthias Kloseb9621712010-04-24 17:59:49 +00009800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9801$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009802
9803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9805
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9807$as_echo_n "checking for flock declaration... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009808if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009809 $as_echo_n "(cached) " >&6
9810else
9811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009812/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009813#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009814int
9815main ()
9816{
9817void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009818
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009819 ;
9820 return 0;
9821}
9822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009823if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009824 ac_cv_flock_decl=yes
9825else
9826 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009827
9828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009830
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009831fi
9832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9833$as_echo "$ac_cv_flock_decl" >&6; }
9834if test "x${ac_cv_flock_decl}" = xyes; then
9835 for ac_func in flock
9836do :
9837 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Gregory P. Smith69140482012-01-16 02:05:55 -08009838if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009839 cat >>confdefs.h <<_ACEOF
9840#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009841_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009842
Antoine Pitroua3000072010-09-07 14:52:42 +00009843else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009845$as_echo_n "checking for flock in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009846if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009847 $as_echo_n "(cached) " >&6
9848else
9849 ac_check_lib_save_LIBS=$LIBS
9850LIBS="-lbsd $LIBS"
9851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9852/* end confdefs.h. */
9853
9854/* Override any GCC internal prototype to avoid an error.
9855 Use char because int might match the return type of a GCC
9856 builtin and then its argument prototype would still apply. */
9857#ifdef __cplusplus
9858extern "C"
9859#endif
9860char flock ();
9861int
9862main ()
9863{
9864return flock ();
9865 ;
9866 return 0;
9867}
9868_ACEOF
9869if ac_fn_c_try_link "$LINENO"; then :
9870 ac_cv_lib_bsd_flock=yes
9871else
9872 ac_cv_lib_bsd_flock=no
9873fi
9874rm -f core conftest.err conftest.$ac_objext \
9875 conftest$ac_exeext conftest.$ac_ext
9876LIBS=$ac_check_lib_save_LIBS
9877fi
9878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9879$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009880if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009881 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009882
9883
9884$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9885
9886
9887fi
9888
9889
9890fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009891done
9892
Antoine Pitroua3000072010-09-07 14:52:42 +00009893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894
Matthias Kloseb9621712010-04-24 17:59:49 +00009895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9896$as_echo_n "checking for getpagesize... " >&6; }
9897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009898/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009899
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009900#include <unistd.h>
9901
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009902int
9903main ()
9904{
9905void* p = getpagesize
9906 ;
9907 return 0;
9908}
9909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009910if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009911
Matthias Kloseb9621712010-04-24 17:59:49 +00009912$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009913
Matthias Kloseb159a552010-04-25 21:00:44 +00009914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009915$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009916else
Matthias Kloseb9621712010-04-24 17:59:49 +00009917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9918$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009919
9920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009922
Charles-François Natali6613c182011-11-27 12:41:06 +01009923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9924$as_echo_n "checking for broken unsetenv... " >&6; }
9925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9926/* end confdefs.h. */
9927
9928#include <stdlib.h>
9929
9930int
9931main ()
9932{
9933int res = unsetenv("DUMMY")
9934 ;
9935 return 0;
9936}
9937_ACEOF
9938if ac_fn_c_try_compile "$LINENO"; then :
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9940$as_echo "no" >&6; }
9941else
9942
9943$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9944
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9946$as_echo "yes" >&6; }
9947
9948fi
9949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9950
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009951for ac_prog in true
9952do
9953 # Extract the first word of "$ac_prog", so it can be a program name with args.
9954set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9956$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009957if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009959else
9960 if test -n "$TRUE"; then
9961 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9962else
9963as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9964for as_dir in $PATH
9965do
9966 IFS=$as_save_IFS
9967 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009968 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009969 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009970 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009971 $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 +00009972 break 2
9973 fi
9974done
Matthias Kloseb9621712010-04-24 17:59:49 +00009975 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009976IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009977
9978fi
9979fi
9980TRUE=$ac_cv_prog_TRUE
9981if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9983$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009984else
Matthias Kloseb9621712010-04-24 17:59:49 +00009985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9986$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009987fi
9988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009989
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009990 test -n "$TRUE" && break
9991done
9992test -n "$TRUE" || TRUE="/bin/true"
9993
9994
Matthias Kloseb9621712010-04-24 17:59:49 +00009995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9996$as_echo_n "checking for inet_aton in -lc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009997if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009998 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009999else
10000 ac_check_lib_save_LIBS=$LIBS
10001LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010003/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010005/* Override any GCC internal prototype to avoid an error.
10006 Use char because int might match the return type of a GCC
10007 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010008#ifdef __cplusplus
10009extern "C"
10010#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010011char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010012int
10013main ()
10014{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010016 ;
10017 return 0;
10018}
10019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010020if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010021 ac_cv_lib_c_inet_aton=yes
10022else
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010025rm -f core conftest.err conftest.$ac_objext \
10026 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010027LIBS=$ac_check_lib_save_LIBS
10028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10030$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010031if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010032 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010033else
Matthias Kloseb9621712010-04-24 17:59:49 +000010034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10035$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010036if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010037 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010038else
10039 ac_check_lib_save_LIBS=$LIBS
10040LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010042/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010044/* Override any GCC internal prototype to avoid an error.
10045 Use char because int might match the return type of a GCC
10046 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010047#ifdef __cplusplus
10048extern "C"
10049#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010050char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010051int
10052main ()
10053{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010054return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010055 ;
10056 return 0;
10057}
10058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010059if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010060 ac_cv_lib_resolv_inet_aton=yes
10061else
Matthias Kloseb9621712010-04-24 17:59:49 +000010062 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010064rm -f core conftest.err conftest.$ac_objext \
10065 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010066LIBS=$ac_check_lib_save_LIBS
10067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10069$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010070if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010071 cat >>confdefs.h <<_ACEOF
10072#define HAVE_LIBRESOLV 1
10073_ACEOF
10074
10075 LIBS="-lresolv $LIBS"
10076
10077fi
10078
10079
10080fi
10081
10082
Christian Heimesd0764e22007-12-04 15:00:33 +000010083# On Tru64, chflags seems to be present, but calling it will
10084# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10086$as_echo_n "checking for chflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010087if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010088 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010089else
Matthias Kloseb9621712010-04-24 17:59:49 +000010090 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010091 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010092else
Matthias Kloseb9621712010-04-24 17:59:49 +000010093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010094/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010095
Christian Heimesd0764e22007-12-04 15:00:33 +000010096#include <sys/stat.h>
10097#include <unistd.h>
10098int main(int argc, char*argv[])
10099{
10100 if(chflags(argv[0], 0) != 0)
10101 return 1;
10102 return 0;
10103}
Ned Deily3eb67d52011-06-28 00:00:28 -070010104
Christian Heimesd0764e22007-12-04 15:00:33 +000010105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010106if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010107 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010108else
Matthias Kloseb9621712010-04-24 17:59:49 +000010109 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10112 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010113fi
10114
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010115
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10118$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010119if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010121if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010122 ac_cv_have_chflags="yes"
10123else
10124 ac_cv_have_chflags="no"
10125fi
10126
10127fi
10128if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010129
Matthias Kloseb9621712010-04-24 17:59:49 +000010130$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010131
10132fi
10133
Matthias Kloseb9621712010-04-24 17:59:49 +000010134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10135$as_echo_n "checking for lchflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010136if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010137 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010138else
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010140 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010141else
Matthias Kloseb9621712010-04-24 17:59:49 +000010142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010143/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010144
Christian Heimesd0764e22007-12-04 15:00:33 +000010145#include <sys/stat.h>
10146#include <unistd.h>
10147int main(int argc, char*argv[])
10148{
10149 if(lchflags(argv[0], 0) != 0)
10150 return 1;
10151 return 0;
10152}
Ned Deily3eb67d52011-06-28 00:00:28 -070010153
Christian Heimesd0764e22007-12-04 15:00:33 +000010154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010155if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010156 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010157else
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10161 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010162fi
10163
10164
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10167$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010168if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010169 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010170if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010171 ac_cv_have_lchflags="yes"
10172else
10173 ac_cv_have_lchflags="no"
10174fi
10175
10176fi
10177if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010178
Matthias Kloseb9621712010-04-24 17:59:49 +000010179$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010180
10181fi
10182
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010183case $ac_sys_system/$ac_sys_release in
10184Darwin/*)
10185 _CUR_CFLAGS="${CFLAGS}"
10186 _CUR_LDFLAGS="${LDFLAGS}"
10187 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10188 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10189 ;;
10190esac
10191
Matthias Kloseb9621712010-04-24 17:59:49 +000010192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10193$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010194if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010196else
10197 ac_check_lib_save_LIBS=$LIBS
10198LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010200/* end confdefs.h. */
10201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010202/* Override any GCC internal prototype to avoid an error.
10203 Use char because int might match the return type of a GCC
10204 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010205#ifdef __cplusplus
10206extern "C"
10207#endif
10208char inflateCopy ();
10209int
10210main ()
10211{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010213 ;
10214 return 0;
10215}
10216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010217if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010218 ac_cv_lib_z_inflateCopy=yes
10219else
Matthias Kloseb9621712010-04-24 17:59:49 +000010220 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010222rm -f core conftest.err conftest.$ac_objext \
10223 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010224LIBS=$ac_check_lib_save_LIBS
10225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10227$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010228if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010229
Matthias Kloseb9621712010-04-24 17:59:49 +000010230$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010231
10232fi
10233
10234
10235case $ac_sys_system/$ac_sys_release in
10236Darwin/*)
10237 CFLAGS="${_CUR_CFLAGS}"
10238 LDFLAGS="${_CUR_LDFLAGS}"
10239 ;;
10240esac
10241
Matthias Kloseb9621712010-04-24 17:59:49 +000010242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10243$as_echo_n "checking for hstrerror... " >&6; }
10244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010245/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010246
Martin v. Löwise9416172003-05-03 10:12:45 +000010247#include <netdb.h>
10248
Martin v. Löwise9416172003-05-03 10:12:45 +000010249int
10250main ()
10251{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010252void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010253 ;
10254 return 0;
10255}
10256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010257if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010258
Matthias Kloseb9621712010-04-24 17:59:49 +000010259$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010260
Matthias Kloseb159a552010-04-25 21:00:44 +000010261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010262$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010263else
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10265$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010266
10267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010268rm -f core conftest.err conftest.$ac_objext \
10269 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270
Matthias Kloseb9621712010-04-24 17:59:49 +000010271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10272$as_echo_n "checking for inet_aton... " >&6; }
10273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010274/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010275
Martin v. Löwis86d66262006-02-17 08:40:11 +000010276#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010277#include <sys/socket.h>
10278#include <netinet/in.h>
10279#include <arpa/inet.h>
10280
Martin v. Löwise9416172003-05-03 10:12:45 +000010281int
10282main ()
10283{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010284void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010285 ;
10286 return 0;
10287}
10288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010289if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010290
Matthias Kloseb9621712010-04-24 17:59:49 +000010291$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010292
Matthias Kloseb159a552010-04-25 21:00:44 +000010293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010294$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010295else
Matthias Kloseb9621712010-04-24 17:59:49 +000010296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10297$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010298
10299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010300rm -f core conftest.err conftest.$ac_objext \
10301 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010302
Matthias Kloseb9621712010-04-24 17:59:49 +000010303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10304$as_echo_n "checking for inet_pton... " >&6; }
10305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010306/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010307
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010308#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010309#include <sys/socket.h>
10310#include <netinet/in.h>
10311#include <arpa/inet.h>
10312
Martin v. Löwise9416172003-05-03 10:12:45 +000010313int
10314main ()
10315{
10316void* p = inet_pton
10317 ;
10318 return 0;
10319}
10320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010322
Matthias Kloseb9621712010-04-24 17:59:49 +000010323$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010324
Matthias Kloseb159a552010-04-25 21:00:44 +000010325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010326$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010327else
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010330
10331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010333
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010334# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10336$as_echo_n "checking for setgroups... " >&6; }
10337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010338/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010339
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010340#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010341#ifdef HAVE_GRP_H
10342#include <grp.h>
10343#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010344
Martin v. Löwisd5843682002-11-21 20:41:28 +000010345int
10346main ()
10347{
10348void* p = setgroups
10349 ;
10350 return 0;
10351}
10352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010353if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010354
Matthias Kloseb9621712010-04-24 17:59:49 +000010355$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010356
Matthias Kloseb159a552010-04-25 21:00:44 +000010357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010358$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010359else
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10361$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010362
10363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010365
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010366# check for openpty and forkpty
10367
10368for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010369do :
10370 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010371if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010373#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010374_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010375
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010376else
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10378$as_echo_n "checking for openpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010379if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010381else
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010383LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010387/* Override any GCC internal prototype to avoid an error.
10388 Use char because int might match the return type of a GCC
10389 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010390#ifdef __cplusplus
10391extern "C"
10392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010393char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010394int
10395main ()
10396{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 ;
10399 return 0;
10400}
10401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010402if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010404else
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010407rm -f core conftest.err conftest.$ac_objext \
10408 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010409LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10412$as_echo "$ac_cv_lib_util_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010413if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010414 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010415 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010416else
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10418$as_echo_n "checking for openpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010419if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010421else
10422 ac_check_lib_save_LIBS=$LIBS
10423LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010425/* end confdefs.h. */
10426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010427/* Override any GCC internal prototype to avoid an error.
10428 Use char because int might match the return type of a GCC
10429 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010430#ifdef __cplusplus
10431extern "C"
10432#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010433char openpty ();
10434int
10435main ()
10436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010438 ;
10439 return 0;
10440}
10441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010442if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010443 ac_cv_lib_bsd_openpty=yes
10444else
Matthias Kloseb9621712010-04-24 17:59:49 +000010445 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010447rm -f core conftest.err conftest.$ac_objext \
10448 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010449LIBS=$ac_check_lib_save_LIBS
10450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10452$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010453if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010454 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010455 LIBS="$LIBS -lbsd"
10456fi
10457
10458
10459fi
10460
Fred Drake8cef4cf2000-06-28 16:40:38 +000010461
10462fi
10463done
10464
10465for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010466do :
10467 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010468if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010469 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010470#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010471_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010472
Fred Drake8cef4cf2000-06-28 16:40:38 +000010473else
Matthias Kloseb9621712010-04-24 17:59:49 +000010474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10475$as_echo_n "checking for forkpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010476if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010478else
Martin v. Löwis11437992002-04-12 09:54:03 +000010479 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010480LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010482/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010484/* Override any GCC internal prototype to avoid an error.
10485 Use char because int might match the return type of a GCC
10486 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010487#ifdef __cplusplus
10488extern "C"
10489#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010490char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010491int
10492main ()
10493{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010494return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010495 ;
10496 return 0;
10497}
10498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010499if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010500 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010501else
Matthias Kloseb9621712010-04-24 17:59:49 +000010502 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010504rm -f core conftest.err conftest.$ac_objext \
10505 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010506LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10509$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010510if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010511 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010512 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010513else
Matthias Kloseb9621712010-04-24 17:59:49 +000010514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10515$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010516if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010517 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010518else
10519 ac_check_lib_save_LIBS=$LIBS
10520LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010522/* end confdefs.h. */
10523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010524/* Override any GCC internal prototype to avoid an error.
10525 Use char because int might match the return type of a GCC
10526 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010527#ifdef __cplusplus
10528extern "C"
10529#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010530char forkpty ();
10531int
10532main ()
10533{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010535 ;
10536 return 0;
10537}
10538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010539if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010540 ac_cv_lib_bsd_forkpty=yes
10541else
Matthias Kloseb9621712010-04-24 17:59:49 +000010542 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010544rm -f core conftest.err conftest.$ac_objext \
10545 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010546LIBS=$ac_check_lib_save_LIBS
10547fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10549$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010550if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010552 LIBS="$LIBS -lbsd"
10553fi
10554
10555
10556fi
10557
Fred Drake8cef4cf2000-06-28 16:40:38 +000010558
10559fi
10560done
10561
Jack Jansendd19cf82001-12-06 22:36:17 +000010562
Christian Heimesb186d002008-03-18 15:15:01 +000010563# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010564for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010565do :
10566 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Gregory P. Smith69140482012-01-16 02:05:55 -080010567if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010568 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010569#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010570_ACEOF
10571
10572fi
10573done
10574
10575
Michael W. Hudson54241132001-12-07 15:38:26 +000010576# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010577for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010578do :
10579 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10580ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010581if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010582 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010583#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010584_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010585
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010586fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010587done
10588
Michael W. Hudson54241132001-12-07 15:38:26 +000010589
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010590ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Gregory P. Smith69140482012-01-16 02:05:55 -080010591if test "x$ac_cv_func_dup2" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010592 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010593
Martin v. Löwis1142de32002-03-29 16:28:31 +000010594else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010595 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010596 *" dup2.$ac_objext "* ) ;;
10597 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010599esac
10600
Martin v. Löwis1142de32002-03-29 16:28:31 +000010601fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010602
10603ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Gregory P. Smith69140482012-01-16 02:05:55 -080010604if test "x$ac_cv_func_getcwd" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010605 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10606
10607else
10608 case " $LIBOBJS " in
10609 *" getcwd.$ac_objext "* ) ;;
10610 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10611 ;;
10612esac
10613
10614fi
10615
10616ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Gregory P. Smith69140482012-01-16 02:05:55 -080010617if test "x$ac_cv_func_strdup" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010618 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10619
10620else
10621 case " $LIBOBJS " in
10622 *" strdup.$ac_objext "* ) ;;
10623 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10624 ;;
10625esac
10626
10627fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010628
10629
10630for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010631do :
10632 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010633if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010635#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010638/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010639#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010640int
10641main ()
10642{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010643getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010644 ;
10645 return 0;
10646}
10647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010649
Matthias Kloseb9621712010-04-24 17:59:49 +000010650$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010651
Guido van Rossum627b2d71993-12-24 10:39:16 +000010652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010654
Guido van Rossum627b2d71993-12-24 10:39:16 +000010655fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010656done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010657
Jack Jansen150753c2003-03-29 22:07:47 +000010658for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010659do :
10660 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010661if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010662 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010663#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010666/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010667#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010668int
10669main ()
10670{
10671setpgrp(0,0);
10672 ;
10673 return 0;
10674}
10675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010676if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010677
Matthias Kloseb9621712010-04-24 17:59:49 +000010678$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010679
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010682
10683fi
10684done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010685
Thomas Wouters3a584202000-08-05 23:28:51 +000010686for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010687do :
10688 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Gregory P. Smith69140482012-01-16 02:05:55 -080010689if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010690 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010691#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010694/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010695#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010696int
10697main ()
10698{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010699gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010700 ;
10701 return 0;
10702}
10703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010704if ac_fn_c_try_compile "$LINENO"; then :
10705
Guido van Rossum627b2d71993-12-24 10:39:16 +000010706else
Skip Montanaro6dead952003-09-25 14:50:04 +000010707
Matthias Kloseb9621712010-04-24 17:59:49 +000010708$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010709
Martin v. Löwis11437992002-04-12 09:54:03 +000010710
Guido van Rossum627b2d71993-12-24 10:39:16 +000010711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010713
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010714fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010715done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010716
Michael W. Hudson54241132001-12-07 15:38:26 +000010717
Matthias Kloseb9621712010-04-24 17:59:49 +000010718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10719$as_echo_n "checking for major... " >&6; }
10720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010721/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010722
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010723#if defined(MAJOR_IN_MKDEV)
10724#include <sys/mkdev.h>
10725#elif defined(MAJOR_IN_SYSMACROS)
10726#include <sys/sysmacros.h>
10727#else
10728#include <sys/types.h>
10729#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010730
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010731int
10732main ()
10733{
10734
10735 makedev(major(0),minor(0));
10736
10737 ;
10738 return 0;
10739}
10740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010742
10743
Matthias Kloseb9621712010-04-24 17:59:49 +000010744$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010745
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10747$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010748
10749else
Skip Montanaro6dead952003-09-25 14:50:04 +000010750
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10752$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010753
10754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010755rm -f core conftest.err conftest.$ac_objext \
10756 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010757
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010758# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010759# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10761$as_echo_n "checking for getaddrinfo... " >&6; }
10762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010763/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010764
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010765#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010766#include <sys/socket.h>
10767#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010768#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010769
Martin v. Löwis11437992002-04-12 09:54:03 +000010770int
10771main ()
10772{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010773getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 ;
10775 return 0;
10776}
10777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010778if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010779 have_getaddrinfo=yes
10780else
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010783rm -f core conftest.err conftest.$ac_objext \
10784 conftest$ac_exeext conftest.$ac_ext
10785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10786$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010787if test $have_getaddrinfo = yes
10788then
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10790$as_echo_n "checking getaddrinfo bug... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010791 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010793else
Matthias Kloseb9621712010-04-24 17:59:49 +000010794 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010795 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010796else
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010798/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010799
10800#include <sys/types.h>
10801#include <netdb.h>
10802#include <string.h>
10803#include <sys/socket.h>
10804#include <netinet/in.h>
10805
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010806int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010807{
10808 int passive, gaierr, inet4 = 0, inet6 = 0;
10809 struct addrinfo hints, *ai, *aitop;
10810 char straddr[INET6_ADDRSTRLEN], strport[16];
10811
10812 for (passive = 0; passive <= 1; passive++) {
10813 memset(&hints, 0, sizeof(hints));
10814 hints.ai_family = AF_UNSPEC;
10815 hints.ai_flags = passive ? AI_PASSIVE : 0;
10816 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010817 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010818 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10819 (void)gai_strerror(gaierr);
10820 goto bad;
10821 }
10822 for (ai = aitop; ai; ai = ai->ai_next) {
10823 if (ai->ai_addr == NULL ||
10824 ai->ai_addrlen == 0 ||
10825 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10826 straddr, sizeof(straddr), strport, sizeof(strport),
10827 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10828 goto bad;
10829 }
10830 switch (ai->ai_family) {
10831 case AF_INET:
10832 if (strcmp(strport, "54321") != 0) {
10833 goto bad;
10834 }
10835 if (passive) {
10836 if (strcmp(straddr, "0.0.0.0") != 0) {
10837 goto bad;
10838 }
10839 } else {
10840 if (strcmp(straddr, "127.0.0.1") != 0) {
10841 goto bad;
10842 }
10843 }
10844 inet4++;
10845 break;
10846 case AF_INET6:
10847 if (strcmp(strport, "54321") != 0) {
10848 goto bad;
10849 }
10850 if (passive) {
10851 if (strcmp(straddr, "::") != 0) {
10852 goto bad;
10853 }
10854 } else {
10855 if (strcmp(straddr, "::1") != 0) {
10856 goto bad;
10857 }
10858 }
10859 inet6++;
10860 break;
10861 case AF_UNSPEC:
10862 goto bad;
10863 break;
10864 default:
10865 /* another family support? */
10866 break;
10867 }
10868 }
10869 }
10870
10871 if (!(inet4 == 0 || inet4 == 2))
10872 goto bad;
10873 if (!(inet6 == 0 || inet6 == 2))
10874 goto bad;
10875
10876 if (aitop)
10877 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010878 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010879
10880 bad:
10881 if (aitop)
10882 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010883 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010884}
10885
Martin v. Löwis11437992002-04-12 09:54:03 +000010886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010887if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010888 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010889else
Matthias Kloseb9621712010-04-24 17:59:49 +000010890 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010895
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010896fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010897
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010899
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10901$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10902
Mark Dickinson2df5d282009-12-31 21:22:50 +000010903if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010904then
10905 if test $ipv6 = yes
10906 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010907 echo 'Fatal: You must get working getaddrinfo() function.'
10908 echo ' or you can specify "--disable-ipv6"'.
10909 exit 1
10910 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010911else
Martin v. Löwis11437992002-04-12 09:54:03 +000010912
Matthias Kloseb9621712010-04-24 17:59:49 +000010913$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010914
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010915fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010916
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010917for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010918do :
10919 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Gregory P. Smith69140482012-01-16 02:05:55 -080010920if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010921 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010922#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010923_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010924
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010925fi
10926done
10927
Michael W. Hudson54241132001-12-07 15:38:26 +000010928
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010929# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10931$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010932if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010933 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010934else
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010936/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010937#include <sys/types.h>
10938#include <sys/time.h>
10939#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010940
Martin v. Löwis11437992002-04-12 09:54:03 +000010941int
10942main ()
10943{
10944if ((struct tm *) 0)
10945return 0;
10946 ;
10947 return 0;
10948}
10949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010950if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010951 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010952else
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10958$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010959if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010962
10963fi
10964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10966$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010967if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010969else
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010971/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010972#include <sys/types.h>
10973#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010974
Martin v. Löwis11437992002-04-12 09:54:03 +000010975int
10976main ()
10977{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010978struct tm tm;
10979 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010981 ;
10982 return 0;
10983}
10984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010985if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010986 ac_cv_struct_tm=time.h
10987else
Matthias Kloseb9621712010-04-24 17:59:49 +000010988 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10993$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010994if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010995
Matthias Kloseb9621712010-04-24 17:59:49 +000010996$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010997
10998fi
10999
Matthias Kloseb9621712010-04-24 17:59:49 +000011000ac_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 +000011001#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011002
Matthias Kloseb9621712010-04-24 17:59:49 +000011003"
Gregory P. Smith69140482012-01-16 02:05:55 -080011004if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011005
11006cat >>confdefs.h <<_ACEOF
11007#define HAVE_STRUCT_TM_TM_ZONE 1
11008_ACEOF
11009
11010
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011011fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011012
Martin v. Löwis11437992002-04-12 09:54:03 +000011013if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011016
11017else
Matthias Kloseb9621712010-04-24 17:59:49 +000011018 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11019"
Gregory P. Smith69140482012-01-16 02:05:55 -080011020if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011022else
Matthias Kloseb9621712010-04-24 17:59:49 +000011023 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024fi
11025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011026cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011027#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011028_ACEOF
11029
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11031$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011032if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011033 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011034else
Matthias Kloseb9621712010-04-24 17:59:49 +000011035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011036/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011037#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011038#if !HAVE_DECL_TZNAME
11039extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011041
Martin v. Löwis11437992002-04-12 09:54:03 +000011042int
11043main ()
11044{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011046 ;
11047 return 0;
11048}
11049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011050if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011051 ac_cv_var_tzname=yes
11052else
Matthias Kloseb9621712010-04-24 17:59:49 +000011053 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011055rm -f core conftest.err conftest.$ac_objext \
11056 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11059$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011060 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011061
Matthias Kloseb9621712010-04-24 17:59:49 +000011062$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011063
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011064 fi
11065fi
11066
Matthias Kloseb9621712010-04-24 17:59:49 +000011067ac_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 -080011068if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011069
11070cat >>confdefs.h <<_ACEOF
11071#define HAVE_STRUCT_STAT_ST_RDEV 1
11072_ACEOF
11073
11074
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011075fi
11076
Matthias Kloseb9621712010-04-24 17:59:49 +000011077ac_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 -080011078if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011079
Martin v. Löwis11437992002-04-12 09:54:03 +000011080cat >>confdefs.h <<_ACEOF
11081#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11082_ACEOF
11083
11084
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011085fi
11086
Matthias Kloseb9621712010-04-24 17:59:49 +000011087ac_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 -080011088if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011089
11090cat >>confdefs.h <<_ACEOF
11091#define HAVE_STRUCT_STAT_ST_FLAGS 1
11092_ACEOF
11093
11094
11095fi
11096
Matthias Kloseb9621712010-04-24 17:59:49 +000011097ac_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 -080011098if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011099
11100cat >>confdefs.h <<_ACEOF
11101#define HAVE_STRUCT_STAT_ST_GEN 1
11102_ACEOF
11103
11104
11105fi
11106
Matthias Kloseb9621712010-04-24 17:59:49 +000011107ac_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 -080011108if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011109
11110cat >>confdefs.h <<_ACEOF
11111#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11112_ACEOF
11113
11114
11115fi
11116
Matthias Kloseb9621712010-04-24 17:59:49 +000011117ac_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 -080011118if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011119
Martin v. Löwis11437992002-04-12 09:54:03 +000011120cat >>confdefs.h <<_ACEOF
11121#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11122_ACEOF
11123
11124
Matthias Kloseb9621712010-04-24 17:59:49 +000011125$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011126
11127else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011129 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11131 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011132esac
11133
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011134fi
11135
Michael W. Hudson54241132001-12-07 15:38:26 +000011136
Martin v. Löwis11437992002-04-12 09:54:03 +000011137
Matthias Kloseb9621712010-04-24 17:59:49 +000011138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11139$as_echo_n "checking for time.h that defines altzone... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011140if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011142else
Matthias Kloseb159a552010-04-25 21:00:44 +000011143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011145/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011146#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011147int
11148main ()
11149{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011150return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011151 ;
11152 return 0;
11153}
11154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011155if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011156 ac_cv_header_time_altzone=yes
11157else
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011162fi
11163
Matthias Kloseb9621712010-04-24 17:59:49 +000011164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11165$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011166if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011167
Matthias Kloseb9621712010-04-24 17:59:49 +000011168$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011169
11170fi
11171
Guido van Rossumda88dad1995-01-26 00:46:29 +000011172was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11174$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011176/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011177
11178#include <sys/types.h>
11179#include <sys/select.h>
11180#include <sys/time.h>
11181
Martin v. Löwis11437992002-04-12 09:54:03 +000011182int
11183main ()
11184{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011185;
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 ;
11187 return 0;
11188}
11189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011190if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011191
11192
Matthias Kloseb9621712010-04-24 17:59:49 +000011193$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011194
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011195 was_it_defined=yes
11196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11200$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201
Matthias Kloseb9621712010-04-24 17:59:49 +000011202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11203$as_echo_n "checking for addrinfo... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011204if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011205 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011206else
Matthias Kloseb9621712010-04-24 17:59:49 +000011207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011208/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011209#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011210int
11211main ()
11212{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011213struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011214 ;
11215 return 0;
11216}
11217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011218if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011219 ac_cv_struct_addrinfo=yes
11220else
Matthias Kloseb9621712010-04-24 17:59:49 +000011221 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11224fi
11225
Matthias Kloseb9621712010-04-24 17:59:49 +000011226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11227$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011228if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011229
Matthias Kloseb9621712010-04-24 17:59:49 +000011230$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011231
11232fi
11233
Matthias Kloseb9621712010-04-24 17:59:49 +000011234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11235$as_echo_n "checking for sockaddr_storage... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011236if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011237 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011238else
Matthias Kloseb9621712010-04-24 17:59:49 +000011239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011240/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011241
11242# include <sys/types.h>
11243# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011244int
11245main ()
11246{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011247struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 ;
11249 return 0;
11250}
11251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011252if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011253 ac_cv_struct_sockaddr_storage=yes
11254else
Matthias Kloseb9621712010-04-24 17:59:49 +000011255 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11258fi
11259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11261$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011262if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011263
Matthias Kloseb9621712010-04-24 17:59:49 +000011264$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011265
11266fi
11267
Guido van Rossum627b2d71993-12-24 10:39:16 +000011268# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011269
Matthias Kloseb9621712010-04-24 17:59:49 +000011270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11271$as_echo_n "checking whether char is unsigned... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011272if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011273 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011274else
Matthias Kloseb9621712010-04-24 17:59:49 +000011275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011277$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011278int
11279main ()
11280{
11281static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011282test_array [0] = 0;
11283return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011284
11285 ;
11286 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011287}
Martin v. Löwis11437992002-04-12 09:54:03 +000011288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011289if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011290 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011291else
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11297$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011298if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011299 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011300
11301fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011302
Matthias Kloseb9621712010-04-24 17:59:49 +000011303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11304$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011305if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011307else
Matthias Kloseb9621712010-04-24 17:59:49 +000011308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011309/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011310
Martin v. Löwis11437992002-04-12 09:54:03 +000011311int
11312main ()
11313{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011314
Martin v. Löwis11437992002-04-12 09:54:03 +000011315#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011316 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011318 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011319 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320 char const *const *pcpcc;
11321 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 /* NEC SVR4.0.2 mips cc rejects this. */
11323 struct point {int x, y;};
11324 static struct point const zero = {0,0};
11325 /* AIX XL C 1.02.0.0 rejects this.
11326 It does not let you subtract one const X* pointer from another in
11327 an arm of an if-expression whose if-part is not a constant
11328 expression */
11329 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011330 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011331 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011332 ++pcpcc;
11333 ppc = (char**) pcpcc;
11334 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011335 { /* SCO 3.2v4 cc rejects this sort of thing. */
11336 char tx;
11337 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011338 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011339
Martin v. Löwis11437992002-04-12 09:54:03 +000011340 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011341 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 }
11343 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11344 int x[] = {25, 17};
11345 const int *foo = &x[0];
11346 ++foo;
11347 }
11348 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11349 typedef const int *iptr;
11350 iptr p = 0;
11351 ++p;
11352 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011353 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011354 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011355 struct s { int j; const int *ap[3]; } bx;
11356 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 }
11358 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11359 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011360 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011362 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011363#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011364
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 ;
11366 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011367}
Martin v. Löwis11437992002-04-12 09:54:03 +000011368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011369if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011370 ac_cv_c_const=yes
11371else
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11377$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011378if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011381
11382fi
11383
Michael W. Hudson54241132001-12-07 15:38:26 +000011384
Guido van Rossumda88dad1995-01-26 00:46:29 +000011385works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11387$as_echo_n "checking for working volatile... " >&6; }
11388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011389/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011390
Martin v. Löwis11437992002-04-12 09:54:03 +000011391int
11392main ()
11393{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011394volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 ;
11396 return 0;
11397}
11398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011399if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011400 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011401else
Skip Montanaro6dead952003-09-25 14:50:04 +000011402
Matthias Kloseb9621712010-04-24 17:59:49 +000011403$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011404
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011405
Guido van Rossum627b2d71993-12-24 10:39:16 +000011406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11409$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011410
Guido van Rossumda88dad1995-01-26 00:46:29 +000011411works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11413$as_echo_n "checking for working signed char... " >&6; }
11414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011415/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011416
Martin v. Löwis11437992002-04-12 09:54:03 +000011417int
11418main ()
11419{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011420signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011421 ;
11422 return 0;
11423}
11424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011425if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011426 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011427else
Skip Montanaro6dead952003-09-25 14:50:04 +000011428
Matthias Kloseb9621712010-04-24 17:59:49 +000011429$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011430
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011431
Guido van Rossum7f43da71994-08-01 12:15:30 +000011432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11435$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011436
Guido van Rossumda88dad1995-01-26 00:46:29 +000011437have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11439$as_echo_n "checking for prototypes... " >&6; }
11440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011441/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011442int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011443int
11444main ()
11445{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011446return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 ;
11448 return 0;
11449}
11450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011452
Matthias Kloseb9621712010-04-24 17:59:49 +000011453$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011454
Matthias Kloseb159a552010-04-25 21:00:44 +000011455 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11459$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011460
Guido van Rossumda88dad1995-01-26 00:46:29 +000011461works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11463$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011465/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011466
11467#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011468int foo(int x, ...) {
11469 va_list va;
11470 va_start(va, x);
11471 va_arg(va, int);
11472 va_arg(va, char *);
11473 va_arg(va, double);
11474 return 0;
11475}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011476
Martin v. Löwis11437992002-04-12 09:54:03 +000011477int
11478main ()
11479{
Guido van Rossum90eea071996-08-30 20:58:57 +000011480return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011481 ;
11482 return 0;
11483}
11484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011486
11487
Matthias Kloseb9621712010-04-24 17:59:49 +000011488$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011489
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011490 works=yes
11491
Guido van Rossum627b2d71993-12-24 10:39:16 +000011492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11495$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011496
Martin v. Löwisd6320502004-08-12 13:45:08 +000011497# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11499$as_echo_n "checking for socketpair... " >&6; }
11500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011501/* end confdefs.h. */
11502
11503#include <sys/types.h>
11504#include <sys/socket.h>
11505
11506int
11507main ()
11508{
11509void *x=socketpair
11510 ;
11511 return 0;
11512}
11513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011515
Matthias Kloseb9621712010-04-24 17:59:49 +000011516$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011517
Matthias Kloseb159a552010-04-25 21:00:44 +000011518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011519$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011520else
Matthias Kloseb9621712010-04-24 17:59:49 +000011521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11522$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011523
11524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011526
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011527# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11529$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011531/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011532#include <sys/types.h>
11533#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011534int
11535main ()
11536{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011537struct sockaddr x;
11538x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011539 ;
11540 return 0;
11541}
11542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011543if ac_fn_c_try_compile "$LINENO"; then :
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11545$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011546
Matthias Kloseb9621712010-04-24 17:59:49 +000011547$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011548
11549else
Matthias Kloseb9621712010-04-24 17:59:49 +000011550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11551$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011552
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011555
Guido van Rossumda88dad1995-01-26 00:46:29 +000011556va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11558$as_echo_n "checking whether va_list is an array... " >&6; }
11559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011560/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011561
11562#ifdef HAVE_STDARG_PROTOTYPES
11563#include <stdarg.h>
11564#else
11565#include <varargs.h>
11566#endif
11567
Martin v. Löwis11437992002-04-12 09:54:03 +000011568int
11569main ()
11570{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011571va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011572 ;
11573 return 0;
11574}
11575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011576if ac_fn_c_try_compile "$LINENO"; then :
11577
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011578else
Skip Montanaro6dead952003-09-25 14:50:04 +000011579
Martin v. Löwis11437992002-04-12 09:54:03 +000011580
Matthias Kloseb9621712010-04-24 17:59:49 +000011581$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011582
Guido van Rossumda88dad1995-01-26 00:46:29 +000011583 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011584
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11588$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011589
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011590# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011591
11592
Matthias Kloseb9621712010-04-24 17:59:49 +000011593ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Gregory P. Smith69140482012-01-16 02:05:55 -080011594if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011595
Matthias Kloseb9621712010-04-24 17:59:49 +000011596 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011597
Matthias Kloseb9621712010-04-24 17:59:49 +000011598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11599$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011600 OLD_CFLAGS=$CFLAGS
11601 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011603/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011604
11605# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011606
Martin v. Löwis11437992002-04-12 09:54:03 +000011607int
11608main ()
11609{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011610
11611 char *name;
11612 struct hostent *he, *res;
11613 char buffer[2048];
11614 int buflen = 2048;
11615 int h_errnop;
11616
11617 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011618
11619 ;
11620 return 0;
11621}
11622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011623if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011624
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011626
Martin v. Löwis11437992002-04-12 09:54:03 +000011627
Matthias Kloseb9621712010-04-24 17:59:49 +000011628$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011629
Matthias Kloseb9621712010-04-24 17:59:49 +000011630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11631$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011632
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011633else
Skip Montanaro6dead952003-09-25 14:50:04 +000011634
Matthias Kloseb9621712010-04-24 17:59:49 +000011635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11636$as_echo "no" >&6; }
11637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11638$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011640/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011641
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011642# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011643
Martin v. Löwis11437992002-04-12 09:54:03 +000011644int
11645main ()
11646{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011647
11648 char *name;
11649 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011650 char buffer[2048];
11651 int buflen = 2048;
11652 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011653
Matthias Kloseb159a552010-04-25 21:00:44 +000011654 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011655
11656 ;
11657 return 0;
11658}
11659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011660if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011661
Matthias Kloseb9621712010-04-24 17:59:49 +000011662 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011663
Martin v. Löwis11437992002-04-12 09:54:03 +000011664
Matthias Kloseb159a552010-04-25 21:00:44 +000011665$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011666
Matthias Kloseb9621712010-04-24 17:59:49 +000011667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11668$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011669
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011670else
Skip Montanaro6dead952003-09-25 14:50:04 +000011671
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11673$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11675$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11677/* end confdefs.h. */
11678
11679# include <netdb.h>
11680
11681int
11682main ()
11683{
11684
11685 char *name;
11686 struct hostent *he;
11687 struct hostent_data data;
11688
11689 (void) gethostbyname_r(name, he, &data);
11690
11691 ;
11692 return 0;
11693}
11694_ACEOF
11695if ac_fn_c_try_compile "$LINENO"; then :
11696
11697 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11698
11699
11700$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11701
11702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11703$as_echo "yes" >&6; }
11704
11705else
11706
11707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11708$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011709
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011712
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011715
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011718 CFLAGS=$OLD_CFLAGS
11719
11720else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011721
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 for ac_func in gethostbyname
11723do :
11724 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Gregory P. Smith69140482012-01-16 02:05:55 -080011725if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011726 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011727#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011728_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011729
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011730fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011731done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011732
Michael W. Hudson54241132001-12-07 15:38:26 +000011733
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011734fi
11735
Michael W. Hudson54241132001-12-07 15:38:26 +000011736
11737
11738
11739
11740
11741
Guido van Rossum627b2d71993-12-24 10:39:16 +000011742# checks for system services
11743# (none yet)
11744
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011745# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011746ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Gregory P. Smith69140482012-01-16 02:05:55 -080011747if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011748
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011749else
Matthias Kloseb9621712010-04-24 17:59:49 +000011750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11751$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011752if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011754else
Martin v. Löwis11437992002-04-12 09:54:03 +000011755 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011756LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011760/* Override any GCC internal prototype to avoid an error.
11761 Use char because int might match the return type of a GCC
11762 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011763#ifdef __cplusplus
11764extern "C"
11765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011766char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011767int
11768main ()
11769{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011770return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011771 ;
11772 return 0;
11773}
11774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011775if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011776 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011777else
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011780rm -f core conftest.err conftest.$ac_objext \
11781 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011782LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11785$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011786if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 cat >>confdefs.h <<_ACEOF
11788#define HAVE_LIBIEEE 1
11789_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011790
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011791 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011792
Guido van Rossum627b2d71993-12-24 10:39:16 +000011793fi
11794
Michael W. Hudson54241132001-12-07 15:38:26 +000011795
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011796fi
11797
Michael W. Hudson54241132001-12-07 15:38:26 +000011798
Guido van Rossum7f253911997-05-09 02:42:48 +000011799# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11801$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011803# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011804if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011805 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011806if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011807then
11808
Matthias Kloseb9621712010-04-24 17:59:49 +000011809$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11812$as_echo "yes" >&6; }
11813else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11814$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011815fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011816else
Matthias Kloseb9621712010-04-24 17:59:49 +000011817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11818$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011819fi
11820
Guido van Rossum7f253911997-05-09 02:42:48 +000011821
Guido van Rossum7f43da71994-08-01 12:15:30 +000011822# check for --with-libm=...
11823
Guido van Rossum563e7081996-09-10 18:20:48 +000011824case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011825Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011826*) LIBM=-lm
11827esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11829$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011831# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011832if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011833 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011834if test "$withval" = no
11835then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11837$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011838elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011839then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11841$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011842else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011843fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011844else
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11846$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011847fi
11848
Guido van Rossum7f43da71994-08-01 12:15:30 +000011849
11850# check for --with-libc=...
11851
Matthias Kloseb9621712010-04-24 17:59:49 +000011852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11853$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011855# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011856if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011857 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011858if test "$withval" = no
11859then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11861$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011862elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011863then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11865$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011866else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011867fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011868else
Matthias Kloseb9621712010-04-24 17:59:49 +000011869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11870$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011871fi
11872
Guido van Rossum7f43da71994-08-01 12:15:30 +000011873
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011874# **************************************************
11875# * Check for various properties of floating point *
11876# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011877
Matthias Kloseb9621712010-04-24 17:59:49 +000011878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11879$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011880if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011881 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011882else
11883
Matthias Kloseb9621712010-04-24 17:59:49 +000011884if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011885 ac_cv_little_endian_double=no
11886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011888/* end confdefs.h. */
11889
11890#include <string.h>
11891int main() {
11892 double x = 9006104071832581.0;
11893 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11894 return 0;
11895 else
11896 return 1;
11897}
11898
11899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011900if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011901 ac_cv_little_endian_double=yes
11902else
Matthias Kloseb9621712010-04-24 17:59:49 +000011903 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011904fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011907fi
11908
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011909fi
11910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11912$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011913if test "$ac_cv_little_endian_double" = yes
11914then
11915
Matthias Kloseb9621712010-04-24 17:59:49 +000011916$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011917
11918fi
11919
Matthias Kloseb9621712010-04-24 17:59:49 +000011920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11921$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011922if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011924else
11925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011927 ac_cv_big_endian_double=no
11928else
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011930/* end confdefs.h. */
11931
11932#include <string.h>
11933int main() {
11934 double x = 9006104071832581.0;
11935 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11936 return 0;
11937 else
11938 return 1;
11939}
11940
11941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011942if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011943 ac_cv_big_endian_double=yes
11944else
Matthias Kloseb9621712010-04-24 17:59:49 +000011945 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11948 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011949fi
11950
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011951fi
11952
Matthias Kloseb9621712010-04-24 17:59:49 +000011953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11954$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011955if test "$ac_cv_big_endian_double" = yes
11956then
11957
Matthias Kloseb9621712010-04-24 17:59:49 +000011958$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011959
11960fi
11961
11962# Some ARM platforms use a mixed-endian representation for doubles.
11963# While Python doesn't currently have full support for these platforms
11964# (see e.g., issue 1762561), we can at least make sure that float <-> string
11965# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11967$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011968if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011969 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011970else
11971
Matthias Kloseb9621712010-04-24 17:59:49 +000011972if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011973 ac_cv_mixed_endian_double=no
11974else
Matthias Kloseb9621712010-04-24 17:59:49 +000011975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011976/* end confdefs.h. */
11977
11978#include <string.h>
11979int main() {
11980 double x = 9006104071832581.0;
11981 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11982 return 0;
11983 else
11984 return 1;
11985}
11986
11987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011988if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011989 ac_cv_mixed_endian_double=yes
11990else
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11994 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011995fi
11996
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011997fi
11998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12000$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012001if test "$ac_cv_mixed_endian_double" = yes
12002then
12003
Matthias Kloseb9621712010-04-24 17:59:49 +000012004$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012005
12006fi
12007
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012008# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012009# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012010# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012011# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012012# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012013# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012014
12015# This inline assembler syntax may also work for suncc and icc,
12016# so we try it on all platforms.
12017
Matthias Kloseb9621712010-04-24 17:59:49 +000012018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12019$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012021/* end confdefs.h. */
12022
12023int
12024main ()
12025{
12026
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012027 unsigned short cw;
12028 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12029 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012030
12031 ;
12032 return 0;
12033}
12034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012035if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012036 have_gcc_asm_for_x87=yes
12037else
Matthias Kloseb9621712010-04-24 17:59:49 +000012038 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012039fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12042$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012043if test "$have_gcc_asm_for_x87" = yes
12044then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012045
Matthias Kloseb9621712010-04-24 17:59:49 +000012046$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012047
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012048fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012049
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012050# Detect whether system arithmetic is subject to x87-style double
12051# rounding issues. The result of this test has little meaning on non
12052# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12053# mode is round-to-nearest and double rounding issues are present, and
12054# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12056$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012057# $BASECFLAGS may affect the result
12058ac_save_cc="$CC"
12059CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012060if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012061 ac_cv_x87_double_rounding=no
12062else
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012064/* end confdefs.h. */
12065
12066#include <stdlib.h>
12067#include <math.h>
12068int main() {
12069 volatile double x, y, z;
12070 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12071 x = 0.99999999999999989; /* 1-2**-53 */
12072 y = 1./x;
12073 if (y != 1.)
12074 exit(0);
12075 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12076 x = 1e16;
12077 y = 2.99999;
12078 z = x + y;
12079 if (z != 1e16+4.)
12080 exit(0);
12081 /* both tests show evidence of double rounding */
12082 exit(1);
12083}
12084
12085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012086if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012087 ac_cv_x87_double_rounding=no
12088else
Matthias Kloseb9621712010-04-24 17:59:49 +000012089 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012093fi
12094
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012095CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12097$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012098if test "$ac_cv_x87_double_rounding" = yes
12099then
12100
Matthias Kloseb9621712010-04-24 17:59:49 +000012101$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012102
12103fi
12104
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012105# ************************************
12106# * Check for mathematical functions *
12107# ************************************
12108
12109LIBS_SAVE=$LIBS
12110LIBS="$LIBS $LIBM"
12111
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012112for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12113do :
12114 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12115ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012116if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012117 cat >>confdefs.h <<_ACEOF
12118#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12119_ACEOF
12120
12121fi
12122done
12123
12124for ac_func in hypot lgamma log1p round tgamma
12125do :
12126 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12127ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012128if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012129 cat >>confdefs.h <<_ACEOF
12130#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12131_ACEOF
12132
12133fi
12134done
12135
12136ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12137"
Gregory P. Smith69140482012-01-16 02:05:55 -080012138if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012139 ac_have_decl=1
12140else
12141 ac_have_decl=0
12142fi
12143
12144cat >>confdefs.h <<_ACEOF
12145#define HAVE_DECL_ISINF $ac_have_decl
12146_ACEOF
12147ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12148"
Gregory P. Smith69140482012-01-16 02:05:55 -080012149if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012150 ac_have_decl=1
12151else
12152 ac_have_decl=0
12153fi
12154
12155cat >>confdefs.h <<_ACEOF
12156#define HAVE_DECL_ISNAN $ac_have_decl
12157_ACEOF
12158ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12159"
Gregory P. Smith69140482012-01-16 02:05:55 -080012160if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012161 ac_have_decl=1
12162else
12163 ac_have_decl=0
12164fi
12165
12166cat >>confdefs.h <<_ACEOF
12167#define HAVE_DECL_ISFINITE $ac_have_decl
12168_ACEOF
12169
12170
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012171# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12172# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12174$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012175if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012177else
12178
Matthias Kloseb9621712010-04-24 17:59:49 +000012179if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012180 ac_cv_tanh_preserves_zero_sign=no
12181else
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012183/* end confdefs.h. */
12184
12185#include <math.h>
12186#include <stdlib.h>
12187int main() {
12188 /* return 0 if either negative zeros don't exist
12189 on this platform or if negative zeros exist
12190 and tanh(-0.) == -0. */
12191 if (atan2(0., -1.) == atan2(-0., -1.) ||
12192 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12193 else exit(1);
12194}
12195
12196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012197if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012198 ac_cv_tanh_preserves_zero_sign=yes
12199else
Matthias Kloseb9621712010-04-24 17:59:49 +000012200 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12203 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012204fi
12205
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012206fi
12207
Matthias Kloseb9621712010-04-24 17:59:49 +000012208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12209$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012210if test "$ac_cv_tanh_preserves_zero_sign" = yes
12211then
12212
Matthias Kloseb9621712010-04-24 17:59:49 +000012213$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012214
12215fi
12216
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012217if test "$ac_cv_func_log1p" = yes
12218then
12219 # On some versions of AIX, log1p(-0.) returns 0. instead of
12220 # -0. See issue #9920.
12221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12222$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012223 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012224 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012225else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012226
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012227 if test "$cross_compiling" = yes; then :
12228 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012229else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12231/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012232
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012233 #include <math.h>
12234 #include <stdlib.h>
12235 int main() {
12236 /* Fail if the signs of log1p(-0.) and -0. can be
12237 distinguished. */
12238 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12239 return 0;
12240 else
12241 return 1;
12242 }
12243
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012244_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012245if ac_fn_c_try_run "$LINENO"; then :
12246 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012247else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012248 ac_cv_log1p_drops_zero_sign=yes
12249fi
12250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12251 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012252fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012253
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012254fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012255
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12257$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12258fi
12259if test "$ac_cv_log1p_drops_zero_sign" = yes
12260then
12261
12262$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12263
12264fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012265
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012266LIBS=$LIBS_SAVE
12267
Mark Dickinsona614f042009-11-28 12:48:43 +000012268# For multiprocessing module, check that sem_open
12269# actually works. For FreeBSD versions <= 7.2,
12270# the kernel module that provides POSIX semaphores
12271# isn't loaded by default, so an attempt to call
12272# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12274$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012275if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012277else
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012279 ac_cv_posix_semaphores_enabled=yes
12280else
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012282/* end confdefs.h. */
12283
12284#include <unistd.h>
12285#include <fcntl.h>
12286#include <stdio.h>
12287#include <semaphore.h>
12288#include <sys/stat.h>
12289
12290int main(void) {
12291 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12292 if (a == SEM_FAILED) {
12293 perror("sem_open");
12294 return 1;
12295 }
12296 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012297 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012298 return 0;
12299}
12300
12301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012302if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012303 ac_cv_posix_semaphores_enabled=yes
12304else
Matthias Kloseb9621712010-04-24 17:59:49 +000012305 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012306fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12308 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012309fi
12310
12311
Mark Dickinsona614f042009-11-28 12:48:43 +000012312fi
12313
Matthias Kloseb9621712010-04-24 17:59:49 +000012314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12315$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012316if test $ac_cv_posix_semaphores_enabled = no
12317then
12318
Matthias Kloseb9621712010-04-24 17:59:49 +000012319$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012320
12321fi
12322
Mark Dickinson10683072009-04-18 21:18:19 +000012323# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12325$as_echo_n "checking for broken sem_getvalue... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012326if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012328else
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012330 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012331else
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012333/* end confdefs.h. */
12334
12335#include <unistd.h>
12336#include <fcntl.h>
12337#include <stdio.h>
12338#include <semaphore.h>
12339#include <sys/stat.h>
12340
12341int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012342 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012343 int count;
12344 int res;
12345 if(a==SEM_FAILED){
12346 perror("sem_open");
12347 return 1;
12348
12349 }
12350 res = sem_getvalue(a, &count);
12351 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012352 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012353 return res==-1 ? 1 : 0;
12354}
12355
Mark Dickinson10683072009-04-18 21:18:19 +000012356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012357if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012358 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012359else
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012362rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12363 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012364fi
12365
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012366
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012367fi
12368
Matthias Kloseb9621712010-04-24 17:59:49 +000012369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12370$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012371if test $ac_cv_broken_sem_getvalue = yes
12372then
12373
Matthias Kloseb9621712010-04-24 17:59:49 +000012374$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012375
12376fi
12377
Mark Dickinsonbd792642009-03-18 20:06:12 +000012378# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12380$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012381# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012382if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012383 enableval=$enable_big_digits; case $enable_big_digits in
12384yes)
12385 enable_big_digits=30 ;;
12386no)
12387 enable_big_digits=15 ;;
1238815|30)
12389 ;;
12390*)
Gregory P. Smith69140482012-01-16 02:05:55 -080012391 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 +000012392esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12394$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012395
12396cat >>confdefs.h <<_ACEOF
12397#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12398_ACEOF
12399
12400
12401else
Matthias Kloseb9621712010-04-24 17:59:49 +000012402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12403$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012404fi
12405
12406
Guido van Rossumef2255b2000-03-10 22:30:29 +000012407# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012408ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080012409if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012410
12411
Matthias Kloseb9621712010-04-24 17:59:49 +000012412$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012413
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012414 wchar_h="yes"
12415
Guido van Rossumef2255b2000-03-10 22:30:29 +000012416else
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012418
12419fi
12420
Michael W. Hudson54241132001-12-07 15:38:26 +000012421
Martin v. Löwis11437992002-04-12 09:54:03 +000012422
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012423# determine wchar_t size
12424if test "$wchar_h" = yes
12425then
Matthias Kloseb9621712010-04-24 17:59:49 +000012426 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12428# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12429# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12431$as_echo_n "checking size of wchar_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012432if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012433 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012434else
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12436"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012437
Martin v. Löwis11437992002-04-12 09:54:03 +000012438else
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 if test "$ac_cv_type_wchar_t" = yes; then
12440 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12441$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012442as_fn_error 77 "cannot compute sizeof (wchar_t)
Gregory P. Smith69140482012-01-16 02:05:55 -080012443See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444 else
12445 ac_cv_sizeof_wchar_t=0
12446 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012448
Martin v. Löwis11437992002-04-12 09:54:03 +000012449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12451$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452
12453
12454
Martin v. Löwis11437992002-04-12 09:54:03 +000012455cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012456#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012457_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012458
Michael W. Hudson54241132001-12-07 15:38:26 +000012459
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012460fi
12461
Matthias Kloseb9621712010-04-24 17:59:49 +000012462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12463$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012464have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012466/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012467
12468#include <tcl.h>
12469#if TCL_UTF_MAX != 6
12470# error "NOT UCS4_TCL"
12471#endif
12472int
12473main ()
12474{
12475
12476 ;
12477 return 0;
12478}
12479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012480if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012481
12482
Matthias Kloseb9621712010-04-24 17:59:49 +000012483$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012484
12485 have_ucs4_tcl=yes
12486
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12490$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012491
Skip Montanaro6dead952003-09-25 14:50:04 +000012492# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012493if test "$wchar_h" = yes
12494then
12495 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12497$as_echo_n "checking whether wchar_t is signed... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012498 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012500else
12501
Matthias Kloseb9621712010-04-24 17:59:49 +000012502 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012503 ac_cv_wchar_t_signed=yes
12504else
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012506/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012507
12508 #include <wchar.h>
12509 int main()
12510 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012511 /* Success: exit code 0 */
12512 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012513 }
12514
12515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012516if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012517 ac_cv_wchar_t_signed=yes
12518else
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12522 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012523fi
12524
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012525fi
12526
Matthias Kloseb9621712010-04-24 17:59:49 +000012527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12528$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012529fi
12530
Matthias Kloseb9621712010-04-24 17:59:49 +000012531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12532$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012533
12534# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012535if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012536 withval=$with_wide_unicode;
12537if test "$withval" != no
12538then unicode_size="4"
12539else unicode_size="2"
12540fi
12541
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012542else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012543
Georg Brandl52d168a2008-01-07 18:10:24 +000012544case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012545 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012546 *) unicode_size="2" ;;
12547esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012548
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012549fi
12550
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012551
12552
Georg Brandl52d168a2008-01-07 18:10:24 +000012553case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012554 4)
12555 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12556
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012557 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012558 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012560 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012561esac
12562
Michael W. Hudson54241132001-12-07 15:38:26 +000012563
Martin v. Löwis11437992002-04-12 09:54:03 +000012564
Georg Brandl52d168a2008-01-07 18:10:24 +000012565# wchar_t is only usable if it maps to an unsigned type
12566if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012567 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012568then
12569 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012570
Matthias Kloseb9621712010-04-24 17:59:49 +000012571$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012572
Matthias Kloseb9621712010-04-24 17:59:49 +000012573 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012574
Georg Brandl52d168a2008-01-07 18:10:24 +000012575elif test "$ac_cv_sizeof_short" = "$unicode_size"
12576then
12577 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012578 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012579
Georg Brandl52d168a2008-01-07 18:10:24 +000012580elif test "$ac_cv_sizeof_long" = "$unicode_size"
12581then
12582 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012583 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012584
Georg Brandl52d168a2008-01-07 18:10:24 +000012585else
12586 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12589$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012590
12591# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12593$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012594if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012595 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012596else
Matthias Kloseb9621712010-04-24 17:59:49 +000012597 ac_cv_c_bigendian=unknown
12598 # See if we're dealing with a universal compiler.
12599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12600/* end confdefs.h. */
12601#ifndef __APPLE_CC__
12602 not a universal capable compiler
12603 #endif
12604 typedef int dummy;
12605
Skip Montanaro6dead952003-09-25 14:50:04 +000012606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012607if ac_fn_c_try_compile "$LINENO"; then :
12608
12609 # Check for potential -arch flags. It is not universal unless
12610 # there are at least two -arch flags with different values.
12611 ac_arch=
12612 ac_prev=
12613 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12614 if test -n "$ac_prev"; then
12615 case $ac_word in
12616 i?86 | x86_64 | ppc | ppc64)
12617 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12618 ac_arch=$ac_word
12619 else
12620 ac_cv_c_bigendian=universal
12621 break
12622 fi
12623 ;;
12624 esac
12625 ac_prev=
12626 elif test "x$ac_word" = "x-arch"; then
12627 ac_prev=arch
12628 fi
12629 done
12630fi
12631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12632 if test $ac_cv_c_bigendian = unknown; then
12633 # See if sys/param.h defines the BYTE_ORDER macro.
12634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012635/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012636#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012637 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012638
Martin v. Löwis11437992002-04-12 09:54:03 +000012639int
12640main ()
12641{
Matthias Kloseb9621712010-04-24 17:59:49 +000012642#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12643 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12644 && LITTLE_ENDIAN)
12645 bogus endian macros
12646 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012647
12648 ;
12649 return 0;
12650}
12651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012652if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012653 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012655/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012656#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012657 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012658
Martin v. Löwis11437992002-04-12 09:54:03 +000012659int
12660main ()
12661{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012662#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012663 not big endian
12664 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012665
12666 ;
12667 return 0;
12668}
12669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012670if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012671 ac_cv_c_bigendian=yes
12672else
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012676fi
12677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12678 fi
12679 if test $ac_cv_c_bigendian = unknown; then
12680 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012682/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012683#include <limits.h>
12684
Martin v. Löwis11437992002-04-12 09:54:03 +000012685int
12686main ()
12687{
Matthias Kloseb9621712010-04-24 17:59:49 +000012688#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12689 bogus endian macros
12690 #endif
12691
Martin v. Löwis11437992002-04-12 09:54:03 +000012692 ;
12693 return 0;
12694}
12695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012696if ac_fn_c_try_compile "$LINENO"; then :
12697 # It does; now see whether it defined to _BIG_ENDIAN or not.
12698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12699/* end confdefs.h. */
12700#include <limits.h>
12701
12702int
12703main ()
12704{
12705#ifndef _BIG_ENDIAN
12706 not big endian
12707 #endif
12708
12709 ;
12710 return 0;
12711}
12712_ACEOF
12713if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012715else
Matthias Kloseb9621712010-04-24 17:59:49 +000012716 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12719fi
12720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12721 fi
12722 if test $ac_cv_c_bigendian = unknown; then
12723 # Compile a test program.
12724 if test "$cross_compiling" = yes; then :
12725 # Try to guess by grepping values from an object file.
12726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12727/* end confdefs.h. */
12728short int ascii_mm[] =
12729 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12730 short int ascii_ii[] =
12731 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12732 int use_ascii (int i) {
12733 return ascii_mm[i] + ascii_ii[i];
12734 }
12735 short int ebcdic_ii[] =
12736 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12737 short int ebcdic_mm[] =
12738 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12739 int use_ebcdic (int i) {
12740 return ebcdic_mm[i] + ebcdic_ii[i];
12741 }
12742 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743
Matthias Kloseb9621712010-04-24 17:59:49 +000012744int
12745main ()
12746{
12747return use_ascii (foo) == use_ebcdic (foo);
12748 ;
12749 return 0;
12750}
12751_ACEOF
12752if ac_fn_c_try_compile "$LINENO"; then :
12753 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12754 ac_cv_c_bigendian=yes
12755 fi
12756 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12757 if test "$ac_cv_c_bigendian" = unknown; then
12758 ac_cv_c_bigendian=no
12759 else
12760 # finding both strings is unlikely to happen, but who knows?
12761 ac_cv_c_bigendian=unknown
12762 fi
12763 fi
12764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012766else
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012768/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012769$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012770int
12771main ()
12772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012773
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 /* Are we little or big endian? From Harbison&Steele. */
12775 union
12776 {
12777 long int l;
12778 char c[sizeof (long int)];
12779 } u;
12780 u.l = 1;
12781 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012782
12783 ;
12784 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012785}
Martin v. Löwis11437992002-04-12 09:54:03 +000012786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012787if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012788 ac_cv_c_bigendian=no
12789else
Matthias Kloseb9621712010-04-24 17:59:49 +000012790 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012795
Matthias Kloseb9621712010-04-24 17:59:49 +000012796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12799$as_echo "$ac_cv_c_bigendian" >&6; }
12800 case $ac_cv_c_bigendian in #(
12801 yes)
12802 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12803;; #(
12804 no)
12805 ;; #(
12806 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012807
Matthias Kloseb9621712010-04-24 17:59:49 +000012808$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810 ;; #(
12811 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012812 as_fn_error $? "unknown endianness
Gregory P. Smith69140482012-01-16 02:05:55 -080012813 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012815
Michael W. Hudson54241132001-12-07 15:38:26 +000012816
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012817# ABI version string for Python extension modules. This appears between the
12818# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12819# from the following attributes which affect the ABI of this Python build (in
12820# this order):
12821#
12822# * The Python implementation (always 'cpython-' for us)
12823# * The major and minor version numbers
12824# * --with-pydebug (adds a 'd')
12825# * --with-pymalloc (adds a 'm')
12826# * --with-wide-unicode (adds a 'u')
12827#
12828# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012829# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12830# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012831
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12833$as_echo_n "checking ABIFLAGS... " >&6; }
12834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12835$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12837$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012838SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12840$as_echo "$SOABI" >&6; }
12841
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12843$as_echo_n "checking LDVERSION... " >&6; }
12844LDVERSION='$(VERSION)$(ABIFLAGS)'
12845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12846$as_echo "$LDVERSION" >&6; }
12847
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012848# SO is the extension of shared libraries `(including the dot!)
12849# -- usually .so, .sl on HP-UX, .dll on Cygwin
12850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12851$as_echo_n "checking SO... " >&6; }
12852if test -z "$SO"
12853then
12854 case $ac_sys_system in
12855 hp*|HP*)
12856 case `uname -m` in
12857 ia64) SO=.so;;
12858 *) SO=.sl;;
12859 esac
12860 ;;
12861 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012862 Linux*|GNU*)
12863 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012864 *) SO=.so;;
12865 esac
12866else
12867 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012868 echo
12869 echo '====================================================================='
12870 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012871 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012872 echo '+ Do you really mean to change the extension for shared libraries? +'
12873 echo '+ Continuing in 10 seconds to let you to ponder. +'
12874 echo '+ +'
12875 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012876 sleep 10
12877fi
12878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12879$as_echo "$SO" >&6; }
12880
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012881# Check whether right shifting a negative integer extends the sign bit
12882# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12884$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012885if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012886 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012887else
Martin v. Löwis11437992002-04-12 09:54:03 +000012888
Matthias Kloseb9621712010-04-24 17:59:49 +000012889if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012890 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012891else
Matthias Kloseb9621712010-04-24 17:59:49 +000012892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012893/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012894
12895int main()
12896{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012897 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012898}
12899
Martin v. Löwis11437992002-04-12 09:54:03 +000012900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012901if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012902 ac_cv_rshift_extends_sign=yes
12903else
Matthias Kloseb9621712010-04-24 17:59:49 +000012904 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12907 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012908fi
12909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910fi
12911
Matthias Kloseb9621712010-04-24 17:59:49 +000012912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12913$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012914if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012915then
Martin v. Löwis11437992002-04-12 09:54:03 +000012916
Matthias Kloseb9621712010-04-24 17:59:49 +000012917$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012918
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012919fi
12920
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012921# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12923$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012924if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012925 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012926else
Martin v. Löwis11437992002-04-12 09:54:03 +000012927
Matthias Kloseb9621712010-04-24 17:59:49 +000012928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012929/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012930#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012931int
12932main ()
12933{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012934
12935 FILE *f = fopen("/dev/null", "r");
12936 flockfile(f);
12937 getc_unlocked(f);
12938 funlockfile(f);
12939
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 ;
12941 return 0;
12942}
12943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012944if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012945 ac_cv_have_getc_unlocked=yes
12946else
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 ac_cv_have_getc_unlocked=no
12948fi
12949rm -f core conftest.err conftest.$ac_objext \
12950 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12954$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012955if test "$ac_cv_have_getc_unlocked" = yes
12956then
Martin v. Löwis11437992002-04-12 09:54:03 +000012957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012959
12960fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012961
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012962# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012963# save the value of LIBS so we don't actually link Python with readline
12964LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012965
Gregory P. Smith18820942008-09-07 06:24:49 +000012966# On some systems we need to link readline to a termcap compatible
12967# library. NOTE: Keep the precedence of listed libraries synchronised
12968# with setup.py.
12969py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12971$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012972for py_libtermcap in "" ncursesw ncurses curses termcap; do
12973 if test -z "$py_libtermcap"; then
12974 READLINE_LIBS="-lreadline"
12975 else
12976 READLINE_LIBS="-lreadline -l$py_libtermcap"
12977 fi
12978 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012980/* end confdefs.h. */
12981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982/* Override any GCC internal prototype to avoid an error.
12983 Use char because int might match the return type of a GCC
12984 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012985#ifdef __cplusplus
12986extern "C"
12987#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012988char readline ();
12989int
12990main ()
12991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012992return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012993 ;
12994 return 0;
12995}
12996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012997if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012998 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013000rm -f core conftest.err conftest.$ac_objext \
13001 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013002 if test $py_cv_lib_readline = yes; then
13003 break
13004 fi
13005done
13006# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13007#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013008if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13010$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013011else
Matthias Kloseb9621712010-04-24 17:59:49 +000013012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13013$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013014
Matthias Kloseb9621712010-04-24 17:59:49 +000013015$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013016
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013017fi
13018
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013019# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13021$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013022if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013023 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013024else
13025 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013026LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013028/* end confdefs.h. */
13029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013030/* Override any GCC internal prototype to avoid an error.
13031 Use char because int might match the return type of a GCC
13032 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013033#ifdef __cplusplus
13034extern "C"
13035#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013036char rl_callback_handler_install ();
13037int
13038main ()
13039{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013040return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013041 ;
13042 return 0;
13043}
13044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013045if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013046 ac_cv_lib_readline_rl_callback_handler_install=yes
13047else
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013050rm -f core conftest.err conftest.$ac_objext \
13051 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013052LIBS=$ac_check_lib_save_LIBS
13053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13055$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013056if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013059
13060fi
13061
13062
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013063# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013065/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013066#include <readline/readline.h>
13067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013068if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013069 have_readline=yes
13070else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013071 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013072
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013073fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013074rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013075if test $have_readline = yes
13076then
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013078/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013079#include <readline/readline.h>
13080
13081_ACEOF
13082if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013083 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013086
13087fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013088rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013089
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013091/* end confdefs.h. */
13092#include <readline/readline.h>
13093
13094_ACEOF
13095if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013097
Matthias Kloseb9621712010-04-24 17:59:49 +000013098$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013099
13100fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013101rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013102
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013103fi
13104
Martin v. Löwis0daad592001-09-30 21:09:59 +000013105# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13107$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013108if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013109 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013110else
Martin v. Löwis11437992002-04-12 09:54:03 +000013111 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013112LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013116/* Override any GCC internal prototype to avoid an error.
13117 Use char because int might match the return type of a GCC
13118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013119#ifdef __cplusplus
13120extern "C"
13121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013122char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013123int
13124main ()
13125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013126return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013127 ;
13128 return 0;
13129}
13130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013131if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013133else
Matthias Kloseb9621712010-04-24 17:59:49 +000013134 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013136rm -f core conftest.err conftest.$ac_objext \
13137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013138LIBS=$ac_check_lib_save_LIBS
13139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13141$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013142if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013145
Martin v. Löwis0daad592001-09-30 21:09:59 +000013146fi
13147
Michael W. Hudson54241132001-12-07 15:38:26 +000013148
Thomas Wouters89d996e2007-09-08 17:39:28 +000013149# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13151$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013152if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013153 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013154else
13155 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013156LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013158/* end confdefs.h. */
13159
13160/* Override any GCC internal prototype to avoid an error.
13161 Use char because int might match the return type of a GCC
13162 builtin and then its argument prototype would still apply. */
13163#ifdef __cplusplus
13164extern "C"
13165#endif
13166char rl_completion_display_matches_hook ();
13167int
13168main ()
13169{
13170return rl_completion_display_matches_hook ();
13171 ;
13172 return 0;
13173}
13174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013175if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013176 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13177else
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013180rm -f core conftest.err conftest.$ac_objext \
13181 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013182LIBS=$ac_check_lib_save_LIBS
13183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13185$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013186if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013187
Matthias Kloseb9621712010-04-24 17:59:49 +000013188$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013189
13190fi
13191
13192
Martin v. Löwis0daad592001-09-30 21:09:59 +000013193# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13195$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013196if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013198else
Martin v. Löwis11437992002-04-12 09:54:03 +000013199 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013200LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013204/* Override any GCC internal prototype to avoid an error.
13205 Use char because int might match the return type of a GCC
13206 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013207#ifdef __cplusplus
13208extern "C"
13209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013210char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013211int
13212main ()
13213{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013215 ;
13216 return 0;
13217}
13218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013219if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013220 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013221else
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013224rm -f core conftest.err conftest.$ac_objext \
13225 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013226LIBS=$ac_check_lib_save_LIBS
13227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13229$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013230if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013231
Matthias Kloseb9621712010-04-24 17:59:49 +000013232$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013233
Guido van Rossum353ae582001-07-10 16:45:32 +000013234fi
13235
Jack Jansendd19cf82001-12-06 22:36:17 +000013236
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013237# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013239/* end confdefs.h. */
13240#include <readline/readline.h>
13241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013242if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013243 have_readline=yes
13244else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013245 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013246
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013247fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013248rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013249if test $have_readline = yes
13250then
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013252/* end confdefs.h. */
13253#include <readline/readline.h>
13254
13255_ACEOF
13256if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013257 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013260
13261fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013262rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013263
13264fi
13265
Martin v. Löwis82bca632006-02-10 20:49:30 +000013266# End of readline checks: restore LIBS
13267LIBS=$LIBS_no_readline
13268
Matthias Kloseb9621712010-04-24 17:59:49 +000013269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13270$as_echo_n "checking for broken nice()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013271if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013272 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013273else
Martin v. Löwis11437992002-04-12 09:54:03 +000013274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013276 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013277else
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013279/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013280
13281int main()
13282{
13283 int val1 = nice(1);
13284 if (val1 != -1 && val1 == nice(2))
13285 exit(0);
13286 exit(1);
13287}
13288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013290if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013291 ac_cv_broken_nice=yes
13292else
Matthias Kloseb9621712010-04-24 17:59:49 +000013293 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13296 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013297fi
13298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013299fi
13300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13302$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013303if test "$ac_cv_broken_nice" = yes
13304then
Martin v. Löwis11437992002-04-12 09:54:03 +000013305
Matthias Kloseb9621712010-04-24 17:59:49 +000013306$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013307
13308fi
13309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13311$as_echo_n "checking for broken poll()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013312if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013313 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013314else
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013316 ac_cv_broken_poll=no
13317else
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013319/* end confdefs.h. */
13320
13321#include <poll.h>
13322
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013323int main()
13324{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013325 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013326 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013327
13328 close (42);
13329
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013330 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013331 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013332 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013333 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013334 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013335 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013336 return 1;
13337}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013338
13339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013340if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013341 ac_cv_broken_poll=yes
13342else
Matthias Kloseb9621712010-04-24 17:59:49 +000013343 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013344fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013345rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13346 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013348
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013349fi
13350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13352$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013353if test "$ac_cv_broken_poll" = yes
13354then
13355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013357
13358fi
13359
Brett Cannon43802422005-02-10 20:48:03 +000013360# 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 +000013361# (which is not required by ISO C or UNIX spec) and/or if we support
13362# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013363ac_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 +000013364#include <$ac_cv_struct_tm>
13365
Matthias Kloseb9621712010-04-24 17:59:49 +000013366"
Gregory P. Smith69140482012-01-16 02:05:55 -080013367if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013368
13369cat >>confdefs.h <<_ACEOF
13370#define HAVE_STRUCT_TM_TM_ZONE 1
13371_ACEOF
13372
13373
13374fi
13375
13376if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13377
Matthias Kloseb9621712010-04-24 17:59:49 +000013378$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013379
13380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13382"
Gregory P. Smith69140482012-01-16 02:05:55 -080013383if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385else
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387fi
13388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013389cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013390#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391_ACEOF
13392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13394$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013395if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013397else
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013399/* end confdefs.h. */
13400#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013401#if !HAVE_DECL_TZNAME
13402extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013403#endif
13404
13405int
13406main ()
13407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013409 ;
13410 return 0;
13411}
13412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013413if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013414 ac_cv_var_tzname=yes
13415else
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013418rm -f core conftest.err conftest.$ac_objext \
13419 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13422$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013423 if test $ac_cv_var_tzname = yes; then
13424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013426
13427 fi
13428fi
13429
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013430
Martin v. Löwis1d459062005-03-14 21:23:33 +000013431# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13433$as_echo_n "checking for working tzset()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013434if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013436else
13437
Matthias Kloseb9621712010-04-24 17:59:49 +000013438if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013439 ac_cv_working_tzset=no
13440else
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013442/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013443
13444#include <stdlib.h>
13445#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013446#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013447
13448#if HAVE_TZNAME
13449extern char *tzname[];
13450#endif
13451
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013452int main()
13453{
Brett Cannon18367812003-09-19 00:59:16 +000013454 /* Note that we need to ensure that not only does tzset(3)
13455 do 'something' with localtime, but it works as documented
13456 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013457 This includes making sure that tzname is set properly if
13458 tm->tm_zone does not exist since it is the alternative way
13459 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013460
13461 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013462 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013463 */
13464
Martin v. Löwis1d459062005-03-14 21:23:33 +000013465 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013466 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13467
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013468 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013469 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013470 if (localtime(&groundhogday)->tm_hour != 0)
13471 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013472#if HAVE_TZNAME
13473 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13474 if (strcmp(tzname[0], "UTC") ||
13475 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13476 exit(1);
13477#endif
Brett Cannon18367812003-09-19 00:59:16 +000013478
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013479 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013480 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013481 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013482 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013483#if HAVE_TZNAME
13484 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13485 exit(1);
13486#endif
Brett Cannon18367812003-09-19 00:59:16 +000013487
13488 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13489 tzset();
13490 if (localtime(&groundhogday)->tm_hour != 11)
13491 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013492#if HAVE_TZNAME
13493 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13494 exit(1);
13495#endif
13496
13497#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013498 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13499 exit(1);
13500 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13501 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013502#endif
Brett Cannon18367812003-09-19 00:59:16 +000013503
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013504 exit(0);
13505}
13506
13507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013508if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013509 ac_cv_working_tzset=yes
13510else
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13514 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013515fi
13516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013517fi
13518
Matthias Kloseb9621712010-04-24 17:59:49 +000013519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13520$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013521if test "$ac_cv_working_tzset" = yes
13522then
13523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013525
13526fi
13527
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013528# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13530$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013531if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013533else
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013535/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013536#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013537int
13538main ()
13539{
13540
13541struct stat st;
13542st.st_mtim.tv_nsec = 1;
13543
13544 ;
13545 return 0;
13546}
13547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013548if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013549 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013550else
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13554fi
13555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13557$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013558if test "$ac_cv_stat_tv_nsec" = yes
13559then
13560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013562
13563fi
13564
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013565# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13567$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013568if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013569 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013570else
Matthias Kloseb9621712010-04-24 17:59:49 +000013571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013572/* end confdefs.h. */
13573#include <sys/stat.h>
13574int
13575main ()
13576{
13577
13578struct stat st;
13579st.st_mtimespec.tv_nsec = 1;
13580
13581 ;
13582 return 0;
13583}
13584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013585if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013586 ac_cv_stat_tv_nsec2=yes
13587else
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13591fi
13592
Matthias Kloseb9621712010-04-24 17:59:49 +000013593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13594$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013595if test "$ac_cv_stat_tv_nsec2" = yes
13596then
13597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013599
13600fi
13601
Jack Jansen666b1e72001-10-31 12:11:48 +000013602# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13604$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013605if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013607else
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013609/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013610#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013611int
13612main ()
13613{
Jack Jansen666b1e72001-10-31 12:11:48 +000013614
13615 int rtn;
13616 rtn = mvwdelch(0,0,0);
13617
Martin v. Löwis11437992002-04-12 09:54:03 +000013618 ;
13619 return 0;
13620}
13621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013622if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013623 ac_cv_mvwdelch_is_expression=yes
13624else
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13628fi
13629
Matthias Kloseb9621712010-04-24 17:59:49 +000013630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13631$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013632
13633if test "$ac_cv_mvwdelch_is_expression" = yes
13634then
Martin v. Löwis11437992002-04-12 09:54:03 +000013635
Matthias Kloseb9621712010-04-24 17:59:49 +000013636$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013637
13638fi
13639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13641$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013642if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013646/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013647#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013648int
13649main ()
13650{
Jack Jansen666b1e72001-10-31 12:11:48 +000013651
13652 WINDOW *w;
13653 w->_flags = 0;
13654
Martin v. Löwis11437992002-04-12 09:54:03 +000013655 ;
13656 return 0;
13657}
13658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013659if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013660 ac_cv_window_has_flags=yes
13661else
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13665fi
13666
Matthias Kloseb9621712010-04-24 17:59:49 +000013667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13668$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013669
Jack Jansen666b1e72001-10-31 12:11:48 +000013670
13671if test "$ac_cv_window_has_flags" = yes
13672then
Martin v. Löwis11437992002-04-12 09:54:03 +000013673
Matthias Kloseb9621712010-04-24 17:59:49 +000013674$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013675
13676fi
13677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13679$as_echo_n "checking for is_term_resized... " >&6; }
13680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013681/* end confdefs.h. */
13682#include <curses.h>
13683int
13684main ()
13685{
13686void *x=is_term_resized
13687 ;
13688 return 0;
13689}
13690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013691if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013694
Matthias Kloseb159a552010-04-25 21:00:44 +000013695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013696$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013697else
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13699$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013700
13701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13703
Matthias Kloseb9621712010-04-24 17:59:49 +000013704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13705$as_echo_n "checking for resize_term... " >&6; }
13706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013707/* end confdefs.h. */
13708#include <curses.h>
13709int
13710main ()
13711{
13712void *x=resize_term
13713 ;
13714 return 0;
13715}
13716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013717if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013720
Matthias Kloseb159a552010-04-25 21:00:44 +000013721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013722$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013723else
Matthias Kloseb9621712010-04-24 17:59:49 +000013724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13725$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013726
13727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13731$as_echo_n "checking for resizeterm... " >&6; }
13732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013733/* end confdefs.h. */
13734#include <curses.h>
13735int
13736main ()
13737{
13738void *x=resizeterm
13739 ;
13740 return 0;
13741}
13742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013743if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013744
Matthias Kloseb9621712010-04-24 17:59:49 +000013745$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013746
Matthias Kloseb159a552010-04-25 21:00:44 +000013747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013748$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013749else
Matthias Kloseb9621712010-04-24 17:59:49 +000013750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13751$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013752
13753fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13755
Matthias Kloseb9621712010-04-24 17:59:49 +000013756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13757$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013758
13759if test -r /dev/ptmx
13760then
Matthias Kloseb9621712010-04-24 17:59:49 +000013761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13762$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013763
Matthias Kloseb9621712010-04-24 17:59:49 +000013764$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013765
Thomas Wouters89f507f2006-12-13 04:49:30 +000013766else
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13768$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013769fi
13770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13772$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013773
13774if test -r /dev/ptc
13775then
Matthias Kloseb9621712010-04-24 17:59:49 +000013776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13777$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013780
Thomas Wouters89f507f2006-12-13 04:49:30 +000013781else
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13783$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013784fi
13785
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013786if test "$have_long_long" = yes
13787then
Matthias Kloseb9621712010-04-24 17:59:49 +000013788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13789$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013790 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013791 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013792else
Matthias Kloseb9621712010-04-24 17:59:49 +000013793 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013794 ac_cv_have_long_long_format=no
13795else
Matthias Kloseb9621712010-04-24 17:59:49 +000013796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013797/* end confdefs.h. */
13798
13799 #include <stdio.h>
13800 #include <stddef.h>
13801 #include <string.h>
13802
13803 #ifdef HAVE_SYS_TYPES_H
13804 #include <sys/types.h>
13805 #endif
13806
13807 int main()
13808 {
13809 char buffer[256];
13810
13811 if (sprintf(buffer, "%lld", (long long)123) < 0)
13812 return 1;
13813 if (strcmp(buffer, "123"))
13814 return 1;
13815
13816 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13817 return 1;
13818 if (strcmp(buffer, "-123"))
13819 return 1;
13820
13821 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13822 return 1;
13823 if (strcmp(buffer, "123"))
13824 return 1;
13825
13826 return 0;
13827 }
13828
13829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013830if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013831 ac_cv_have_long_long_format=yes
13832else
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013837fi
13838
13839
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013840fi
13841
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13843$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013844fi
13845
Mark Dickinson89d7d412009-12-31 20:50:59 +000013846if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013847then
13848
Matthias Kloseb9621712010-04-24 17:59:49 +000013849$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013850
13851fi
13852
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013853if test $ac_sys_system = Darwin
13854then
13855 LIBS="$LIBS -framework CoreFoundation"
13856fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013857
Matthias Kloseb9621712010-04-24 17:59:49 +000013858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13859$as_echo_n "checking for %zd printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013860if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013861 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013862else
Matthias Kloseb9621712010-04-24 17:59:49 +000013863 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013864 ac_cv_have_size_t_format="cross -- assuming yes"
13865
Thomas Wouters477c8d52006-05-27 19:21:47 +000013866else
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013868/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013869
Thomas Wouters477c8d52006-05-27 19:21:47 +000013870#include <stdio.h>
13871#include <stddef.h>
13872#include <string.h>
13873
Christian Heimes2c181612007-12-17 20:04:13 +000013874#ifdef HAVE_SYS_TYPES_H
13875#include <sys/types.h>
13876#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013877
13878#ifdef HAVE_SSIZE_T
13879typedef ssize_t Py_ssize_t;
13880#elif SIZEOF_VOID_P == SIZEOF_LONG
13881typedef long Py_ssize_t;
13882#else
13883typedef int Py_ssize_t;
13884#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013885
Christian Heimes2c181612007-12-17 20:04:13 +000013886int main()
13887{
13888 char buffer[256];
13889
Thomas Wouters477c8d52006-05-27 19:21:47 +000013890 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13891 return 1;
13892
Thomas Wouters89f507f2006-12-13 04:49:30 +000013893 if (strcmp(buffer, "123"))
13894 return 1;
13895
13896 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13897 return 1;
13898
13899 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013900 return 1;
13901
13902 return 0;
13903}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013904
Thomas Wouters477c8d52006-05-27 19:21:47 +000013905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013906if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013907 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013908else
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13912 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013913fi
13914
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13917$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013918if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013919
Matthias Kloseb9621712010-04-24 17:59:49 +000013920$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013921
13922fi
13923
Matthias Kloseb9621712010-04-24 17:59:49 +000013924ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013925#ifdef HAVE_SYS_TYPES_H
13926#include <sys/types.h>
13927#endif
13928#ifdef HAVE_SYS_SOCKET_H
13929#include <sys/socket.h>
13930#endif
13931
Matthias Kloseb9621712010-04-24 17:59:49 +000013932"
Gregory P. Smith69140482012-01-16 02:05:55 -080013933if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013934
Martin v. Löwis11437992002-04-12 09:54:03 +000013935else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013936
Matthias Kloseb9621712010-04-24 17:59:49 +000013937$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013938
13939fi
13940
Michael W. Hudson54241132001-12-07 15:38:26 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13943$as_echo_n "checking for broken mbstowcs... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013944if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013946else
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013948 ac_cv_broken_mbstowcs=no
13949else
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013951/* end confdefs.h. */
13952
13953#include<stdlib.h>
13954int main() {
13955 size_t len = -1;
13956 const char *str = "text";
13957 len = mbstowcs(NULL, str, 0);
13958 return (len != 4);
13959}
13960
13961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013962if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013963 ac_cv_broken_mbstowcs=no
13964else
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13968 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013969fi
13970
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013971fi
13972
Matthias Kloseb9621712010-04-24 17:59:49 +000013973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13974$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013975if test "$ac_cv_broken_mbstowcs" = yes
13976then
13977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013979
13980fi
13981
Antoine Pitrou042b1282010-08-13 21:15:58 +000013982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13983$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013984if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013985 $as_echo_n "(cached) " >&6
13986else
13987 if test "$cross_compiling" = yes; then :
13988 ac_cv_computed_gotos=no
13989else
13990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13991/* end confdefs.h. */
13992
13993int main(int argc, char **argv)
13994{
13995 static void *targets[1] = { &&LABEL1 };
13996 goto LABEL2;
13997LABEL1:
13998 return 0;
13999LABEL2:
14000 goto *targets[0];
14001 return 1;
14002}
14003
14004_ACEOF
14005if ac_fn_c_try_run "$LINENO"; then :
14006 ac_cv_computed_gotos=yes
14007else
14008 ac_cv_computed_gotos=no
14009fi
14010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14011 conftest.$ac_objext conftest.beam conftest.$ac_ext
14012fi
14013
14014fi
14015
14016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14017$as_echo "$ac_cv_computed_gotos" >&6; }
14018if test "$ac_cv_computed_gotos" = yes
14019then
14020
14021$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14022
14023fi
14024
Antoine Pitroub52ec782009-01-25 16:34:23 +000014025# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14027$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014028
14029# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014030if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014031 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014032if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014033then
14034
Matthias Kloseb9621712010-04-24 17:59:49 +000014035$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014036
Matthias Kloseb9621712010-04-24 17:59:49 +000014037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14038$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014039fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014040if test "$withval" = no
14041then
14042
14043$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14044
Matthias Kloseb9621712010-04-24 17:59:49 +000014045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14046$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014047fi
14048
Antoine Pitrou042b1282010-08-13 21:15:58 +000014049else
14050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14051$as_echo "no value specified" >&6; }
14052fi
14053
Antoine Pitroub52ec782009-01-25 16:34:23 +000014054
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014055case $ac_sys_system in
14056AIX*)
14057
14058$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14059 ;;
14060esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014061
Michael W. Hudson54241132001-12-07 15:38:26 +000014062
Jesus Cea6a792292010-05-03 21:18:48 +000014063case $ac_sys_system in
Gregory P. Smith69140482012-01-16 02:05:55 -080014064 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 +000014065esac
14066
Gregory P. Smith138fa432010-12-13 08:00:52 +000014067ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Gregory P. Smith69140482012-01-16 02:05:55 -080014068if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000014069
14070$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
14071
14072fi
Jesus Cea6a792292010-05-03 21:18:48 +000014073
14074
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014075
14076
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014077for h in `(cd $srcdir;echo Python/thread_*.h)`
14078do
14079 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14080done
14081
Michael W. Hudson54241132001-12-07 15:38:26 +000014082
Neal Norwitzd24499d2005-12-18 21:36:39 +000014083SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14085$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014086for dir in $SRCDIRS; do
14087 if test ! -d $dir; then
14088 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014089 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014090done
Matthias Kloseb9621712010-04-24 17:59:49 +000014091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14092$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014093
Guido van Rossum627b2d71993-12-24 10:39:16 +000014094# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014095ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014096
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014097ac_config_files="$ac_config_files Modules/ld_so_aix"
14098
Martin v. Löwis11437992002-04-12 09:54:03 +000014099cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014100# This file is a shell script that caches the results of configure
14101# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014102# scripts and configure runs, see configure's option --config-cache.
14103# It is not useful on other systems. If it contains results you don't
14104# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014105#
Martin v. Löwis11437992002-04-12 09:54:03 +000014106# config.status only pays attention to the cache file if you give it
14107# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014108#
Skip Montanaro6dead952003-09-25 14:50:04 +000014109# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014110# loading this file, other *unset* `ac_cv_foo' will be assigned the
14111# following values.
14112
14113_ACEOF
14114
Guido van Rossumf78abae1997-01-21 22:02:36 +000014115# The following way of writing the cache mishandles newlines in values,
14116# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014117# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014118# Ultrix sh set writes to stderr and can't be redirected directly,
14119# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014120(
14121 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14122 eval ac_val=\$$ac_var
14123 case $ac_val in #(
14124 *${as_nl}*)
14125 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014126 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14127$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014128 esac
14129 case $ac_var in #(
14130 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14132 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133 esac ;;
14134 esac
14135 done
14136
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14139 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 # `set' does not quote correctly, so add quotes: double-quote
14141 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014142 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014143 "s/'/'\\\\''/g;
14144 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014145 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014146 *)
14147 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150 esac |
14151 sort
14152) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014153 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014154 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014155 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014157 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14158 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14160 :end' >>confcache
14161if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14162 if test -w "$cache_file"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014163 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14165$as_echo "$as_me: updating cache $cache_file" >&6;}
Gregory P. Smith69140482012-01-16 02:05:55 -080014166 if test ! -f "$cache_file" || test -h "$cache_file"; then
14167 cat confcache >"$cache_file"
14168 else
14169 case $cache_file in #(
14170 */* | ?:*)
14171 mv -f confcache "$cache_file"$$ &&
14172 mv -f "$cache_file"$$ "$cache_file" ;; #(
14173 *)
14174 mv -f confcache "$cache_file" ;;
14175 esac
14176 fi
14177 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014178 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014179 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14180$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014181 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014182fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014183rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014184
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014185test "x$prefix" = xNONE && prefix=$ac_default_prefix
14186# Let make expand exec_prefix.
14187test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014188
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014189DEFS=-DHAVE_CONFIG_H
14190
Skip Montanaro6dead952003-09-25 14:50:04 +000014191ac_libobjs=
14192ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014193U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014194for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14195 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14199 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14201 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014202done
14203LIBOBJS=$ac_libobjs
14204
14205LTLIBOBJS=$ac_ltlibobjs
14206
14207
Martin v. Löwis11437992002-04-12 09:54:03 +000014208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209
Gregory P. Smith69140482012-01-16 02:05:55 -080014210: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014211ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014212ac_clean_files_save=$ac_clean_files
14213ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014214{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14215$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14216as_write_fail=0
14217cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014218#! $SHELL
14219# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014220# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014221# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014222# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014223
Martin v. Löwis11437992002-04-12 09:54:03 +000014224debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014225ac_cs_recheck=false
14226ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014227
Matthias Kloseb9621712010-04-24 17:59:49 +000014228SHELL=\${CONFIG_SHELL-$SHELL}
14229export SHELL
14230_ASEOF
14231cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14232## -------------------- ##
14233## M4sh Initialization. ##
14234## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236# Be more Bourne compatible
14237DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014238if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014239 emulate sh
14240 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014242 # is contrary to our usage. Disable this feature.
14243 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014244 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014245else
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 case `(set -o) 2>/dev/null` in #(
14247 *posix*) :
14248 set -o posix ;; #(
14249 *) :
14250 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014252fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014253
14254
Matthias Kloseb9621712010-04-24 17:59:49 +000014255as_nl='
14256'
14257export as_nl
14258# Printing a long string crashes Solaris 7 /usr/bin/printf.
14259as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14260as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14261as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14262# Prefer a ksh shell builtin over an external printf program on Solaris,
14263# but without wasting forks for bash or zsh.
14264if test -z "$BASH_VERSION$ZSH_VERSION" \
14265 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14266 as_echo='print -r --'
14267 as_echo_n='print -rn --'
14268elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14269 as_echo='printf %s\n'
14270 as_echo_n='printf %s'
14271else
14272 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14273 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14274 as_echo_n='/usr/ucb/echo -n'
14275 else
14276 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14277 as_echo_n_body='eval
14278 arg=$1;
14279 case $arg in #(
14280 *"$as_nl"*)
14281 expr "X$arg" : "X\\(.*\\)$as_nl";
14282 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14283 esac;
14284 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14285 '
14286 export as_echo_n_body
14287 as_echo_n='sh -c $as_echo_n_body as_echo'
14288 fi
14289 export as_echo_body
14290 as_echo='sh -c $as_echo_body as_echo'
14291fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014292
14293# The user is always right.
14294if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014295 PATH_SEPARATOR=:
14296 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14297 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14298 PATH_SEPARATOR=';'
14299 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014300fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014302
14303# IFS
14304# We need space, tab and new line, in precisely that order. Quoting is
14305# there to prevent editors from complaining about space-tab.
14306# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14307# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014308IFS=" "" $as_nl"
14309
14310# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080014311as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014312case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014313 *[\\/]* ) as_myself=$0 ;;
14314 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014315for as_dir in $PATH
14316do
14317 IFS=$as_save_IFS
14318 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014319 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14320 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014321IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014323 ;;
14324esac
14325# We did not find ourselves, most probably we were run as `sh COMMAND'
14326# in which case we are not to be found in the path.
14327if test "x$as_myself" = x; then
14328 as_myself=$0
14329fi
14330if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014331 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14332 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014333fi
14334
Matthias Kloseb9621712010-04-24 17:59:49 +000014335# Unset variables that we do not need and which cause bugs (e.g. in
14336# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14337# suppresses any "Segmentation fault" message there. '((' could
14338# trigger a bug in pdksh 5.2.14.
14339for as_var in BASH_ENV ENV MAIL MAILPATH
14340do eval test x\${$as_var+set} = xset \
14341 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014342done
14343PS1='$ '
14344PS2='> '
14345PS4='+ '
14346
14347# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014348LC_ALL=C
14349export LC_ALL
14350LANGUAGE=C
14351export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352
Matthias Kloseb9621712010-04-24 17:59:49 +000014353# CDPATH.
14354(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14355
14356
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014357# as_fn_error STATUS ERROR [LINENO LOG_FD]
14358# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014361# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014362as_fn_error ()
14363{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014364 as_status=$1; test $as_status -eq 0 && as_status=1
14365 if test "$4"; then
14366 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014368 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014369 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 as_fn_exit $as_status
14371} # as_fn_error
14372
14373
14374# as_fn_set_status STATUS
14375# -----------------------
14376# Set $? to STATUS, without forking.
14377as_fn_set_status ()
14378{
14379 return $1
14380} # as_fn_set_status
14381
14382# as_fn_exit STATUS
14383# -----------------
14384# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14385as_fn_exit ()
14386{
14387 set +e
14388 as_fn_set_status $1
14389 exit $1
14390} # as_fn_exit
14391
14392# as_fn_unset VAR
14393# ---------------
14394# Portably unset VAR.
14395as_fn_unset ()
14396{
14397 { eval $1=; unset $1;}
14398}
14399as_unset=as_fn_unset
14400# as_fn_append VAR VALUE
14401# ----------------------
14402# Append the text in VALUE to the end of the definition contained in VAR. Take
14403# advantage of any shell optimizations that allow amortized linear growth over
14404# repeated appends, instead of the typical quadratic growth present in naive
14405# implementations.
14406if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14407 eval 'as_fn_append ()
14408 {
14409 eval $1+=\$2
14410 }'
14411else
14412 as_fn_append ()
14413 {
14414 eval $1=\$$1\$2
14415 }
14416fi # as_fn_append
14417
14418# as_fn_arith ARG...
14419# ------------------
14420# Perform arithmetic evaluation on the ARGs, and store the result in the
14421# global $as_val. Take advantage of shells that can avoid forks. The arguments
14422# must be portable across $(()) and expr.
14423if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14424 eval 'as_fn_arith ()
14425 {
14426 as_val=$(( $* ))
14427 }'
14428else
14429 as_fn_arith ()
14430 {
14431 as_val=`expr "$@" || test $? -eq 1`
14432 }
14433fi # as_fn_arith
14434
14435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436if expr a : '\(a\)' >/dev/null 2>&1 &&
14437 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14438 as_expr=expr
14439else
14440 as_expr=false
14441fi
14442
14443if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14444 as_basename=basename
14445else
14446 as_basename=false
14447fi
14448
Matthias Kloseb9621712010-04-24 17:59:49 +000014449if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14450 as_dirname=dirname
14451else
14452 as_dirname=false
14453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455as_me=`$as_basename -- "$0" ||
14456$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14457 X"$0" : 'X\(//\)$' \| \
14458 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014459$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460 sed '/^.*\/\([^/][^/]*\)\/*$/{
14461 s//\1/
14462 q
14463 }
14464 /^X\/\(\/\/\)$/{
14465 s//\1/
14466 q
14467 }
14468 /^X\/\(\/\).*/{
14469 s//\1/
14470 q
14471 }
14472 s/.*/./; q'`
14473
Matthias Kloseb9621712010-04-24 17:59:49 +000014474# Avoid depending upon Character Ranges.
14475as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14476as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14477as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14478as_cr_digits='0123456789'
14479as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014480
14481ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014482case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014484 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014486 xy) ECHO_C='\c';;
14487 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14488 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489 esac;;
14490*)
14491 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014492esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014493
Martin v. Löwis11437992002-04-12 09:54:03 +000014494rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495if test -d conf$$.dir; then
14496 rm -f conf$$.dir/conf$$.file
14497else
14498 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014501if (echo >conf$$.file) 2>/dev/null; then
14502 if ln -s conf$$.file conf$$ 2>/dev/null; then
14503 as_ln_s='ln -s'
14504 # ... but there are two gotchas:
14505 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14506 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014507 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014509 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 elif ln conf$$.file conf$$ 2>/dev/null; then
14511 as_ln_s=ln
14512 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014513 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014515else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014516 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000014517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14519rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014520
Matthias Kloseb9621712010-04-24 17:59:49 +000014521
14522# as_fn_mkdir_p
14523# -------------
14524# Create "$as_dir" as a directory, including parents if necessary.
14525as_fn_mkdir_p ()
14526{
14527
14528 case $as_dir in #(
14529 -*) as_dir=./$as_dir;;
14530 esac
14531 test -d "$as_dir" || eval $as_mkdir_p || {
14532 as_dirs=
14533 while :; do
14534 case $as_dir in #(
14535 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14536 *) as_qdir=$as_dir;;
14537 esac
14538 as_dirs="'$as_qdir' $as_dirs"
14539 as_dir=`$as_dirname -- "$as_dir" ||
14540$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14541 X"$as_dir" : 'X\(//\)[^/]' \| \
14542 X"$as_dir" : 'X\(//\)$' \| \
14543 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14544$as_echo X"$as_dir" |
14545 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14546 s//\1/
14547 q
14548 }
14549 /^X\(\/\/\)[^/].*/{
14550 s//\1/
14551 q
14552 }
14553 /^X\(\/\/\)$/{
14554 s//\1/
14555 q
14556 }
14557 /^X\(\/\).*/{
14558 s//\1/
14559 q
14560 }
14561 s/.*/./; q'`
14562 test -d "$as_dir" && break
14563 done
14564 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014565 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014566
14567
14568} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014569if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014571else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014572 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014573 as_mkdir_p=false
14574fi
14575
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014576
14577# as_fn_executable_p FILE
14578# -----------------------
14579# Test if FILE is an executable regular file.
14580as_fn_executable_p ()
14581{
14582 test -f "$1" && test -x "$1"
14583} # as_fn_executable_p
14584as_test_x='test -x'
14585as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014586
14587# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014588as_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 +000014589
14590# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014591as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014592
14593
Martin v. Löwis11437992002-04-12 09:54:03 +000014594exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014595## ----------------------------------- ##
14596## Main body of $CONFIG_STATUS script. ##
14597## ----------------------------------- ##
14598_ASEOF
14599test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014600
Matthias Kloseb9621712010-04-24 17:59:49 +000014601cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14602# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014603# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014604# values after options handling.
14605ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014606This file was extended by python $as_me 3.2, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014607generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014608
14609 CONFIG_FILES = $CONFIG_FILES
14610 CONFIG_HEADERS = $CONFIG_HEADERS
14611 CONFIG_LINKS = $CONFIG_LINKS
14612 CONFIG_COMMANDS = $CONFIG_COMMANDS
14613 $ $0 $@
14614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615on `(hostname || uname -n) 2>/dev/null | sed 1q`
14616"
14617
Martin v. Löwis11437992002-04-12 09:54:03 +000014618_ACEOF
14619
Matthias Kloseb9621712010-04-24 17:59:49 +000014620case $ac_config_files in *"
14621"*) set x $ac_config_files; shift; ac_config_files=$*;;
14622esac
14623
14624case $ac_config_headers in *"
14625"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14626esac
14627
14628
14629cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014630# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014631config_files="$ac_config_files"
14632config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014633
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014634_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014635
Matthias Kloseb9621712010-04-24 17:59:49 +000014636cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014637ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014638\`$as_me' instantiates files and other configuration actions
14639from templates according to the current configuration. Unless the files
14640and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014641
Matthias Kloseb9621712010-04-24 17:59:49 +000014642Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014643
14644 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014645 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014646 --config print configuration, then exit
14647 -q, --quiet, --silent
14648 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014649 -d, --debug don't remove temporary files
14650 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014651 --file=FILE[:TEMPLATE]
14652 instantiate the configuration file FILE
14653 --header=FILE[:TEMPLATE]
14654 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014655
14656Configuration files:
14657$config_files
14658
14659Configuration headers:
14660$config_headers
14661
Matthias Kloseb9621712010-04-24 17:59:49 +000014662Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014665cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14666ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014667ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014668python config.status 3.2
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014669configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000014670 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014671
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014672Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014673This config.status script is free software; the Free Software Foundation
14674gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014675
14676ac_pwd='$ac_pwd'
14677srcdir='$srcdir'
14678INSTALL='$INSTALL'
Trent Nelsona45afca2012-08-30 14:32:02 +000014679MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000014680test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014681_ACEOF
14682
Matthias Kloseb9621712010-04-24 17:59:49 +000014683cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14684# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014685ac_need_defaults=:
14686while test $# != 0
14687do
14688 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014689 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014690 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14691 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014692 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014693 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014694 --*=)
14695 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14696 ac_optarg=
14697 ac_shift=:
14698 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014699 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014700 ac_option=$1
14701 ac_optarg=$2
14702 ac_shift=shift
14703 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014704 esac
14705
Skip Montanaro6dead952003-09-25 14:50:04 +000014706 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014707 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014708 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14709 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014710 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014711 $as_echo "$ac_cs_version"; exit ;;
14712 --config | --confi | --conf | --con | --co | --c )
14713 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014714 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014715 debug=: ;;
14716 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014717 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 case $ac_optarg in
14719 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014720 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 esac
14722 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014723 ac_need_defaults=false;;
14724 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014725 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 case $ac_optarg in
14727 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14728 esac
14729 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014730 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014731 --he | --h)
14732 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014733 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014734Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014737 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14738 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14739 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014740
14741 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014742 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014743Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014744
Matthias Kloseb9621712010-04-24 17:59:49 +000014745 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014746 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014747
14748 esac
14749 shift
14750done
14751
Skip Montanaro6dead952003-09-25 14:50:04 +000014752ac_configure_extra_args=
14753
14754if $ac_cs_silent; then
14755 exec 6>/dev/null
14756 ac_configure_extra_args="$ac_configure_extra_args --silent"
14757fi
14758
14759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014760cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014761if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014762 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000014763 shift
14764 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14765 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014766 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014767 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014768fi
14769
Martin v. Löwis11437992002-04-12 09:54:03 +000014770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014771cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014772exec 5>>config.log
14773{
14774 echo
14775 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14776## Running $as_me. ##
14777_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014778 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014779} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014782cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014784
Matthias Kloseb9621712010-04-24 17:59:49 +000014785cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786
14787# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014788for ac_config_target in $ac_config_targets
14789do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790 case $ac_config_target in
14791 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14792 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14793 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014794 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14795 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14797 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014798 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014799 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014800
Gregory P. Smith69140482012-01-16 02:05:55 -080014801 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014802 esac
14803done
14804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014805
Martin v. Löwis11437992002-04-12 09:54:03 +000014806# If the user did not use the arguments to specify the items to instantiate,
14807# then the envvar interface is used. Set only those that are not.
14808# We use the long form for the default assignment because of an extremely
14809# bizarre bug on SunOS 4.1.3.
14810if $ac_need_defaults; then
14811 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14812 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14813fi
14814
Skip Montanaro6dead952003-09-25 14:50:04 +000014815# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014816# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014817# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014818# Hook for its removal unless debugging.
14819# Note that there is a small window in which the directory will not be cleaned:
14820# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014821$debug ||
14822{
Gregory P. Smith69140482012-01-16 02:05:55 -080014823 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014824 trap 'exit_status=$?
Gregory P. Smith69140482012-01-16 02:05:55 -080014825 : "${ac_tmp:=$tmp}"
14826 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014828 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014829}
Martin v. Löwis11437992002-04-12 09:54:03 +000014830# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014831
Martin v. Löwis11437992002-04-12 09:54:03 +000014832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Gregory P. Smith69140482012-01-16 02:05:55 -080014834 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014835} ||
14836{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837 tmp=./conf$$-$RANDOM
14838 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014839} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080014840ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014841
Matthias Kloseb9621712010-04-24 17:59:49 +000014842# Set up the scripts for CONFIG_FILES section.
14843# No need to generate them if there are no CONFIG_FILES.
14844# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014845if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014846
Matthias Kloseb9621712010-04-24 17:59:49 +000014847
14848ac_cr=`echo X | tr X '\015'`
14849# On cygwin, bash can eat \r inside `` if the user requested igncr.
14850# But we know of no other shell where ac_cr would be empty at this
14851# point, so we can use a bashism as a fallback.
14852if test "x$ac_cr" = x; then
14853 eval ac_cr=\$\'\\r\'
14854fi
14855ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14856if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014857 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014858else
14859 ac_cs_awk_cr=$ac_cr
14860fi
14861
Gregory P. Smith69140482012-01-16 02:05:55 -080014862echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014863_ACEOF
14864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014865
Matthias Kloseb9621712010-04-24 17:59:49 +000014866{
14867 echo "cat >conf$$subs.awk <<_ACEOF" &&
14868 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14869 echo "_ACEOF"
14870} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014871 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14872ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873ac_delim='%!_!# '
14874for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 . ./conf$$subs.sh ||
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
Matthias Kloseb9621712010-04-24 17:59:49 +000014878 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14879 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014880 break
14881 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014882 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883 else
14884 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014885 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886done
Matthias Kloseb9621712010-04-24 17:59:49 +000014887rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014888
Matthias Kloseb9621712010-04-24 17:59:49 +000014889cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Gregory P. Smith69140482012-01-16 02:05:55 -080014890cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014892sed -n '
14893h
14894s/^/S["/; s/!.*/"]=/
14895p
14896g
14897s/^[^!]*!//
14898:repl
14899t repl
14900s/'"$ac_delim"'$//
14901t delim
14902:nl
14903h
14904s/\(.\{148\}\)..*/\1/
14905t more1
14906s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14907p
14908n
14909b repl
14910:more1
14911s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14912p
14913g
14914s/.\{148\}//
14915t nl
14916:delim
14917h
14918s/\(.\{148\}\)..*/\1/
14919t more2
14920s/["\\]/\\&/g; s/^/"/; s/$/"/
14921p
14922b
14923:more2
14924s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14925p
14926g
14927s/.\{148\}//
14928t delim
14929' <conf$$subs.awk | sed '
14930/^[^""]/{
14931 N
14932 s/\n//
14933}
14934' >>$CONFIG_STATUS || ac_write_fail=1
14935rm -f conf$$subs.awk
14936cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14937_ACAWK
Gregory P. Smith69140482012-01-16 02:05:55 -080014938cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 for (key in S) S_is_set[key] = 1
14940 FS = ""
14941
14942}
14943{
14944 line = $ 0
14945 nfields = split(line, field, "@")
14946 substed = 0
14947 len = length(field[1])
14948 for (i = 2; i < nfields; i++) {
14949 key = field[i]
14950 keylen = length(key)
14951 if (S_is_set[key]) {
14952 value = S[key]
14953 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14954 len += length(value) + length(field[++i])
14955 substed = 1
14956 } else
14957 len += 1 + keylen
14958 }
14959
14960 print line
14961}
14962
14963_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014965cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14966if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14967 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14968else
14969 cat
Gregory P. Smith69140482012-01-16 02:05:55 -080014970fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014971 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014972_ACEOF
14973
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014974# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14975# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976# trailing colons and then remove the whole line if VPATH becomes empty
14977# (actually we leave an empty line to preserve line numbers).
14978if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014979 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14980h
14981s///
14982s/^/:/
14983s/[ ]*$/:/
14984s/:\$(srcdir):/:/g
14985s/:\${srcdir}:/:/g
14986s/:@srcdir@:/:/g
14987s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014988s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014989x
14990s/\(=[ ]*\).*/\1/
14991G
14992s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993s/^[^=]*=[ ]*$//
14994}'
14995fi
14996
Matthias Kloseb9621712010-04-24 17:59:49 +000014997cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014998fi # test -n "$CONFIG_FILES"
14999
Matthias Kloseb9621712010-04-24 17:59:49 +000015000# Set up the scripts for CONFIG_HEADERS section.
15001# No need to generate them if there are no CONFIG_HEADERS.
15002# This happens for instance with `./config.status Makefile'.
15003if test -n "$CONFIG_HEADERS"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080015004cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015005BEGIN {
15006_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007
Matthias Kloseb9621712010-04-24 17:59:49 +000015008# Transform confdefs.h into an awk script `defines.awk', embedded as
15009# here-document in config.status, that substitutes the proper values into
15010# config.h.in to produce config.h.
15011
15012# Create a delimiter string that does not exist in confdefs.h, to ease
15013# handling of long lines.
15014ac_delim='%!_!# '
15015for ac_last_try in false false :; do
Gregory P. Smith69140482012-01-16 02:05:55 -080015016 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15017 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015018 break
15019 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015020 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015021 else
15022 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15023 fi
15024done
15025
15026# For the awk script, D is an array of macro values keyed by name,
15027# likewise P contains macro parameters if any. Preserve backslash
15028# newline sequences.
15029
15030ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15031sed -n '
15032s/.\{148\}/&'"$ac_delim"'/g
15033t rset
15034:rset
15035s/^[ ]*#[ ]*define[ ][ ]*/ /
15036t def
15037d
15038:def
15039s/\\$//
15040t bsnl
15041s/["\\]/\\&/g
15042s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15043D["\1"]=" \3"/p
15044s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15045d
15046:bsnl
15047s/["\\]/\\&/g
15048s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15049D["\1"]=" \3\\\\\\n"\\/p
15050t cont
15051s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15052t cont
15053d
15054:cont
15055n
15056s/.\{148\}/&'"$ac_delim"'/g
15057t clear
15058:clear
15059s/\\$//
15060t bsnlc
15061s/["\\]/\\&/g; s/^/"/; s/$/"/p
15062d
15063:bsnlc
15064s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15065b cont
15066' <confdefs.h | sed '
15067s/'"$ac_delim"'/"\\\
15068"/g' >>$CONFIG_STATUS || ac_write_fail=1
15069
15070cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15071 for (key in D) D_is_set[key] = 1
15072 FS = ""
15073}
15074/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15075 line = \$ 0
15076 split(line, arg, " ")
15077 if (arg[1] == "#") {
15078 defundef = arg[2]
15079 mac1 = arg[3]
15080 } else {
15081 defundef = substr(arg[1], 2)
15082 mac1 = arg[2]
15083 }
15084 split(mac1, mac2, "(") #)
15085 macro = mac2[1]
15086 prefix = substr(line, 1, index(line, defundef) - 1)
15087 if (D_is_set[macro]) {
15088 # Preserve the white space surrounding the "#".
15089 print prefix "define", macro P[macro] D[macro]
15090 next
15091 } else {
15092 # Replace #undef with comments. This is necessary, for example,
15093 # in the case of _POSIX_SOURCE, which is predefined and required
15094 # on some systems where configure will not decide to define it.
15095 if (defundef == "undef") {
15096 print "/*", prefix defundef, macro, "*/"
15097 next
15098 }
15099 }
15100}
15101{ print }
15102_ACAWK
15103_ACEOF
15104cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015105 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015106fi # test -n "$CONFIG_HEADERS"
15107
15108
15109eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15110shift
15111for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112do
15113 case $ac_tag in
15114 :[FHLC]) ac_mode=$ac_tag; continue;;
15115 esac
15116 case $ac_mode$ac_tag in
15117 :[FHL]*:*);;
Gregory P. Smith69140482012-01-16 02:05:55 -080015118 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119 :[FH]-) ac_tag=-:-;;
15120 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15121 esac
15122 ac_save_IFS=$IFS
15123 IFS=:
15124 set x $ac_tag
15125 IFS=$ac_save_IFS
15126 shift
15127 ac_file=$1
15128 shift
15129
15130 case $ac_mode in
15131 :L) ac_source=$1;;
15132 :[FH])
15133 ac_file_inputs=
15134 for ac_f
15135 do
15136 case $ac_f in
Gregory P. Smith69140482012-01-16 02:05:55 -080015137 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138 *) # Look for the file first in the build tree, then in the source tree
15139 # (if the path is not absolute). The absolute path cannot be DOS-style,
15140 # because $ac_f cannot contain `:'.
15141 test -f "$ac_f" ||
15142 case $ac_f in
15143 [\\/$]*) false;;
15144 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15145 esac ||
Gregory P. Smith69140482012-01-16 02:05:55 -080015146 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015148 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15149 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150 done
15151
15152 # Let's still pretend it is `configure' which instantiates (i.e., don't
15153 # use $as_me), people would be surprised to read:
15154 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015155 configure_input='Generated from '`
15156 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15157 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015158 if test x"$ac_file" != x-; then
15159 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015160 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15161$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 # Neutralize special characters interpreted by sed in replacement strings.
15164 case $configure_input in #(
15165 *\&* | *\|* | *\\* )
15166 ac_sed_conf_input=`$as_echo "$configure_input" |
15167 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15168 *) ac_sed_conf_input=$configure_input;;
15169 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170
15171 case $ac_tag in
Gregory P. Smith69140482012-01-16 02:05:55 -080015172 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15173 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174 esac
15175 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 esac
15177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015179$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015180 X"$ac_file" : 'X\(//\)[^/]' \| \
15181 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015183$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015184 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15185 s//\1/
15186 q
15187 }
15188 /^X\(\/\/\)[^/].*/{
15189 s//\1/
15190 q
15191 }
15192 /^X\(\/\/\)$/{
15193 s//\1/
15194 q
15195 }
15196 /^X\(\/\).*/{
15197 s//\1/
15198 q
15199 }
15200 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 ac_builddir=.
15203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204case "$ac_dir" in
15205.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15206*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015207 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015209 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015210 case $ac_top_builddir_sub in
15211 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15212 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15213 esac ;;
15214esac
15215ac_abs_top_builddir=$ac_pwd
15216ac_abs_builddir=$ac_pwd$ac_dir_suffix
15217# for backward compatibility:
15218ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015219
15220case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015223 ac_top_srcdir=$ac_top_builddir_sub
15224 ac_abs_top_srcdir=$ac_pwd ;;
15225 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227 ac_top_srcdir=$srcdir
15228 ac_abs_top_srcdir=$srcdir ;;
15229 *) # Relative name.
15230 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15231 ac_top_srcdir=$ac_top_build_prefix$srcdir
15232 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015233esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015234ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015235
Martin v. Löwis11437992002-04-12 09:54:03 +000015236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015237 case $ac_mode in
15238 :F)
15239 #
15240 # CONFIG_FILE
15241 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015242
15243 case $INSTALL in
15244 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 esac
Trent Nelsona45afca2012-08-30 14:32:02 +000015247 ac_MKDIR_P=$MKDIR_P
15248 case $MKDIR_P in
15249 [\\/$]* | ?:[\\/]* ) ;;
15250 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15251 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015252_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253
Matthias Kloseb9621712010-04-24 17:59:49 +000015254cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015255# If the template does not know about datarootdir, expand it.
15256# FIXME: This hack should be removed a few years after 2.60.
15257ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015258ac_sed_dataroot='
15259/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015260 p
15261 q
15262}
15263/@datadir@/p
15264/@docdir@/p
15265/@infodir@/p
15266/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015267/@mandir@/p'
15268case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269*datarootdir*) ac_datarootdir_seen=yes;;
15270*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015271 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15272$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015274cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015275 ac_datarootdir_hack='
15276 s&@datadir@&$datadir&g
15277 s&@docdir@&$docdir&g
15278 s&@infodir@&$infodir&g
15279 s&@localedir@&$localedir&g
15280 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015281 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282esac
15283_ACEOF
15284
15285# Neutralize VPATH when `$srcdir' = `.'.
15286# Shell code in configure.ac might set extrasub.
15287# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015288cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15289ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015290$extrasub
15291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015292cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015293:t
15294/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015295s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015297s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015298s&@srcdir@&$ac_srcdir&;t t
15299s&@abs_srcdir@&$ac_abs_srcdir&;t t
15300s&@top_srcdir@&$ac_top_srcdir&;t t
15301s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15302s&@builddir@&$ac_builddir&;t t
15303s&@abs_builddir@&$ac_abs_builddir&;t t
15304s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15305s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsona45afca2012-08-30 14:32:02 +000015306s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015308"
Gregory P. Smith69140482012-01-16 02:05:55 -080015309eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15310 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015311
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015312test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Gregory P. Smith69140482012-01-16 02:05:55 -080015313 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15314 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15315 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015316 { $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 +000015317which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015318$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015319which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015320
Gregory P. Smith69140482012-01-16 02:05:55 -080015321 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015322 case $ac_file in
Gregory P. Smith69140482012-01-16 02:05:55 -080015323 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15324 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015326 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015327 ;;
15328 :H)
15329 #
15330 # CONFIG_HEADER
15331 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015332 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015333 {
15334 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015335 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15336 } >"$ac_tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015337 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080015338 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015339 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15340$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015341 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015342 rm -f "$ac_file"
Gregory P. Smith69140482012-01-16 02:05:55 -080015343 mv "$ac_tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015344 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015345 fi
15346 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015347 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015348 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015349 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015350 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353
15354 esac
15355
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015356
15357 case $ac_file$ac_mode in
15358 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15359
15360 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015361done # for ac_tag
15362
Guido van Rossum627b2d71993-12-24 10:39:16 +000015363
Matthias Kloseb9621712010-04-24 17:59:49 +000015364as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015365_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015366ac_clean_files=$ac_clean_files_save
15367
Matthias Kloseb9621712010-04-24 17:59:49 +000015368test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015369 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015370
Martin v. Löwis11437992002-04-12 09:54:03 +000015371
15372# configure is writing to config.log, and then calls config.status.
15373# config.status does its own redirection, appending to config.log.
15374# Unfortunately, on DOS this fails, as config.log is still kept open
15375# by configure, so config.status won't be able to write to it; its
15376# output is simply discarded. So we exec the FD to /dev/null,
15377# effectively closing config.log, so it can be properly (re)opened and
15378# appended to by config.status. When coming back to configure, we
15379# need to make the FD available again.
15380if test "$no_create" != yes; then
15381 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015382 ac_config_status_args=
15383 test "$silent" = yes &&
15384 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015385 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015386 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015387 exec 5>>config.log
15388 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15389 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015390 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015391fi
15392if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15393 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15394$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015395fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015396
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015397
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015398echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015399if test ! -f Modules/Setup
15400then
15401 cp $srcdir/Modules/Setup.dist Modules/Setup
15402fi
15403
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015404echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015405if test ! -f Modules/Setup.local
15406then
15407 echo "# Edit this file for local setup changes" >Modules/Setup.local
15408fi
15409
15410echo "creating Makefile"
15411$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15412 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015413 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015414mv config.c Modules