blob: 010de8f15c1dd837a586345e7aa72a5759afc11b [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
Matthias Kloseb9621712010-04-24 17:59:49 +00006758ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6759case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006760 no|yes) ;; #(
6761 *)
6762
Matthias Kloseb9621712010-04-24 17:59:49 +00006763$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006764
6765
6766cat >>confdefs.h <<_ACEOF
6767#define uint32_t $ac_cv_c_uint32_t
6768_ACEOF
6769;;
6770 esac
6771
Matthias Kloseb9621712010-04-24 17:59:49 +00006772ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6773case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006774 no|yes) ;; #(
6775 *)
6776
Matthias Kloseb9621712010-04-24 17:59:49 +00006777$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006778
6779
6780cat >>confdefs.h <<_ACEOF
6781#define uint64_t $ac_cv_c_uint64_t
6782_ACEOF
6783;;
6784 esac
6785
Matthias Kloseb9621712010-04-24 17:59:49 +00006786ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6787case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006788 no|yes) ;; #(
6789 *)
6790
6791cat >>confdefs.h <<_ACEOF
6792#define int32_t $ac_cv_c_int32_t
6793_ACEOF
6794;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006795esac
6796
Matthias Kloseb9621712010-04-24 17:59:49 +00006797ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6798case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006799 no|yes) ;; #(
6800 *)
6801
6802cat >>confdefs.h <<_ACEOF
6803#define int64_t $ac_cv_c_int64_t
6804_ACEOF
6805;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006806esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006807
Matthias Kloseb9621712010-04-24 17:59:49 +00006808ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006809if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006810
Matthias Kloseb9621712010-04-24 17:59:49 +00006811$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006812
6813fi
6814
Jack Jansendd19cf82001-12-06 22:36:17 +00006815
Michael W. Hudson54241132001-12-07 15:38:26 +00006816# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006817# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006818# The cast to long int works around a bug in the HP C Compiler
6819# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6820# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6821# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6823$as_echo_n "checking size of int... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006824if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006826else
Matthias Kloseb9621712010-04-24 17:59:49 +00006827 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 +00006828
Martin v. Löwis11437992002-04-12 09:54:03 +00006829else
Matthias Kloseb9621712010-04-24 17:59:49 +00006830 if test "$ac_cv_type_int" = yes; then
6831 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006833as_fn_error 77 "cannot compute sizeof (int)
Gregory P. Smith69140482012-01-16 02:05:55 -08006834See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006835 else
6836 ac_cv_sizeof_int=0
6837 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006839
Martin v. Löwis11437992002-04-12 09:54:03 +00006840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6842$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006843
6844
6845
Martin v. Löwis11437992002-04-12 09:54:03 +00006846cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006847#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006848_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006849
6850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006851# The cast to long int works around a bug in the HP C Compiler
6852# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6853# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6854# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6856$as_echo_n "checking size of long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006857if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006858 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006859else
Matthias Kloseb9621712010-04-24 17:59:49 +00006860 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 +00006861
Martin v. Löwis11437992002-04-12 09:54:03 +00006862else
Matthias Kloseb9621712010-04-24 17:59:49 +00006863 if test "$ac_cv_type_long" = yes; then
6864 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6865$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006866as_fn_error 77 "cannot compute sizeof (long)
Gregory P. Smith69140482012-01-16 02:05:55 -08006867See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006868 else
6869 ac_cv_sizeof_long=0
6870 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006872
Martin v. Löwis11437992002-04-12 09:54:03 +00006873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6875$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006876
6877
6878
Martin v. Löwis11437992002-04-12 09:54:03 +00006879cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006880#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006881_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006882
6883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006884# The cast to long int works around a bug in the HP C Compiler
6885# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6886# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6887# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6889$as_echo_n "checking size of void *... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006890if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006891 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006892else
Matthias Kloseb9621712010-04-24 17:59:49 +00006893 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 +00006894
Martin v. Löwis11437992002-04-12 09:54:03 +00006895else
Matthias Kloseb9621712010-04-24 17:59:49 +00006896 if test "$ac_cv_type_void_p" = yes; then
6897 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6898$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006899as_fn_error 77 "cannot compute sizeof (void *)
Gregory P. Smith69140482012-01-16 02:05:55 -08006900See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006901 else
6902 ac_cv_sizeof_void_p=0
6903 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006905
Martin v. Löwis11437992002-04-12 09:54:03 +00006906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6908$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006909
6910
6911
Martin v. Löwis11437992002-04-12 09:54:03 +00006912cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006913#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006914_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006915
6916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006917# The cast to long int works around a bug in the HP C Compiler
6918# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6919# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6920# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6922$as_echo_n "checking size of short... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006923if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006924 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006925else
Matthias Kloseb9621712010-04-24 17:59:49 +00006926 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 +00006927
Martin v. Löwis11437992002-04-12 09:54:03 +00006928else
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 if test "$ac_cv_type_short" = yes; then
6930 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6931$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006932as_fn_error 77 "cannot compute sizeof (short)
Gregory P. Smith69140482012-01-16 02:05:55 -08006933See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006934 else
6935 ac_cv_sizeof_short=0
6936 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006938
Martin v. Löwis11437992002-04-12 09:54:03 +00006939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6941$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006942
6943
6944
Martin v. Löwis11437992002-04-12 09:54:03 +00006945cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006946#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006947_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006948
6949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006950# The cast to long int works around a bug in the HP C Compiler
6951# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6952# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6953# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6955$as_echo_n "checking size of float... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006956if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006957 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006958else
Matthias Kloseb9621712010-04-24 17:59:49 +00006959 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 +00006960
Martin v. Löwis11437992002-04-12 09:54:03 +00006961else
Matthias Kloseb9621712010-04-24 17:59:49 +00006962 if test "$ac_cv_type_float" = yes; then
6963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006965as_fn_error 77 "cannot compute sizeof (float)
Gregory P. Smith69140482012-01-16 02:05:55 -08006966See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006967 else
6968 ac_cv_sizeof_float=0
6969 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006971
Martin v. Löwis11437992002-04-12 09:54:03 +00006972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6974$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006975
6976
6977
Martin v. Löwis11437992002-04-12 09:54:03 +00006978cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006979#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006980_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006981
6982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006983# The cast to long int works around a bug in the HP C Compiler
6984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6986# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6988$as_echo_n "checking size of double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006989if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006991else
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 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 +00006993
Martin v. Löwis11437992002-04-12 09:54:03 +00006994else
Matthias Kloseb9621712010-04-24 17:59:49 +00006995 if test "$ac_cv_type_double" = yes; then
6996 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006998as_fn_error 77 "cannot compute sizeof (double)
Gregory P. Smith69140482012-01-16 02:05:55 -08006999See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007000 else
7001 ac_cv_sizeof_double=0
7002 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007004
Martin v. Löwis11437992002-04-12 09:54:03 +00007005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7007$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007008
7009
7010
Martin v. Löwis11437992002-04-12 09:54:03 +00007011cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007012#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007013_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007014
7015
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007016# The cast to long int works around a bug in the HP C Compiler
7017# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7018# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7019# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7021$as_echo_n "checking size of fpos_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007022if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007024else
Matthias Kloseb9621712010-04-24 17:59:49 +00007025 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 +00007026
Martin v. Löwis11437992002-04-12 09:54:03 +00007027else
Matthias Kloseb9621712010-04-24 17:59:49 +00007028 if test "$ac_cv_type_fpos_t" = yes; then
7029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007031as_fn_error 77 "cannot compute sizeof (fpos_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007032See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007033 else
7034 ac_cv_sizeof_fpos_t=0
7035 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007037
Martin v. Löwis11437992002-04-12 09:54:03 +00007038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7040$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007041
7042
7043
Martin v. Löwis11437992002-04-12 09:54:03 +00007044cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007045#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007046_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007047
Michael W. Hudson54241132001-12-07 15:38:26 +00007048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007049# The cast to long int works around a bug in the HP C Compiler
7050# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7051# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7052# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7054$as_echo_n "checking size of size_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007055if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007056 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007057else
Matthias Kloseb9621712010-04-24 17:59:49 +00007058 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 +00007059
Martin v. Löwis18e16552006-02-15 17:27:45 +00007060else
Matthias Kloseb9621712010-04-24 17:59:49 +00007061 if test "$ac_cv_type_size_t" = yes; then
7062 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7063$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007064as_fn_error 77 "cannot compute sizeof (size_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007065See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066 else
7067 ac_cv_sizeof_size_t=0
7068 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007070
Martin v. Löwis18e16552006-02-15 17:27:45 +00007071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7073$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007074
7075
7076
Martin v. Löwis18e16552006-02-15 17:27:45 +00007077cat >>confdefs.h <<_ACEOF
7078#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7079_ACEOF
7080
7081
Christian Heimes400adb02008-02-01 08:12:03 +00007082# The cast to long int works around a bug in the HP C Compiler
7083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7085# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7087$as_echo_n "checking size of pid_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007088if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007089 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007090else
Matthias Kloseb9621712010-04-24 17:59:49 +00007091 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 +00007092
Christian Heimes400adb02008-02-01 08:12:03 +00007093else
Matthias Kloseb9621712010-04-24 17:59:49 +00007094 if test "$ac_cv_type_pid_t" = yes; then
7095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007097as_fn_error 77 "cannot compute sizeof (pid_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007098See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007099 else
7100 ac_cv_sizeof_pid_t=0
7101 fi
7102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007103
Christian Heimes400adb02008-02-01 08:12:03 +00007104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7106$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007107
7108
7109
7110cat >>confdefs.h <<_ACEOF
7111#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7112_ACEOF
7113
7114
Michael W. Hudson54241132001-12-07 15:38:26 +00007115
Matthias Kloseb9621712010-04-24 17:59:49 +00007116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7117$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007118have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007120/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007121
Martin v. Löwis11437992002-04-12 09:54:03 +00007122int
7123main ()
7124{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007125long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007126 ;
7127 return 0;
7128}
7129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007130if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007131
7132
Matthias Kloseb9621712010-04-24 17:59:49 +00007133$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007134
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007135 have_long_long=yes
7136
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7140$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007141if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007142# The cast to long int works around a bug in the HP C Compiler
7143# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7144# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7145# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7147$as_echo_n "checking size of long long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007148if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007149 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007150else
Matthias Kloseb9621712010-04-24 17:59:49 +00007151 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 +00007152
Martin v. Löwis11437992002-04-12 09:54:03 +00007153else
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 if test "$ac_cv_type_long_long" = yes; then
7155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7156$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007157as_fn_error 77 "cannot compute sizeof (long long)
Gregory P. Smith69140482012-01-16 02:05:55 -08007158See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007159 else
7160 ac_cv_sizeof_long_long=0
7161 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007163
Martin v. Löwis11437992002-04-12 09:54:03 +00007164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7166$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007167
7168
7169
Martin v. Löwis11437992002-04-12 09:54:03 +00007170cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007171#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007172_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007173
Michael W. Hudson54241132001-12-07 15:38:26 +00007174
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007175fi
7176
Matthias Kloseb9621712010-04-24 17:59:49 +00007177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7178$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007179have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007181/* end confdefs.h. */
7182
7183int
7184main ()
7185{
7186long double x; x = (long double)0;
7187 ;
7188 return 0;
7189}
7190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007191if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007192
7193
Matthias Kloseb9621712010-04-24 17:59:49 +00007194$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007195
7196 have_long_double=yes
7197
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007198fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7201$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007202if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007203# The cast to long int works around a bug in the HP C Compiler
7204# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7205# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7206# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7208$as_echo_n "checking size of long double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007209if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007210 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007211else
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 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 +00007213
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007214else
Matthias Kloseb9621712010-04-24 17:59:49 +00007215 if test "$ac_cv_type_long_double" = yes; then
7216 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7217$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007218as_fn_error 77 "cannot compute sizeof (long double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007219See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007220 else
7221 ac_cv_sizeof_long_double=0
7222 fi
7223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007224
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7227$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007228
7229
7230
7231cat >>confdefs.h <<_ACEOF
7232#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7233_ACEOF
7234
7235
7236fi
7237
7238
Matthias Kloseb9621712010-04-24 17:59:49 +00007239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7240$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007241have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007243/* end confdefs.h. */
7244
7245int
7246main ()
7247{
7248_Bool x; x = (_Bool)0;
7249 ;
7250 return 0;
7251}
7252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007253if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007254
7255
Matthias Kloseb9621712010-04-24 17:59:49 +00007256$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007257
7258 have_c99_bool=yes
7259
Thomas Woutersb2137042007-02-01 18:02:27 +00007260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7263$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007264if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007265# The cast to long int works around a bug in the HP C Compiler
7266# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7267# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7268# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7270$as_echo_n "checking size of _Bool... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007271if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007272 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007273else
Matthias Kloseb9621712010-04-24 17:59:49 +00007274 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 +00007275
Thomas Woutersb2137042007-02-01 18:02:27 +00007276else
Matthias Kloseb9621712010-04-24 17:59:49 +00007277 if test "$ac_cv_type__Bool" = yes; then
7278 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7279$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007280as_fn_error 77 "cannot compute sizeof (_Bool)
Gregory P. Smith69140482012-01-16 02:05:55 -08007281See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007282 else
7283 ac_cv_sizeof__Bool=0
7284 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007286
Thomas Woutersb2137042007-02-01 18:02:27 +00007287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7289$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007290
7291
7292
Thomas Woutersb2137042007-02-01 18:02:27 +00007293cat >>confdefs.h <<_ACEOF
7294#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7295_ACEOF
7296
7297
7298fi
7299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007301 #include <stdint.h>
7302 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007303 #ifdef HAVE_INTTYPES_H
7304 #include <inttypes.h>
7305 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007306"
Gregory P. Smith69140482012-01-16 02:05:55 -08007307if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007308
7309cat >>confdefs.h <<_ACEOF
7310#define HAVE_UINTPTR_T 1
7311_ACEOF
7312
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007313# The cast to long int works around a bug in the HP C Compiler
7314# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7315# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7316# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7318$as_echo_n "checking size of uintptr_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007319if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007320 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007321else
Matthias Kloseb9621712010-04-24 17:59:49 +00007322 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 +00007323
Martin v. Löwis11437992002-04-12 09:54:03 +00007324else
Matthias Kloseb9621712010-04-24 17:59:49 +00007325 if test "$ac_cv_type_uintptr_t" = yes; then
7326 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007328as_fn_error 77 "cannot compute sizeof (uintptr_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007329See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007330 else
7331 ac_cv_sizeof_uintptr_t=0
7332 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007334
Martin v. Löwis11437992002-04-12 09:54:03 +00007335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7337$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007338
7339
7340
Martin v. Löwis11437992002-04-12 09:54:03 +00007341cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007342#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007343_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007344
Michael W. Hudson54241132001-12-07 15:38:26 +00007345
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007346fi
7347
Thomas Wouters89f507f2006-12-13 04:49:30 +00007348
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007349# The cast to long int works around a bug in the HP C Compiler
7350# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7351# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7352# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7354$as_echo_n "checking size of off_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007355if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007356 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007357else
Matthias Kloseb9621712010-04-24 17:59:49 +00007358 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007359#ifdef HAVE_SYS_TYPES_H
7360#include <sys/types.h>
7361#endif
7362
Matthias Kloseb9621712010-04-24 17:59:49 +00007363"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007364
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007365else
Matthias Kloseb9621712010-04-24 17:59:49 +00007366 if test "$ac_cv_type_off_t" = yes; then
7367 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7368$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007369as_fn_error 77 "cannot compute sizeof (off_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007370See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007371 else
7372 ac_cv_sizeof_off_t=0
7373 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007375
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7378$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007379
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007380
7381
Martin v. Löwis11437992002-04-12 09:54:03 +00007382cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007383#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007384_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007385
Michael W. Hudson54241132001-12-07 15:38:26 +00007386
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007387
Matthias Kloseb9621712010-04-24 17:59:49 +00007388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7389$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007390if test "$have_long_long" = yes
7391then
7392if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007393 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007394
Matthias Kloseb9621712010-04-24 17:59:49 +00007395$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007396
Matthias Kloseb9621712010-04-24 17:59:49 +00007397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7398$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007399else
Matthias Kloseb9621712010-04-24 17:59:49 +00007400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7401$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007402fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007403else
Matthias Kloseb9621712010-04-24 17:59:49 +00007404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7405$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007406fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007407
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007408# The cast to long int works around a bug in the HP C Compiler
7409# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7410# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7411# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7413$as_echo_n "checking size of time_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007414if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007415 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007416else
Matthias Kloseb9621712010-04-24 17:59:49 +00007417 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007418#ifdef HAVE_SYS_TYPES_H
7419#include <sys/types.h>
7420#endif
7421#ifdef HAVE_TIME_H
7422#include <time.h>
7423#endif
7424
Matthias Kloseb9621712010-04-24 17:59:49 +00007425"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007426
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007427else
Matthias Kloseb9621712010-04-24 17:59:49 +00007428 if test "$ac_cv_type_time_t" = yes; then
7429 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007431as_fn_error 77 "cannot compute sizeof (time_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007432See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007433 else
7434 ac_cv_sizeof_time_t=0
7435 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007437
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7440$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007441
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007442
7443
Martin v. Löwis11437992002-04-12 09:54:03 +00007444cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007445#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007446_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007447
Michael W. Hudson54241132001-12-07 15:38:26 +00007448
7449
Trent Mick635f6fb2000-08-23 21:33:05 +00007450# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007451ac_save_cc="$CC"
7452if test "$ac_cv_kpthread" = "yes"
7453then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007454elif test "$ac_cv_kthread" = "yes"
7455then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007456elif test "$ac_cv_pthread" = "yes"
7457then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007458fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007459
Matthias Kloseb9621712010-04-24 17:59:49 +00007460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7461$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007462have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007464/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007465
7466 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007467int
7468main ()
7469{
Guido van Rossum12580492000-09-24 16:47:19 +00007470pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007471 ;
7472 return 0;
7473}
Matthias Kloseb159a552010-04-25 21:00:44 +00007474
Martin v. Löwis11437992002-04-12 09:54:03 +00007475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007476if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007477 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7481$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007482if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007483 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007484# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7485# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7486# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7488$as_echo_n "checking size of pthread_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007489if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007490 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007491else
Matthias Kloseb9621712010-04-24 17:59:49 +00007492 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007493#ifdef HAVE_PTHREAD_H
7494#include <pthread.h>
7495#endif
7496
Matthias Kloseb9621712010-04-24 17:59:49 +00007497"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007498
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007499else
Matthias Kloseb9621712010-04-24 17:59:49 +00007500 if test "$ac_cv_type_pthread_t" = yes; then
7501 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7502$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007503as_fn_error 77 "cannot compute sizeof (pthread_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007504See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007505 else
7506 ac_cv_sizeof_pthread_t=0
7507 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007509
Trent Mick635f6fb2000-08-23 21:33:05 +00007510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7512$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007513
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007514
7515
Martin v. Löwis11437992002-04-12 09:54:03 +00007516cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007517#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007518_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007519
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007520
Trent Mick635f6fb2000-08-23 21:33:05 +00007521fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007522CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007523
Michael W. Hudson54241132001-12-07 15:38:26 +00007524
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007525case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007526 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007527 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7528 ;;
7529 Darwin/*)
7530 OTHER_LIBTOOL_OPT=""
7531 ;;
7532esac
7533
7534
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007535ARCH_RUN_32BIT=""
7536
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007537case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007538 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007539 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7540 if test "${enable_universalsdk}"; then
7541 :
7542 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007543 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007544 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007545 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007546 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007547 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007548 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007549 if test ${gcc_version} '<' 4.0
7550 then
7551 LIBTOOL_CRUFT="-lcc_dynamic"
7552 else
7553 LIBTOOL_CRUFT=""
7554 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007555 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007556 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007557else
Matthias Kloseb9621712010-04-24 17:59:49 +00007558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007559/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007560
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007561 #include <unistd.h>
7562 int main(int argc, char*argv[])
7563 {
7564 if (sizeof(long) == 4) {
7565 return 0;
7566 } else {
7567 return 1;
7568 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007569 }
7570
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007572if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007573 ac_osx_32bit=yes
7574else
Matthias Kloseb9621712010-04-24 17:59:49 +00007575 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7578 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007579fi
7580
7581
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007582 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007583 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007584 i386)
7585 MACOSX_DEFAULT_ARCH="i386"
7586 ;;
7587 ppc)
7588 MACOSX_DEFAULT_ARCH="ppc"
7589 ;;
7590 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007591 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007592 ;;
7593 esac
7594 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007595 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007596 i386)
7597 MACOSX_DEFAULT_ARCH="x86_64"
7598 ;;
7599 ppc)
7600 MACOSX_DEFAULT_ARCH="ppc64"
7601 ;;
7602 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007603 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007604 ;;
7605 esac
7606
7607 #ARCH_RUN_32BIT="true"
7608 fi
7609
7610 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007611 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007612 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007613esac
7614
Matthias Kloseb9621712010-04-24 17:59:49 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7616$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007617if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007618then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007619 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007620 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007621 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007622
Matthias Kloseb9621712010-04-24 17:59:49 +00007623$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007624
Matthias Kloseb9621712010-04-24 17:59:49 +00007625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7626$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007627 if test $enable_shared = "yes"
7628 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007629 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 +00007630 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007631else
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7633$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007634fi
7635
Matthias Kloseb9621712010-04-24 17:59:49 +00007636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7637$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007638case $ac_sys_system/$ac_sys_release in
7639 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007640
Matthias Kloseb9621712010-04-24 17:59:49 +00007641$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007642
Matthias Kloseb9621712010-04-24 17:59:49 +00007643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7644$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007645 ;;
7646 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7648$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007649 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007650esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007651
Guido van Rossum0a516c91994-09-12 10:58:40 +00007652# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007653
Michael W. Hudson54241132001-12-07 15:38:26 +00007654
7655
7656
7657
Benjamin Peterson99f03762010-04-11 22:15:28 +00007658
Thomas Wouters477c8d52006-05-27 19:21:47 +00007659
Georg Brandlb1441c72009-01-03 22:33:39 +00007660
Thomas Wouters477c8d52006-05-27 19:21:47 +00007661cat >>confdefs.h <<_ACEOF
7662#define SHLIB_EXT "$SO"
7663_ACEOF
7664
Guido van Rossum0a516c91994-09-12 10:58:40 +00007665# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007666# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007667# (Shared libraries in this instance are shared modules to be loaded into
7668# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7670$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007671if test -z "$LDSHARED"
7672then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007673 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007674 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007675 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007676 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007677 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007678 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007679 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007680 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007681 if test "$GCC" = "yes" ; then
7682 LDSHARED='$(CC) -shared'
7683 LDCXXSHARED='$(CXX) -shared'
7684 else
7685 LDSHARED='$(CC) -G'
7686 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007687 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007688 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007689 if test "$GCC" = "yes" ; then
7690 LDSHARED='$(CC) -shared'
7691 LDCXXSHARED='$(CXX) -shared'
7692 else
7693 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007694 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007695 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007696 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007697 LDSHARED='$(CC) -bundle'
7698 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007699 if test "$enable_framework" ; then
7700 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007701 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7702 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007703 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007704 else
7705 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007706 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007707 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007708 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007709 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007710 LDSHARED='$(CC) -bundle'
7711 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007712 if test "$enable_framework" ; then
7713 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007714 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7715 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007716 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007717 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007718 # No framework, use the Python app as bundle-loader
7719 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007720 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007721 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007722 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007723 Darwin/*)
7724 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7725 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007726
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007727 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007728 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007729 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007730 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007731 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007732 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7733 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007734 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007735 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007736 LDSHARED='$(CC) -bundle'
7737 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007738 if test "$enable_framework" ; then
7739 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007740 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7741 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007742 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007743 else
7744 # No framework, use the Python app as bundle-loader
7745 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7746 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007747 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007748 fi
7749 fi
7750 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007751 Linux*|GNU*|QNX*)
7752 LDSHARED='$(CC) -shared'
7753 LDCXXSHARED='$(CXX) -shared';;
7754 BSD/OS*/4*)
7755 LDSHARED="gcc -shared"
7756 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007757 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007758 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007759 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007760 LDSHARED='$(CC) -shared'
7761 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007762 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007763 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007764 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007765 OpenBSD*)
7766 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7767 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007768 LDSHARED='$(CC) -shared $(CCSHARED)'
7769 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007770 else
7771 case `uname -r` in
7772 [01].* | 2.[0-7] | 2.[0-7].*)
7773 LDSHARED="ld -Bshareable ${LDFLAGS}"
7774 ;;
7775 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007776 LDSHARED='$(CC) -shared $(CCSHARED)'
7777 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007778 ;;
7779 esac
7780 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007781 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007782 LDSHARED='$(CC) -shared'
7783 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007784 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007785 if test "$GCC" = "yes" ; then
7786 LDSHARED='$(CC) -shared'
7787 LDCXXSHARED='$(CXX) -shared'
7788 else
7789 LDSHARED='$(CC) -G'
7790 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007791 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007792 SCO_SV*)
7793 LDSHARED='$(CC) -Wl,-G,-Bexport'
7794 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7795 CYGWIN*)
7796 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7797 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007798 *) LDSHARED="ld";;
7799 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7802$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007803LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007804BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007805# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007806# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7808$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007809if test -z "$CCSHARED"
7810then
Guido van Rossum07397971997-04-29 21:49:50 +00007811 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007812 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007813 then CCSHARED="-fPIC";
7814 elif test `uname -p` = sparc;
7815 then CCSHARED="-xcode=pic32";
7816 else CCSHARED="-Kpic";
7817 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007818 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007819 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007820 else CCSHARED="+z";
7821 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007822 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007823 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007824 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007825 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007826 if test "$GCC" = "yes"
7827 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007828 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007829 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007830 SCO_SV*)
7831 if test "$GCC" = "yes"
7832 then CCSHARED="-fPIC"
7833 else CCSHARED="-Kpic -belf"
7834 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007835 IRIX*/6*) case $CC in
7836 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007837 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007838 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007839 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: $CCSHARED" >&5
7842$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007843# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007844# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7846$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007847if test -z "$LINKFORSHARED"
7848then
Guido van Rossum07397971997-04-29 21:49:50 +00007849 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007850 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007851 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007852 LINKFORSHARED="-Wl,-E -Wl,+s";;
7853# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007854 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007855 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007856 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007858 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007859 if test "$enable_framework"
7860 then
Jack Jansenda49e192005-01-07 13:08:22 +00007861 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007862 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007863 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007864 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007865 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007866 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007867 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007868 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7869 then
7870 LINKFORSHARED="-Wl,--export-dynamic"
7871 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007872 SunOS/5*) case $CC in
7873 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007874 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007875 then
7876 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007877 fi;;
7878 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007879 CYGWIN*)
7880 if test $enable_shared = "no"
7881 then
7882 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7883 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007884 QNX*)
7885 # -Wl,-E causes the symbols to be added to the dynamic
7886 # symbol table so that they can be found when a module
7887 # is loaded. -N 2048K causes the stack size to be set
7888 # to 2048 kilobytes so that the stack doesn't overflow
7889 # when running test_compile.py.
7890 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007891 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7894$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007895
Michael W. Hudson54241132001-12-07 15:38:26 +00007896
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007897
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7899$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007900if test ! "$LIBRARY" = "$LDLIBRARY"
7901then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007902 case $ac_sys_system in
7903 CYGWIN*)
7904 # Cygwin needs CCSHARED when building extension DLLs
7905 # but not when building the interpreter DLL.
7906 CFLAGSFORSHARED='';;
7907 *)
7908 CFLAGSFORSHARED='$(CCSHARED)'
7909 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7912$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007913
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007914# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7915# library (with --enable-shared).
7916# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007917# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7918# if it is not required, since it creates a dependency of the shared library
7919# to LIBS. This, in turn, means that applications linking the shared libpython
7920# don't need to link LIBS explicitly. The default should be only changed
7921# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007922
Matthias Kloseb9621712010-04-24 17:59:49 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7924$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007925case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007926 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007927 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007928esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7930$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007931
7932
Guido van Rossum627b2d71993-12-24 10:39:16 +00007933# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7935$as_echo_n "checking for dlopen in -ldl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007936if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007937 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007938else
Martin v. Löwis11437992002-04-12 09:54:03 +00007939 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007940LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944/* Override any GCC internal prototype to avoid an error.
7945 Use char because int might match the return type of a GCC
7946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007947#ifdef __cplusplus
7948extern "C"
7949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007950char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007951int
7952main ()
7953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 ;
7956 return 0;
7957}
7958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007959if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007961else
Matthias Kloseb9621712010-04-24 17:59:49 +00007962 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007964rm -f core conftest.err conftest.$ac_objext \
7965 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007966LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7969$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007970if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007971 cat >>confdefs.h <<_ACEOF
7972#define HAVE_LIBDL 1
7973_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007974
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007975 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007976
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007977fi
7978 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7980$as_echo_n "checking for shl_load in -ldld... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007981if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007983else
Martin v. Löwis11437992002-04-12 09:54:03 +00007984 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007985LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989/* Override any GCC internal prototype to avoid an error.
7990 Use char because int might match the return type of a GCC
7991 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007992#ifdef __cplusplus
7993extern "C"
7994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007995char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007996int
7997main ()
7998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008000 ;
8001 return 0;
8002}
8003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008004if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008005 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008006else
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008009rm -f core conftest.err conftest.$ac_objext \
8010 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008011LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8014$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008015if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 cat >>confdefs.h <<_ACEOF
8017#define HAVE_LIBDLD 1
8018_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008019
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008020 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008021
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008022fi
8023 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008024
Georg Brandlb1441c72009-01-03 22:33:39 +00008025# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008026if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8028$as_echo_n "checking for library containing sem_init... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008029if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008030 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008031else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008032 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008036/* Override any GCC internal prototype to avoid an error.
8037 Use char because int might match the return type of a GCC
8038 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008039#ifdef __cplusplus
8040extern "C"
8041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008042char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008043int
8044main ()
8045{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ;
8048 return 0;
8049}
8050_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008051for ac_lib in '' pthread rt posix4; do
8052 if test -z "$ac_lib"; then
8053 ac_res="none required"
8054 else
8055 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008056 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008058 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008059 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008061rm -f core conftest.err conftest.$ac_objext \
8062 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08008063 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066done
Gregory P. Smith69140482012-01-16 02:05:55 -08008067if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008068
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069else
8070 ac_cv_search_sem_init=no
8071fi
8072rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008073LIBS=$ac_func_search_save_LIBS
8074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8076$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008078if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008079 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008080
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008081fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008082 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008083 # posix4 on Solaris 2.6
8084 # pthread (first!) on Linux
8085fi
8086
Martin v. Löwis19d17342003-06-14 21:03:05 +00008087# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8089$as_echo_n "checking for textdomain in -lintl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008090if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008092else
8093 ac_check_lib_save_LIBS=$LIBS
8094LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008096/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098/* Override any GCC internal prototype to avoid an error.
8099 Use char because int might match the return type of a GCC
8100 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008101#ifdef __cplusplus
8102extern "C"
8103#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008104char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008105int
8106main ()
8107{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008109 ;
8110 return 0;
8111}
8112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008113if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008114 ac_cv_lib_intl_textdomain=yes
8115else
Matthias Kloseb9621712010-04-24 17:59:49 +00008116 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008118rm -f core conftest.err conftest.$ac_objext \
8119 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008120LIBS=$ac_check_lib_save_LIBS
8121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8123$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008124if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008127
Brett Cannonc6d936e2009-06-07 20:09:53 +00008128 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008129fi
8130
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008131
8132# checks for system dependent C++ extensions support
8133case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8135$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008137/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008138
Georg Brandl59e87bd2011-02-15 19:48:59 +00008139 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008140int
8141main ()
8142{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008143loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008144 ;
8145 return 0;
8146}
Matthias Kloseb159a552010-04-25 21:00:44 +00008147
Martin v. Löwis11437992002-04-12 09:54:03 +00008148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008149if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008150
Matthias Kloseb159a552010-04-25 21:00:44 +00008151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008153
Matthias Kloseb159a552010-04-25 21:00:44 +00008154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008155$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008156
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008157else
Matthias Kloseb159a552010-04-25 21:00:44 +00008158
8159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008160$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008161
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008163rm -f core conftest.err conftest.$ac_objext \
8164 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008165 *) ;;
8166esac
8167
Guido van Rossum70c7f481998-03-26 18:44:10 +00008168# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8170$as_echo_n "checking for t_open in -lnsl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008171if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008173else
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008175LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008178
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008179/* Override any GCC internal prototype to avoid an error.
8180 Use char because int might match the return type of a GCC
8181 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008182#ifdef __cplusplus
8183extern "C"
8184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008185char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008186int
8187main ()
8188{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008189return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008190 ;
8191 return 0;
8192}
8193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008194if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008195 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008196else
Matthias Kloseb9621712010-04-24 17:59:49 +00008197 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008199rm -f core conftest.err conftest.$ac_objext \
8200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008201LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8204$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008205if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008206 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008207fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008208 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8210$as_echo_n "checking for socket in -lsocket... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008211if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +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="-lsocket $LIBS $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 socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008226int
8227main ()
8228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229return socket ();
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_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +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 Rossumec95c7b1998-08-04 17:59:56 +00008242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8244$as_echo "$ac_cv_lib_socket_socket" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008245if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008246 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008247fi
8248 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008249
Matthias Kloseb9621712010-04-24 17:59:49 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8251$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008254if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8257$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008258LIBS="$withval $LIBS"
8259
8260else
Matthias Kloseb9621712010-04-24 17:59:49 +00008261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8262$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263fi
8264
Guido van Rossum7f43da71994-08-01 12:15:30 +00008265
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008266if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008267 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8268set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8270$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008271if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008272 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008273else
8274 case $PKG_CONFIG in
8275 [\\/]* | ?:[\\/]*)
8276 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8277 ;;
8278 *)
8279 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8280for as_dir in $PATH
8281do
8282 IFS=$as_save_IFS
8283 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008284 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008285 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008286 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008287 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008288 break 2
8289 fi
8290done
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008292IFS=$as_save_IFS
8293
8294 ;;
8295esac
8296fi
8297PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8298if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8300$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008301else
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8303$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008304fi
8305
8306
8307fi
8308if test -z "$ac_cv_path_PKG_CONFIG"; then
8309 ac_pt_PKG_CONFIG=$PKG_CONFIG
8310 # Extract the first word of "pkg-config", so it can be a program name with args.
8311set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8313$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008314if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008316else
8317 case $ac_pt_PKG_CONFIG in
8318 [\\/]* | ?:[\\/]*)
8319 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8320 ;;
8321 *)
8322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8323for as_dir in $PATH
8324do
8325 IFS=$as_save_IFS
8326 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008328 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008329 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008330 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008331 break 2
8332 fi
8333done
Matthias Kloseb9621712010-04-24 17:59:49 +00008334 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008335IFS=$as_save_IFS
8336
8337 ;;
8338esac
8339fi
8340ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8341if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8343$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008344else
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8346$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008347fi
8348
8349 if test "x$ac_pt_PKG_CONFIG" = x; then
8350 PKG_CONFIG=""
8351 else
8352 case $cross_compiling:$ac_tool_warned in
8353yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008354{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8355$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008356ac_tool_warned=yes ;;
8357esac
8358 PKG_CONFIG=$ac_pt_PKG_CONFIG
8359 fi
8360else
8361 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8362fi
8363
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008364
8365# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8367$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008368
8369# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008370if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008371 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008372else
8373 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008374fi
8375
8376
Matthias Kloseb9621712010-04-24 17:59:49 +00008377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8378$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008379
8380# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8382$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008383
8384# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008385if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008386 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008387else
8388 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008389fi
8390
8391
8392if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008393 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8394else
8395 LIBFFI_INCLUDEDIR=""
8396fi
8397
8398
Matthias Kloseb9621712010-04-24 17:59:49 +00008399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8400$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008401
Benjamin Peterson076ed002010-10-31 17:11:02 +00008402# Check for support for loadable sqlite extensions
8403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8404$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8405# Check whether --enable-loadable-sqlite-extensions was given.
8406if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8407 enableval=$enable_loadable_sqlite_extensions;
8408else
8409 enable_loadable_sqlite_extensions="no"
8410fi
8411
8412
8413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8414$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8415
Matthias Klose55708cc2009-04-30 08:06:49 +00008416# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8418$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008419
8420# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008421if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008422 withval=$with_dbmliborder;
8423if test x$with_dbmliborder = xyes
8424then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008425as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008426else
8427 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8428 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8429 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008430 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008431 fi
8432 done
8433fi
8434fi
8435
Matthias Kloseb9621712010-04-24 17:59:49 +00008436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8437$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008438
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008439# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008440
8441
Matthias Kloseb9621712010-04-24 17:59:49 +00008442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8443$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008445# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008446if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447 withval=$with_signal_module;
8448fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008449
8450
8451if test -z "$with_signal_module"
8452then with_signal_module="yes"
8453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8455$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008456
8457if test "${with_signal_module}" = "yes"; then
8458 USE_SIGNAL_MODULE=""
8459 SIGNAL_OBJS=""
8460else
8461 USE_SIGNAL_MODULE="#"
8462 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8463fi
8464
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008465# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008466
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008467USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008468
Matthias Kloseb9621712010-04-24 17:59:49 +00008469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8470$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008471
Guido van Rossumec2f0731997-01-22 20:54:01 +00008472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008473# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008474if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8477$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008478LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008479if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008480 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008481fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008482else
Matthias Kloseb9621712010-04-24 17:59:49 +00008483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8484$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485fi
8486
Martin v. Löwis11437992002-04-12 09:54:03 +00008487
8488# Templates for things AC_DEFINEd more than once.
8489# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008490
8491
Martin v. Löwis11437992002-04-12 09:54:03 +00008492
8493
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8495$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008496
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008498if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499 withval=$with_threads;
8500fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008501
8502
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008503# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008506if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 withval=$with_thread; with_threads=$with_thread
8508fi
8509
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008510
8511if test -z "$with_threads"
8512then with_threads="yes"
8513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8515$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008516
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008517
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008518if test "$with_threads" = "no"
8519then
8520 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008521elif test "$ac_cv_pthread_is_default" = yes
8522then
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008524
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008525 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008527
8528 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008530elif test "$ac_cv_kpthread" = "yes"
8531then
8532 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008533 if test "$ac_cv_cxx_thread" = "yes"; then
8534 CXX="$CXX -Kpthread"
8535 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008537
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008538 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008539 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008540elif test "$ac_cv_kthread" = "yes"
8541then
8542 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008543 if test "$ac_cv_cxx_thread" = "yes"; then
8544 CXX="$CXX -Kthread"
8545 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008547
8548 posix_threads=yes
8549 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008550elif test "$ac_cv_pthread" = "yes"
8551then
8552 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008553 if test "$ac_cv_cxx_thread" = "yes"; then
8554 CXX="$CXX -pthread"
8555 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008557
8558 posix_threads=yes
8559 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008560else
8561 if test ! -z "$with_threads" -a -d "$with_threads"
8562 then LDFLAGS="$LDFLAGS -L$with_threads"
8563 fi
8564 if test ! -z "$withval" -a -d "$withval"
8565 then LDFLAGS="$LDFLAGS -L$withval"
8566 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008567
8568 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008569 # define _POSIX_THREADS in unistd.h. Some apparently don't
8570 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8572$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008574/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008575
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008576#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008577#ifdef _POSIX_THREADS
8578yes
8579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008580
8581_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008582if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008584 unistd_defines_pthreads=yes
8585else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008586 unistd_defines_pthreads=no
8587fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008588rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008589
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8591$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008592
Matthias Kloseb9621712010-04-24 17:59:49 +00008593 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008594
Matthias Kloseb9621712010-04-24 17:59:49 +00008595 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 -08008596if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008598
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008600
Martin v. Löwis11437992002-04-12 09:54:03 +00008601
Matthias Kloseb9621712010-04-24 17:59:49 +00008602$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008603
8604 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008605 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008606else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008607
Matthias Kloseb9621712010-04-24 17:59:49 +00008608 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 -08008609if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008611
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008613
Martin v. Löwis11437992002-04-12 09:54:03 +00008614
Matthias Kloseb9621712010-04-24 17:59:49 +00008615$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008616
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008617 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008618else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008619
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008620 # Just looking for pthread_create in libpthread is not enough:
8621 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8622 # So we really have to include pthread.h, and then link.
8623 _libs=$LIBS
8624 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8626$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008628/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008629#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008630
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008631void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008632int
8633main ()
8634{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008635
8636pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 ;
8638 return 0;
8639}
8640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008641if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008642
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8644$as_echo "yes" >&6; }
8645 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008646
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008647 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008648 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008649else
Martin v. Löwis11437992002-04-12 09:54:03 +00008650
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008651 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Gregory P. Smith69140482012-01-16 02:05:55 -08008653if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008655
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008656 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008657 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008658else
Guido van Rossumad678af1998-10-02 14:42:15 +00008659
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8661$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008662if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008664else
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008666LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670/* Override any GCC internal prototype to avoid an error.
8671 Use char because int might match the return type of a GCC
8672 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008673#ifdef __cplusplus
8674extern "C"
8675#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008676char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008677int
8678main ()
8679{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 ;
8682 return 0;
8683}
8684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008685if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008687else
Matthias Kloseb9621712010-04-24 17:59:49 +00008688 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008690rm -f core conftest.err conftest.$ac_objext \
8691 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008692LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8695$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008696if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008698
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008699 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008700 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008701 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008702else
Greg Steinadf63d62000-07-05 10:38:09 +00008703
Matthias Kloseb9621712010-04-24 17:59:49 +00008704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8705$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008706if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008708else
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008710LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714/* Override any GCC internal prototype to avoid an error.
8715 Use char because int might match the return type of a GCC
8716 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008717#ifdef __cplusplus
8718extern "C"
8719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008720char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008721int
8722main ()
8723{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ;
8726 return 0;
8727}
8728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008729if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008731else
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734rm -f core conftest.err conftest.$ac_objext \
8735 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008736LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8739$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008740if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008742
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008743 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008744 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008745 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008746else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008747
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8749$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008750if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008752else
Martin v. Löwis11437992002-04-12 09:54:03 +00008753 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008754LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008758/* Override any GCC internal prototype to avoid an error.
8759 Use char because int might match the return type of a GCC
8760 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008761#ifdef __cplusplus
8762extern "C"
8763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008764char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008765int
8766main ()
8767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008768return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008769 ;
8770 return 0;
8771}
8772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008773if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008774 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008778rm -f core conftest.err conftest.$ac_objext \
8779 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008780LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8783$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008784if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008786
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008787 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008788 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008789 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008790else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008791
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8793$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008794if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008796else
Martin v. Löwis11437992002-04-12 09:54:03 +00008797 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008798LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008802/* Override any GCC internal prototype to avoid an error.
8803 Use char because int might match the return type of a GCC
8804 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008805#ifdef __cplusplus
8806extern "C"
8807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008808char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008809int
8810main ()
8811{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008813 ;
8814 return 0;
8815}
8816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008817if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008819else
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822rm -f core conftest.err conftest.$ac_objext \
8823 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008824LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8827$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008828if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008830
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008831 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008832 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008833 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008834else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008835
Martin v. Löwis130fb172001-07-19 11:00:41 +00008836 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008837fi
8838
Guido van Rossum627b2d71993-12-24 10:39:16 +00008839
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008840fi
8841
Guido van Rossum0be3e491997-05-22 20:33:33 +00008842fi
8843
Guido van Rossum49545951997-12-02 19:28:29 +00008844fi
8845
Guido van Rossumb93a8621998-05-07 13:27:32 +00008846fi
8847
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008849rm -f core conftest.err conftest.$ac_objext \
8850 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851fi
8852
Martin v. Löwis11437992002-04-12 09:54:03 +00008853
8854fi
8855
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008856
Michael W. Hudson54241132001-12-07 15:38:26 +00008857
Matthias Kloseb9621712010-04-24 17:59:49 +00008858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8859$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008860if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008862else
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008864LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868/* Override any GCC internal prototype to avoid an error.
8869 Use char because int might match the return type of a GCC
8870 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008871#ifdef __cplusplus
8872extern "C"
8873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008874char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008875int
8876main ()
8877{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008878return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 ;
8880 return 0;
8881}
8882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008883if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008885else
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008888rm -f core conftest.err conftest.$ac_objext \
8889 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008890LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8893$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008894if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008896
Martin v. Löwis130fb172001-07-19 11:00:41 +00008897 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008898 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008899 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008900fi
8901
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008902
Neal Norwitza978ab02002-11-02 16:58:05 +00008903 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8905$as_echo_n "checking for thr_create in -lthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008906if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008908else
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008910LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914/* Override any GCC internal prototype to avoid an error.
8915 Use char because int might match the return type of a GCC
8916 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008917#ifdef __cplusplus
8918extern "C"
8919#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008920char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008921int
8922main ()
8923{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008925 ;
8926 return 0;
8927}
8928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008929if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008931else
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008934rm -f core conftest.err conftest.$ac_objext \
8935 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008936LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8939$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008940if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008942
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008943 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008944 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008945 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008946fi
8947
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008948 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008949
Martin v. Löwis130fb172001-07-19 11:00:41 +00008950 if test "$USE_THREAD_MODULE" != "#"
8951 then
8952 # If the above checks didn't disable threads, (at least) OSF1
8953 # needs this '-threads' argument during linking.
8954 case $ac_sys_system in
8955 OSF1) LDLAST=-threads;;
8956 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008957 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008958fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008959
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008960if test "$posix_threads" = "yes"; then
8961 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008962
Matthias Kloseb9621712010-04-24 17:59:49 +00008963$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008964
8965 fi
8966
8967 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8968 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008969 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008970$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008971
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008972 ;;
8973 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008974$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008975
8976 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008977 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008978$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008979
8980 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008981 esac
8982
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8984$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008985 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008987else
Matthias Kloseb9621712010-04-24 17:59:49 +00008988 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008989 ac_cv_pthread_system_supported=no
8990else
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008992/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008993#include <pthread.h>
8994 void *foo(void *parm) {
8995 return NULL;
8996 }
8997 main() {
8998 pthread_attr_t attr;
8999 pthread_t id;
9000 if (pthread_attr_init(&attr)) exit(-1);
9001 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9002 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9003 exit(0);
9004 }
9005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009006if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009007 ac_cv_pthread_system_supported=yes
9008else
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009011rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9012 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009013fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009014
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009015
Guido van Rossum627b2d71993-12-24 10:39:16 +00009016fi
9017
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9019$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009020 if test "$ac_cv_pthread_system_supported" = "yes"; then
9021
Matthias Kloseb9621712010-04-24 17:59:49 +00009022$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009023
9024 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 for ac_func in pthread_sigmask
9026do :
9027 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Gregory P. Smith69140482012-01-16 02:05:55 -08009028if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009029 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009030#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009031_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009032 case $ac_sys_system in
9033 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009034
Matthias Kloseb9621712010-04-24 17:59:49 +00009035$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009036
9037 ;;
9038 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009039fi
9040done
9041
9042fi
9043
9044
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009045# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009046
Matthias Kloseb9621712010-04-24 17:59:49 +00009047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9048$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009049# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009050if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009051 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9054$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055 ipv6=no
9056 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9058$as_echo "yes" >&6; }
9059 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060
9061 ipv6=yes
9062 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009064else
Martin v. Löwis11437992002-04-12 09:54:03 +00009065
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009067
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9069$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009070 ipv6=no
9071
9072else
Matthias Kloseb9621712010-04-24 17:59:49 +00009073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009074/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009075 /* AF_INET6 available check */
9076#include <sys/types.h>
9077#include <sys/socket.h>
9078main()
9079{
9080 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9081 exit(1);
9082 else
9083 exit(0);
9084}
9085
Martin v. Löwis11437992002-04-12 09:54:03 +00009086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009087if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009088
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9090$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009091 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009092
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009093else
Matthias Kloseb159a552010-04-25 21:00:44 +00009094
Matthias Kloseb9621712010-04-24 17:59:49 +00009095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9096$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009097 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009098
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9101 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009102fi
9103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009104
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009105if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9107$as_echo_n "checking if RFC2553 API is available... " >&6; }
9108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009109/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009110
9111 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009112#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009113int
9114main ()
9115{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009116struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009117 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009118 ;
9119 return 0;
9120}
Matthias Kloseb159a552010-04-25 21:00:44 +00009121
Martin v. Löwis11437992002-04-12 09:54:03 +00009122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009123if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009124
9125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009126$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009127 ipv6=yes
9128
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009129else
Matthias Kloseb159a552010-04-25 21:00:44 +00009130
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009132$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009133 ipv6=no
9134
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009137fi
9138
9139if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009140 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009141
9142fi
9143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144fi
9145
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009146
9147ipv6type=unknown
9148ipv6lib=none
9149ipv6trylibc=no
9150
9151if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9153$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009154 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9155 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009156 case $i in
9157 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009159/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009160
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009161#include <netinet/in.h>
9162#ifdef IPV6_INRIA_VERSION
9163yes
9164#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009165_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009166if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009167 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009168 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009169fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009170rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009171
9172 ;;
9173 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009175/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009176
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009177#include <netinet/in.h>
9178#ifdef __KAME__
9179yes
9180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009181_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009182if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009183 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009184 ipv6type=$i;
9185 ipv6lib=inet6
9186 ipv6libdir=/usr/local/v6/lib
9187 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009188fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009189rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009190
9191 ;;
9192 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009194/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009195
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009196#include <features.h>
9197#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9198yes
9199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009200_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009201if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009202 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009203 ipv6type=$i;
9204 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009205fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009206rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009207
9208 ;;
9209 linux-inet6)
9210 if test -d /usr/inet6; then
9211 ipv6type=$i
9212 ipv6lib=inet6
9213 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009214 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009215 fi
9216 ;;
9217 solaris)
9218 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009219 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009220 ipv6type=$i
9221 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009222 fi
9223 fi
9224 ;;
9225 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009227/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009228
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009229#include <sys/param.h>
9230#ifdef _TOSHIBA_INET6
9231yes
9232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009233_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009235 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009236 ipv6type=$i;
9237 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009238 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009239fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009240rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009241
9242 ;;
9243 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009245/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009246
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009247#include </usr/local/v6/include/sys/v6config.h>
9248#ifdef __V6D__
9249yes
9250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009251_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009252if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009253 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009254 ipv6type=$i;
9255 ipv6lib=v6;
9256 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009257 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009258fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009259rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009260
9261 ;;
9262 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009264/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009265
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009266#include <sys/param.h>
9267#ifdef _ZETA_MINAMI_INET6
9268yes
9269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009270_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009271if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009272 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009273 ipv6type=$i;
9274 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009275 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009276fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009277rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009278
9279 ;;
9280 esac
9281 if test "$ipv6type" != "unknown"; then
9282 break
9283 fi
9284 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9286$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009287fi
9288
9289if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9290 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9291 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9292 echo "using lib$ipv6lib"
9293 else
9294 if test $ipv6trylibc = "yes"; then
9295 echo "using libc"
9296 else
9297 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9298 echo "You need to fetch lib$ipv6lib.a from appropriate"
9299 echo 'ipv6 kit and compile beforehand.'
9300 exit 1
9301 fi
9302 fi
9303fi
9304
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9306$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009308/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009309
9310 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009311int
9312main ()
9313{
9314FSIORefNum fRef = 0
9315 ;
9316 return 0;
9317}
Matthias Kloseb159a552010-04-25 21:00:44 +00009318
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009320if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009321
Matthias Kloseb159a552010-04-25 21:00:44 +00009322
Matthias Kloseb9621712010-04-24 17:59:49 +00009323$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009324
Matthias Kloseb9621712010-04-24 17:59:49 +00009325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9326$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009327
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009328else
Matthias Kloseb159a552010-04-25 21:00:44 +00009329
Matthias Kloseb9621712010-04-24 17:59:49 +00009330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9331$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009332
9333fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9335
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009336# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9338$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009339
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009340# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009341if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009342 withval=$with_doc_strings;
9343fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009344
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009345
9346if test -z "$with_doc_strings"
9347then with_doc_strings="yes"
9348fi
9349if test "$with_doc_strings" != "no"
9350then
9351
Matthias Kloseb9621712010-04-24 17:59:49 +00009352$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009353
9354fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9356$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009357
Antoine Pitrou042b1282010-08-13 21:15:58 +00009358# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9360$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009362# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009363if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009364 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009365if test "$withval" != no
9366then
9367
Matthias Kloseb9621712010-04-24 17:59:49 +00009368$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009369
Matthias Kloseb9621712010-04-24 17:59:49 +00009370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9371$as_echo "yes" >&6; }
9372else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9373$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009374fi
9375else
Matthias Kloseb9621712010-04-24 17:59:49 +00009376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009378fi
9379
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009380
9381# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9383$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009385# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009386if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009387 withval=$with_pymalloc;
9388fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009389
Neil Schemenauera35c6882001-02-27 04:45:05 +00009390
Neil Schemenauer16c22972002-03-22 15:34:49 +00009391if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009392then
9393 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009394 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009395fi
9396if test "$with_pymalloc" != "no"
9397then
Martin v. Löwis11437992002-04-12 09:54:03 +00009398
Matthias Kloseb9621712010-04-24 17:59:49 +00009399$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009400
9401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9403$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009404
Benjamin Peterson05159c42009-12-03 03:01:27 +00009405# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9407$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009408
9409# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009410if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009411 withval=$with_valgrind;
9412else
9413 with_valgrind=no
9414fi
9415
Matthias Kloseb9621712010-04-24 17:59:49 +00009416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9417$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009418if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009419 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 -08009420if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009421
Matthias Kloseb9621712010-04-24 17:59:49 +00009422$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009423
9424else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009425 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009426
9427fi
9428
9429
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009430 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009431fi
9432
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009433# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009434
Guido van Rossum98935bf2001-09-05 19:13:16 +00009435DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009436
Guido van Rossume97ee181999-12-20 21:27:22 +00009437# the dlopen() function means we might want to use dynload_shlib.o. some
9438# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009439for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009440do :
9441 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Gregory P. Smith69140482012-01-16 02:05:55 -08009442if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009444#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009445_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009446
Guido van Rossume97ee181999-12-20 21:27:22 +00009447fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009448done
Guido van Rossume97ee181999-12-20 21:27:22 +00009449
Michael W. Hudson54241132001-12-07 15:38:26 +00009450
Guido van Rossume97ee181999-12-20 21:27:22 +00009451# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9452# loading of modules.
9453
Matthias Kloseb9621712010-04-24 17:59:49 +00009454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9455$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009456if test -z "$DYNLOADFILE"
9457then
9458 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009459 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9460 if test "$ac_cv_func_dlopen" = yes
9461 then DYNLOADFILE="dynload_shlib.o"
9462 else DYNLOADFILE="dynload_aix.o"
9463 fi
9464 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009465 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009466 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9467 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009468 *)
9469 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9470 # out any dynamic loading
9471 if test "$ac_cv_func_dlopen" = yes
9472 then DYNLOADFILE="dynload_shlib.o"
9473 else DYNLOADFILE="dynload_stub.o"
9474 fi
9475 ;;
9476 esac
9477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9479$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009480if test "$DYNLOADFILE" != "dynload_stub.o"
9481then
Martin v. Löwis11437992002-04-12 09:54:03 +00009482
Matthias Kloseb9621712010-04-24 17:59:49 +00009483$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009484
9485fi
9486
Neil Schemenauer4e425612001-06-19 15:44:15 +00009487# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9488
Michael W. Hudson54241132001-12-07 15:38:26 +00009489
Matthias Kloseb9621712010-04-24 17:59:49 +00009490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9491$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009492if test -z "$MACHDEP_OBJS"
9493then
Jack Jansene578a632001-08-15 01:27:14 +00009494 MACHDEP_OBJS=$extra_machdep_objs
9495else
9496 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9499$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009500
Guido van Rossum627b2d71993-12-24 10:39:16 +00009501# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009502for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009503 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009504 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009505 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009506 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009507 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009508 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009509 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9510 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009511 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009512 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009513 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009514 truncate uname unsetenv utimes waitpid wait3 wait4 \
9515 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009516do :
9517 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9518ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009519if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009521#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009522_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009523
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009524fi
9525done
9526
Michael W. Hudson54241132001-12-07 15:38:26 +00009527
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009528ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9529 #include <dirent.h>
9530"
9531if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9532
9533$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9534
9535fi
9536
9537
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009538# For some functions, having a definition is not sufficient, since
9539# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9541$as_echo_n "checking for chroot... " >&6; }
9542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009544#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009545int
9546main ()
9547{
9548void *x=chroot
9549 ;
9550 return 0;
9551}
9552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009553if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009554
Matthias Kloseb9621712010-04-24 17:59:49 +00009555$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009556
Matthias Kloseb159a552010-04-25 21:00:44 +00009557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009558$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009559else
Matthias Kloseb9621712010-04-24 17:59:49 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009562
9563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9566$as_echo_n "checking for link... " >&6; }
9567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009568/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009569#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009570int
9571main ()
9572{
9573void *x=link
9574 ;
9575 return 0;
9576}
9577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009578if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009579
Matthias Kloseb9621712010-04-24 17:59:49 +00009580$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009581
Matthias Kloseb159a552010-04-25 21:00:44 +00009582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009583$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009584else
Matthias Kloseb9621712010-04-24 17:59:49 +00009585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9586$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009587
9588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9591$as_echo_n "checking for symlink... " >&6; }
9592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009593/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009594#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009595int
9596main ()
9597{
9598void *x=symlink
9599 ;
9600 return 0;
9601}
9602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009603if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009604
Matthias Kloseb9621712010-04-24 17:59:49 +00009605$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009606
Matthias Kloseb159a552010-04-25 21:00:44 +00009607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009608$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009609else
Matthias Kloseb9621712010-04-24 17:59:49 +00009610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9611$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009612
9613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9616$as_echo_n "checking for fchdir... " >&6; }
9617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009618/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009619#include <unistd.h>
9620int
9621main ()
9622{
9623void *x=fchdir
9624 ;
9625 return 0;
9626}
9627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009629
Matthias Kloseb9621712010-04-24 17:59:49 +00009630$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009631
Matthias Kloseb159a552010-04-25 21:00:44 +00009632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009633$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009634else
Matthias Kloseb9621712010-04-24 17:59:49 +00009635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9636$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009637
9638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9641$as_echo_n "checking for fsync... " >&6; }
9642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009643/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009644#include <unistd.h>
9645int
9646main ()
9647{
9648void *x=fsync
9649 ;
9650 return 0;
9651}
9652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009654
Matthias Kloseb9621712010-04-24 17:59:49 +00009655$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009656
Matthias Kloseb159a552010-04-25 21:00:44 +00009657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009658$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009659else
Matthias Kloseb9621712010-04-24 17:59:49 +00009660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9661$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009662
9663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9666$as_echo_n "checking for fdatasync... " >&6; }
9667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009668/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009669#include <unistd.h>
9670int
9671main ()
9672{
9673void *x=fdatasync
9674 ;
9675 return 0;
9676}
9677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009678if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009679
Matthias Kloseb9621712010-04-24 17:59:49 +00009680$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009681
Matthias Kloseb159a552010-04-25 21:00:44 +00009682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009683$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009684else
Matthias Kloseb9621712010-04-24 17:59:49 +00009685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9686$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009687
9688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9691$as_echo_n "checking for epoll... " >&6; }
9692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009693/* end confdefs.h. */
9694#include <sys/epoll.h>
9695int
9696main ()
9697{
9698void *x=epoll_create
9699 ;
9700 return 0;
9701}
9702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009703if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009704
Matthias Kloseb9621712010-04-24 17:59:49 +00009705$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009706
Matthias Kloseb159a552010-04-25 21:00:44 +00009707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009708$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009709else
Matthias Kloseb9621712010-04-24 17:59:49 +00009710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9711$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009712
9713fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9716$as_echo_n "checking for kqueue... " >&6; }
9717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009718/* end confdefs.h. */
9719
9720#include <sys/types.h>
9721#include <sys/event.h>
9722
9723int
9724main ()
9725{
9726int x=kqueue()
9727 ;
9728 return 0;
9729}
9730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009731if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009732
Matthias Kloseb9621712010-04-24 17:59:49 +00009733$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009734
Matthias Kloseb159a552010-04-25 21:00:44 +00009735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009736$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009737else
Matthias Kloseb9621712010-04-24 17:59:49 +00009738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9739$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009740
9741fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009743# On some systems (eg. FreeBSD 5), we would find a definition of the
9744# functions ctermid_r, setgroups in the library, but no prototype
9745# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9746# address to avoid compiler warnings and potential miscompilations
9747# because of the missing prototypes.
9748
Matthias Kloseb9621712010-04-24 17:59:49 +00009749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9750$as_echo_n "checking for ctermid_r... " >&6; }
9751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009752/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009753
Martin v. Löwisd5843682002-11-21 20:41:28 +00009754#include <stdio.h>
9755
Martin v. Löwisd5843682002-11-21 20:41:28 +00009756int
9757main ()
9758{
9759void* p = ctermid_r
9760 ;
9761 return 0;
9762}
9763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009764if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009765
Matthias Kloseb9621712010-04-24 17:59:49 +00009766$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009767
Matthias Kloseb159a552010-04-25 21:00:44 +00009768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009769$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009770else
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9772$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009773
9774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9776
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9778$as_echo_n "checking for flock declaration... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009779if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009780 $as_echo_n "(cached) " >&6
9781else
9782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009783/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009784#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009785int
9786main ()
9787{
9788void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009789
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009790 ;
9791 return 0;
9792}
9793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009794if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009795 ac_cv_flock_decl=yes
9796else
9797 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009798
9799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009801
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009802fi
9803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9804$as_echo "$ac_cv_flock_decl" >&6; }
9805if test "x${ac_cv_flock_decl}" = xyes; then
9806 for ac_func in flock
9807do :
9808 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Gregory P. Smith69140482012-01-16 02:05:55 -08009809if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009810 cat >>confdefs.h <<_ACEOF
9811#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009812_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009813
Antoine Pitroua3000072010-09-07 14:52:42 +00009814else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009816$as_echo_n "checking for flock in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009817if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009818 $as_echo_n "(cached) " >&6
9819else
9820 ac_check_lib_save_LIBS=$LIBS
9821LIBS="-lbsd $LIBS"
9822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9823/* end confdefs.h. */
9824
9825/* Override any GCC internal prototype to avoid an error.
9826 Use char because int might match the return type of a GCC
9827 builtin and then its argument prototype would still apply. */
9828#ifdef __cplusplus
9829extern "C"
9830#endif
9831char flock ();
9832int
9833main ()
9834{
9835return flock ();
9836 ;
9837 return 0;
9838}
9839_ACEOF
9840if ac_fn_c_try_link "$LINENO"; then :
9841 ac_cv_lib_bsd_flock=yes
9842else
9843 ac_cv_lib_bsd_flock=no
9844fi
9845rm -f core conftest.err conftest.$ac_objext \
9846 conftest$ac_exeext conftest.$ac_ext
9847LIBS=$ac_check_lib_save_LIBS
9848fi
9849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9850$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009851if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009852 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009853
9854
9855$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9856
9857
9858fi
9859
9860
9861fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009862done
9863
Antoine Pitroua3000072010-09-07 14:52:42 +00009864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865
Matthias Kloseb9621712010-04-24 17:59:49 +00009866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9867$as_echo_n "checking for getpagesize... " >&6; }
9868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009869/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009870
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009871#include <unistd.h>
9872
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009873int
9874main ()
9875{
9876void* p = getpagesize
9877 ;
9878 return 0;
9879}
9880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009881if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009882
Matthias Kloseb9621712010-04-24 17:59:49 +00009883$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009884
Matthias Kloseb159a552010-04-25 21:00:44 +00009885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009886$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009887else
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9889$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009890
9891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009893
Charles-François Natali6613c182011-11-27 12:41:06 +01009894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9895$as_echo_n "checking for broken unsetenv... " >&6; }
9896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9897/* end confdefs.h. */
9898
9899#include <stdlib.h>
9900
9901int
9902main ()
9903{
9904int res = unsetenv("DUMMY")
9905 ;
9906 return 0;
9907}
9908_ACEOF
9909if ac_fn_c_try_compile "$LINENO"; then :
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9911$as_echo "no" >&6; }
9912else
9913
9914$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9915
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9917$as_echo "yes" >&6; }
9918
9919fi
9920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9921
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009922for ac_prog in true
9923do
9924 # Extract the first word of "$ac_prog", so it can be a program name with args.
9925set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9927$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009928if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009930else
9931 if test -n "$TRUE"; then
9932 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9933else
9934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9935for as_dir in $PATH
9936do
9937 IFS=$as_save_IFS
9938 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009939 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009940 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009941 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 $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 +00009943 break 2
9944 fi
9945done
Matthias Kloseb9621712010-04-24 17:59:49 +00009946 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009947IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009948
9949fi
9950fi
9951TRUE=$ac_cv_prog_TRUE
9952if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9954$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009955else
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9957$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009958fi
9959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009960
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009961 test -n "$TRUE" && break
9962done
9963test -n "$TRUE" || TRUE="/bin/true"
9964
9965
Matthias Kloseb9621712010-04-24 17:59:49 +00009966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9967$as_echo_n "checking for inet_aton in -lc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009968if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009970else
9971 ac_check_lib_save_LIBS=$LIBS
9972LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009974/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009976/* Override any GCC internal prototype to avoid an error.
9977 Use char because int might match the return type of a GCC
9978 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009979#ifdef __cplusplus
9980extern "C"
9981#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009982char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009983int
9984main ()
9985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009986return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009987 ;
9988 return 0;
9989}
9990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009991if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009992 ac_cv_lib_c_inet_aton=yes
9993else
Matthias Kloseb9621712010-04-24 17:59:49 +00009994 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009996rm -f core conftest.err conftest.$ac_objext \
9997 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009998LIBS=$ac_check_lib_save_LIBS
9999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10001$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010002if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010003 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010004else
Matthias Kloseb9621712010-04-24 17:59:49 +000010005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10006$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010007if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010008 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010009else
10010 ac_check_lib_save_LIBS=$LIBS
10011LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010013/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015/* Override any GCC internal prototype to avoid an error.
10016 Use char because int might match the return type of a GCC
10017 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010018#ifdef __cplusplus
10019extern "C"
10020#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010021char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010022int
10023main ()
10024{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010025return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010026 ;
10027 return 0;
10028}
10029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010030if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010031 ac_cv_lib_resolv_inet_aton=yes
10032else
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010035rm -f core conftest.err conftest.$ac_objext \
10036 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010037LIBS=$ac_check_lib_save_LIBS
10038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10040$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010041if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010042 cat >>confdefs.h <<_ACEOF
10043#define HAVE_LIBRESOLV 1
10044_ACEOF
10045
10046 LIBS="-lresolv $LIBS"
10047
10048fi
10049
10050
10051fi
10052
10053
Christian Heimesd0764e22007-12-04 15:00:33 +000010054# On Tru64, chflags seems to be present, but calling it will
10055# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10057$as_echo_n "checking for chflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010058if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010059 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010060else
Matthias Kloseb9621712010-04-24 17:59:49 +000010061 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010062 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010063else
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010065/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010066
Christian Heimesd0764e22007-12-04 15:00:33 +000010067#include <sys/stat.h>
10068#include <unistd.h>
10069int main(int argc, char*argv[])
10070{
10071 if(chflags(argv[0], 0) != 0)
10072 return 1;
10073 return 0;
10074}
Ned Deily3eb67d52011-06-28 00:00:28 -070010075
Christian Heimesd0764e22007-12-04 15:00:33 +000010076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010077if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010078 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010079else
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10083 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010084fi
10085
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010086
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10089$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010090if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010091 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010092if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010093 ac_cv_have_chflags="yes"
10094else
10095 ac_cv_have_chflags="no"
10096fi
10097
10098fi
10099if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010100
Matthias Kloseb9621712010-04-24 17:59:49 +000010101$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010102
10103fi
10104
Matthias Kloseb9621712010-04-24 17:59:49 +000010105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10106$as_echo_n "checking for lchflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010107if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010108 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010109else
Matthias Kloseb9621712010-04-24 17:59:49 +000010110 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010111 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010112else
Matthias Kloseb9621712010-04-24 17:59:49 +000010113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010114/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010115
Christian Heimesd0764e22007-12-04 15:00:33 +000010116#include <sys/stat.h>
10117#include <unistd.h>
10118int main(int argc, char*argv[])
10119{
10120 if(lchflags(argv[0], 0) != 0)
10121 return 1;
10122 return 0;
10123}
Ned Deily3eb67d52011-06-28 00:00:28 -070010124
Christian Heimesd0764e22007-12-04 15:00:33 +000010125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010126if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010127 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010128else
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10132 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010133fi
10134
10135
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10138$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010139if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010140 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010141if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010142 ac_cv_have_lchflags="yes"
10143else
10144 ac_cv_have_lchflags="no"
10145fi
10146
10147fi
10148if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010149
Matthias Kloseb9621712010-04-24 17:59:49 +000010150$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010151
10152fi
10153
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010154case $ac_sys_system/$ac_sys_release in
10155Darwin/*)
10156 _CUR_CFLAGS="${CFLAGS}"
10157 _CUR_LDFLAGS="${LDFLAGS}"
10158 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10159 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10160 ;;
10161esac
10162
Matthias Kloseb9621712010-04-24 17:59:49 +000010163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10164$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010165if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010166 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010167else
10168 ac_check_lib_save_LIBS=$LIBS
10169LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010171/* end confdefs.h. */
10172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010173/* Override any GCC internal prototype to avoid an error.
10174 Use char because int might match the return type of a GCC
10175 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010176#ifdef __cplusplus
10177extern "C"
10178#endif
10179char inflateCopy ();
10180int
10181main ()
10182{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010183return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010184 ;
10185 return 0;
10186}
10187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010188if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010189 ac_cv_lib_z_inflateCopy=yes
10190else
Matthias Kloseb9621712010-04-24 17:59:49 +000010191 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010193rm -f core conftest.err conftest.$ac_objext \
10194 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010195LIBS=$ac_check_lib_save_LIBS
10196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10198$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010199if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010200
Matthias Kloseb9621712010-04-24 17:59:49 +000010201$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010202
10203fi
10204
10205
10206case $ac_sys_system/$ac_sys_release in
10207Darwin/*)
10208 CFLAGS="${_CUR_CFLAGS}"
10209 LDFLAGS="${_CUR_LDFLAGS}"
10210 ;;
10211esac
10212
Matthias Kloseb9621712010-04-24 17:59:49 +000010213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10214$as_echo_n "checking for hstrerror... " >&6; }
10215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010216/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010217
Martin v. Löwise9416172003-05-03 10:12:45 +000010218#include <netdb.h>
10219
Martin v. Löwise9416172003-05-03 10:12:45 +000010220int
10221main ()
10222{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010223void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010224 ;
10225 return 0;
10226}
10227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010228if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010229
Matthias Kloseb9621712010-04-24 17:59:49 +000010230$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010231
Matthias Kloseb159a552010-04-25 21:00:44 +000010232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010233$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010234else
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10236$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010237
10238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010239rm -f core conftest.err conftest.$ac_objext \
10240 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010241
Matthias Kloseb9621712010-04-24 17:59:49 +000010242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10243$as_echo_n "checking for inet_aton... " >&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öwis86d66262006-02-17 08:40:11 +000010247#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010248#include <sys/socket.h>
10249#include <netinet/in.h>
10250#include <arpa/inet.h>
10251
Martin v. Löwise9416172003-05-03 10:12:45 +000010252int
10253main ()
10254{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010255void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010256 ;
10257 return 0;
10258}
10259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010260if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010261
Matthias Kloseb9621712010-04-24 17:59:49 +000010262$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010263
Matthias Kloseb159a552010-04-25 21:00:44 +000010264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010265$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010266else
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10268$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010269
10270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010271rm -f core conftest.err conftest.$ac_objext \
10272 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273
Matthias Kloseb9621712010-04-24 17:59:49 +000010274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10275$as_echo_n "checking for inet_pton... " >&6; }
10276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010277/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010278
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010279#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010280#include <sys/socket.h>
10281#include <netinet/in.h>
10282#include <arpa/inet.h>
10283
Martin v. Löwise9416172003-05-03 10:12:45 +000010284int
10285main ()
10286{
10287void* p = inet_pton
10288 ;
10289 return 0;
10290}
10291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010292if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010293
Matthias Kloseb9621712010-04-24 17:59:49 +000010294$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010295
Matthias Kloseb159a552010-04-25 21:00:44 +000010296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010297$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010298else
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10300$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010301
10302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010304
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010305# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10307$as_echo_n "checking for setgroups... " >&6; }
10308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010310
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010311#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010312#ifdef HAVE_GRP_H
10313#include <grp.h>
10314#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010315
Martin v. Löwisd5843682002-11-21 20:41:28 +000010316int
10317main ()
10318{
10319void* p = setgroups
10320 ;
10321 return 0;
10322}
10323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010325
Matthias Kloseb9621712010-04-24 17:59:49 +000010326$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010327
Matthias Kloseb159a552010-04-25 21:00:44 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010329$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010330else
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10332$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010333
10334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010336
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010337# check for openpty and forkpty
10338
10339for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010340do :
10341 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010342if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010343 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010344#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010345_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010346
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010347else
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10349$as_echo_n "checking for openpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010350if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010352else
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010354LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010358/* Override any GCC internal prototype to avoid an error.
10359 Use char because int might match the return type of a GCC
10360 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010361#ifdef __cplusplus
10362extern "C"
10363#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010364char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010365int
10366main ()
10367{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010369 ;
10370 return 0;
10371}
10372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010373if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010375else
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010378rm -f core conftest.err conftest.$ac_objext \
10379 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010380LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10383$as_echo "$ac_cv_lib_util_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010384if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010385 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010386 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010387else
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10389$as_echo_n "checking for openpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010390if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010391 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010392else
10393 ac_check_lib_save_LIBS=$LIBS
10394LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010396/* end confdefs.h. */
10397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010398/* Override any GCC internal prototype to avoid an error.
10399 Use char because int might match the return type of a GCC
10400 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010401#ifdef __cplusplus
10402extern "C"
10403#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010404char openpty ();
10405int
10406main ()
10407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010409 ;
10410 return 0;
10411}
10412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010413if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010414 ac_cv_lib_bsd_openpty=yes
10415else
Matthias Kloseb9621712010-04-24 17:59:49 +000010416 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010418rm -f core conftest.err conftest.$ac_objext \
10419 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010420LIBS=$ac_check_lib_save_LIBS
10421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10423$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010424if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010425 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010426 LIBS="$LIBS -lbsd"
10427fi
10428
10429
10430fi
10431
Fred Drake8cef4cf2000-06-28 16:40:38 +000010432
10433fi
10434done
10435
10436for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010437do :
10438 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010439if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010441#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010442_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010443
Fred Drake8cef4cf2000-06-28 16:40:38 +000010444else
Matthias Kloseb9621712010-04-24 17:59:49 +000010445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10446$as_echo_n "checking for forkpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010447if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010448 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010449else
Martin v. Löwis11437992002-04-12 09:54:03 +000010450 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010451LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455/* Override any GCC internal prototype to avoid an error.
10456 Use char because int might match the return type of a GCC
10457 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010458#ifdef __cplusplus
10459extern "C"
10460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010461char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010462int
10463main ()
10464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010466 ;
10467 return 0;
10468}
10469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010470if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010471 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010472else
Matthias Kloseb9621712010-04-24 17:59:49 +000010473 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010475rm -f core conftest.err conftest.$ac_objext \
10476 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010477LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10480$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010481if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010482 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010483 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010484else
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10486$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010487if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010488 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010489else
10490 ac_check_lib_save_LIBS=$LIBS
10491LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010493/* end confdefs.h. */
10494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495/* Override any GCC internal prototype to avoid an error.
10496 Use char because int might match the return type of a GCC
10497 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010498#ifdef __cplusplus
10499extern "C"
10500#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010501char forkpty ();
10502int
10503main ()
10504{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010506 ;
10507 return 0;
10508}
10509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010510if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010511 ac_cv_lib_bsd_forkpty=yes
10512else
Matthias Kloseb9621712010-04-24 17:59:49 +000010513 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010515rm -f core conftest.err conftest.$ac_objext \
10516 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010517LIBS=$ac_check_lib_save_LIBS
10518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10520$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010521if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010522 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010523 LIBS="$LIBS -lbsd"
10524fi
10525
10526
10527fi
10528
Fred Drake8cef4cf2000-06-28 16:40:38 +000010529
10530fi
10531done
10532
Jack Jansendd19cf82001-12-06 22:36:17 +000010533
Christian Heimesb186d002008-03-18 15:15:01 +000010534# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010535for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010536do :
10537 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Gregory P. Smith69140482012-01-16 02:05:55 -080010538if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010539 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010540#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010541_ACEOF
10542
10543fi
10544done
10545
10546
Michael W. Hudson54241132001-12-07 15:38:26 +000010547# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010548for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010549do :
10550 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10551ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010552if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010553 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010554#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010555_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010556
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010557fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010558done
10559
Michael W. Hudson54241132001-12-07 15:38:26 +000010560
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010561ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Gregory P. Smith69140482012-01-16 02:05:55 -080010562if test "x$ac_cv_func_dup2" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010563 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010564
Martin v. Löwis1142de32002-03-29 16:28:31 +000010565else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010566 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010567 *" dup2.$ac_objext "* ) ;;
10568 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010569 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010570esac
10571
Martin v. Löwis1142de32002-03-29 16:28:31 +000010572fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010573
10574ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Gregory P. Smith69140482012-01-16 02:05:55 -080010575if test "x$ac_cv_func_getcwd" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010576 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10577
10578else
10579 case " $LIBOBJS " in
10580 *" getcwd.$ac_objext "* ) ;;
10581 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10582 ;;
10583esac
10584
10585fi
10586
10587ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Gregory P. Smith69140482012-01-16 02:05:55 -080010588if test "x$ac_cv_func_strdup" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010589 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10590
10591else
10592 case " $LIBOBJS " in
10593 *" strdup.$ac_objext "* ) ;;
10594 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10595 ;;
10596esac
10597
10598fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010599
10600
10601for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010602do :
10603 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010604if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010606#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010609/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010610#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010611int
10612main ()
10613{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010614getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010615 ;
10616 return 0;
10617}
10618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010619if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010620
Matthias Kloseb9621712010-04-24 17:59:49 +000010621$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010622
Guido van Rossum627b2d71993-12-24 10:39:16 +000010623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010625
Guido van Rossum627b2d71993-12-24 10:39:16 +000010626fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010627done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010628
Jack Jansen150753c2003-03-29 22:07:47 +000010629for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010630do :
10631 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010632if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010633 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010634#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010637/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010638#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010639int
10640main ()
10641{
10642setpgrp(0,0);
10643 ;
10644 return 0;
10645}
10646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010647if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010648
Matthias Kloseb9621712010-04-24 17:59:49 +000010649$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010650
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010653
10654fi
10655done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010656
Thomas Wouters3a584202000-08-05 23:28:51 +000010657for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010658do :
10659 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Gregory P. Smith69140482012-01-16 02:05:55 -080010660if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010662#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010666#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010667int
10668main ()
10669{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010670gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010671 ;
10672 return 0;
10673}
10674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010675if ac_fn_c_try_compile "$LINENO"; then :
10676
Guido van Rossum627b2d71993-12-24 10:39:16 +000010677else
Skip Montanaro6dead952003-09-25 14:50:04 +000010678
Matthias Kloseb9621712010-04-24 17:59:49 +000010679$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010680
Martin v. Löwis11437992002-04-12 09:54:03 +000010681
Guido van Rossum627b2d71993-12-24 10:39:16 +000010682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010684
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010685fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010686done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010687
Michael W. Hudson54241132001-12-07 15:38:26 +000010688
Matthias Kloseb9621712010-04-24 17:59:49 +000010689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10690$as_echo_n "checking for major... " >&6; }
10691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010692/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010693
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010694#if defined(MAJOR_IN_MKDEV)
10695#include <sys/mkdev.h>
10696#elif defined(MAJOR_IN_SYSMACROS)
10697#include <sys/sysmacros.h>
10698#else
10699#include <sys/types.h>
10700#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010701
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010702int
10703main ()
10704{
10705
10706 makedev(major(0),minor(0));
10707
10708 ;
10709 return 0;
10710}
10711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010712if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010713
10714
Matthias Kloseb9621712010-04-24 17:59:49 +000010715$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010716
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10718$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010719
10720else
Skip Montanaro6dead952003-09-25 14:50:04 +000010721
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10723$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010724
10725fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010726rm -f core conftest.err conftest.$ac_objext \
10727 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010728
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010729# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010730# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10732$as_echo_n "checking for getaddrinfo... " >&6; }
10733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010734/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010735
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010736#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010737#include <sys/socket.h>
10738#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010739#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010740
Martin v. Löwis11437992002-04-12 09:54:03 +000010741int
10742main ()
10743{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010744getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010745 ;
10746 return 0;
10747}
10748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010749if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010750 have_getaddrinfo=yes
10751else
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010754rm -f core conftest.err conftest.$ac_objext \
10755 conftest$ac_exeext conftest.$ac_ext
10756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10757$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010758if test $have_getaddrinfo = yes
10759then
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10761$as_echo_n "checking getaddrinfo bug... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010762 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010764else
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010766 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010767else
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010769/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010770
10771#include <sys/types.h>
10772#include <netdb.h>
10773#include <string.h>
10774#include <sys/socket.h>
10775#include <netinet/in.h>
10776
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010777int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010778{
10779 int passive, gaierr, inet4 = 0, inet6 = 0;
10780 struct addrinfo hints, *ai, *aitop;
10781 char straddr[INET6_ADDRSTRLEN], strport[16];
10782
10783 for (passive = 0; passive <= 1; passive++) {
10784 memset(&hints, 0, sizeof(hints));
10785 hints.ai_family = AF_UNSPEC;
10786 hints.ai_flags = passive ? AI_PASSIVE : 0;
10787 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010788 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010789 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10790 (void)gai_strerror(gaierr);
10791 goto bad;
10792 }
10793 for (ai = aitop; ai; ai = ai->ai_next) {
10794 if (ai->ai_addr == NULL ||
10795 ai->ai_addrlen == 0 ||
10796 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10797 straddr, sizeof(straddr), strport, sizeof(strport),
10798 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10799 goto bad;
10800 }
10801 switch (ai->ai_family) {
10802 case AF_INET:
10803 if (strcmp(strport, "54321") != 0) {
10804 goto bad;
10805 }
10806 if (passive) {
10807 if (strcmp(straddr, "0.0.0.0") != 0) {
10808 goto bad;
10809 }
10810 } else {
10811 if (strcmp(straddr, "127.0.0.1") != 0) {
10812 goto bad;
10813 }
10814 }
10815 inet4++;
10816 break;
10817 case AF_INET6:
10818 if (strcmp(strport, "54321") != 0) {
10819 goto bad;
10820 }
10821 if (passive) {
10822 if (strcmp(straddr, "::") != 0) {
10823 goto bad;
10824 }
10825 } else {
10826 if (strcmp(straddr, "::1") != 0) {
10827 goto bad;
10828 }
10829 }
10830 inet6++;
10831 break;
10832 case AF_UNSPEC:
10833 goto bad;
10834 break;
10835 default:
10836 /* another family support? */
10837 break;
10838 }
10839 }
10840 }
10841
10842 if (!(inet4 == 0 || inet4 == 2))
10843 goto bad;
10844 if (!(inet6 == 0 || inet6 == 2))
10845 goto bad;
10846
10847 if (aitop)
10848 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010849 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010850
10851 bad:
10852 if (aitop)
10853 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010854 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010855}
10856
Martin v. Löwis11437992002-04-12 09:54:03 +000010857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010858if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010859 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010860else
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010862fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10864 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010867fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010868
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010870
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10872$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10873
Mark Dickinson2df5d282009-12-31 21:22:50 +000010874if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010875then
10876 if test $ipv6 = yes
10877 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010878 echo 'Fatal: You must get working getaddrinfo() function.'
10879 echo ' or you can specify "--disable-ipv6"'.
10880 exit 1
10881 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010882else
Martin v. Löwis11437992002-04-12 09:54:03 +000010883
Matthias Kloseb9621712010-04-24 17:59:49 +000010884$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010885
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010886fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010887
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010888for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010889do :
10890 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Gregory P. Smith69140482012-01-16 02:05:55 -080010891if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010892 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010893#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010894_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010895
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010896fi
10897done
10898
Michael W. Hudson54241132001-12-07 15:38:26 +000010899
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010900# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10902$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010903if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010905else
Matthias Kloseb9621712010-04-24 17:59:49 +000010906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010907/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010908#include <sys/types.h>
10909#include <sys/time.h>
10910#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010911
Martin v. Löwis11437992002-04-12 09:54:03 +000010912int
10913main ()
10914{
10915if ((struct tm *) 0)
10916return 0;
10917 ;
10918 return 0;
10919}
10920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010921if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010922 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010923else
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10929$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010930if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010933
10934fi
10935
Matthias Kloseb9621712010-04-24 17:59:49 +000010936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10937$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010938if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010940else
Matthias Kloseb9621712010-04-24 17:59:49 +000010941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010942/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010943#include <sys/types.h>
10944#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010945
Martin v. Löwis11437992002-04-12 09:54:03 +000010946int
10947main ()
10948{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949struct tm tm;
10950 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010952 ;
10953 return 0;
10954}
10955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010956if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010957 ac_cv_struct_tm=time.h
10958else
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10964$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010965if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010968
10969fi
10970
Matthias Kloseb9621712010-04-24 17:59:49 +000010971ac_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 +000010972#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010973
Matthias Kloseb9621712010-04-24 17:59:49 +000010974"
Gregory P. Smith69140482012-01-16 02:05:55 -080010975if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010976
10977cat >>confdefs.h <<_ACEOF
10978#define HAVE_STRUCT_TM_TM_ZONE 1
10979_ACEOF
10980
10981
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010982fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010983
Martin v. Löwis11437992002-04-12 09:54:03 +000010984if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10985
Matthias Kloseb9621712010-04-24 17:59:49 +000010986$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010987
10988else
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10990"
Gregory P. Smith69140482012-01-16 02:05:55 -080010991if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993else
Matthias Kloseb9621712010-04-24 17:59:49 +000010994 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995fi
10996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010997cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010998#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999_ACEOF
11000
Matthias Kloseb9621712010-04-24 17:59:49 +000011001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11002$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011003if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011004 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011005else
Matthias Kloseb9621712010-04-24 17:59:49 +000011006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011007/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011008#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009#if !HAVE_DECL_TZNAME
11010extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011011#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011012
Martin v. Löwis11437992002-04-12 09:54:03 +000011013int
11014main ()
11015{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011017 ;
11018 return 0;
11019}
11020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011021if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011022 ac_cv_var_tzname=yes
11023else
Matthias Kloseb9621712010-04-24 17:59:49 +000011024 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011026rm -f core conftest.err conftest.$ac_objext \
11027 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11030$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011031 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011032
Matthias Kloseb9621712010-04-24 17:59:49 +000011033$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011034
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011035 fi
11036fi
11037
Matthias Kloseb9621712010-04-24 17:59:49 +000011038ac_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 -080011039if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011040
11041cat >>confdefs.h <<_ACEOF
11042#define HAVE_STRUCT_STAT_ST_RDEV 1
11043_ACEOF
11044
11045
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011046fi
11047
Matthias Kloseb9621712010-04-24 17:59:49 +000011048ac_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 -080011049if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011050
Martin v. Löwis11437992002-04-12 09:54:03 +000011051cat >>confdefs.h <<_ACEOF
11052#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11053_ACEOF
11054
11055
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011056fi
11057
Matthias Kloseb9621712010-04-24 17:59:49 +000011058ac_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 -080011059if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011060
11061cat >>confdefs.h <<_ACEOF
11062#define HAVE_STRUCT_STAT_ST_FLAGS 1
11063_ACEOF
11064
11065
11066fi
11067
Matthias Kloseb9621712010-04-24 17:59:49 +000011068ac_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 -080011069if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011070
11071cat >>confdefs.h <<_ACEOF
11072#define HAVE_STRUCT_STAT_ST_GEN 1
11073_ACEOF
11074
11075
11076fi
11077
Matthias Kloseb9621712010-04-24 17:59:49 +000011078ac_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 -080011079if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011080
11081cat >>confdefs.h <<_ACEOF
11082#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11083_ACEOF
11084
11085
11086fi
11087
Matthias Kloseb9621712010-04-24 17:59:49 +000011088ac_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 -080011089if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011090
Martin v. Löwis11437992002-04-12 09:54:03 +000011091cat >>confdefs.h <<_ACEOF
11092#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11093_ACEOF
11094
11095
Matthias Kloseb9621712010-04-24 17:59:49 +000011096$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011097
11098else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011099 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011100 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011101 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11102 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011103esac
11104
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011105fi
11106
Michael W. Hudson54241132001-12-07 15:38:26 +000011107
Martin v. Löwis11437992002-04-12 09:54:03 +000011108
Matthias Kloseb9621712010-04-24 17:59:49 +000011109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11110$as_echo_n "checking for time.h that defines altzone... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011111if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011112 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011113else
Matthias Kloseb159a552010-04-25 21:00:44 +000011114
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011116/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011117#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011118int
11119main ()
11120{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011121return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 ;
11123 return 0;
11124}
11125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011126if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011127 ac_cv_header_time_altzone=yes
11128else
Matthias Kloseb9621712010-04-24 17:59:49 +000011129 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011133fi
11134
Matthias Kloseb9621712010-04-24 17:59:49 +000011135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11136$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011137if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011138
Matthias Kloseb9621712010-04-24 17:59:49 +000011139$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011140
11141fi
11142
Guido van Rossumda88dad1995-01-26 00:46:29 +000011143was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11145$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011147/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011148
11149#include <sys/types.h>
11150#include <sys/select.h>
11151#include <sys/time.h>
11152
Martin v. Löwis11437992002-04-12 09:54:03 +000011153int
11154main ()
11155{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011156;
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 ;
11158 return 0;
11159}
11160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011161if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011162
11163
Matthias Kloseb9621712010-04-24 17:59:49 +000011164$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011165
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011166 was_it_defined=yes
11167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11171$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011172
Matthias Kloseb9621712010-04-24 17:59:49 +000011173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11174$as_echo_n "checking for addrinfo... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011175if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011176 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011177else
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011179/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011180#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011181int
11182main ()
11183{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011184struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011185 ;
11186 return 0;
11187}
11188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011189if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011190 ac_cv_struct_addrinfo=yes
11191else
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11195fi
11196
Matthias Kloseb9621712010-04-24 17:59:49 +000011197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11198$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011199if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011200
Matthias Kloseb9621712010-04-24 17:59:49 +000011201$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011202
11203fi
11204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11206$as_echo_n "checking for sockaddr_storage... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011207if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011208 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011209else
Matthias Kloseb9621712010-04-24 17:59:49 +000011210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011211/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011212
11213# include <sys/types.h>
11214# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011215int
11216main ()
11217{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011218struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011219 ;
11220 return 0;
11221}
11222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011223if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011224 ac_cv_struct_sockaddr_storage=yes
11225else
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11229fi
11230
Matthias Kloseb9621712010-04-24 17:59:49 +000011231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11232$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011233if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011234
Matthias Kloseb9621712010-04-24 17:59:49 +000011235$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011236
11237fi
11238
Guido van Rossum627b2d71993-12-24 10:39:16 +000011239# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011240
Matthias Kloseb9621712010-04-24 17:59:49 +000011241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11242$as_echo_n "checking whether char is unsigned... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011243if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011245else
Matthias Kloseb9621712010-04-24 17:59:49 +000011246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011248$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011249int
11250main ()
11251{
11252static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011253test_array [0] = 0;
11254return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011255
11256 ;
11257 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011258}
Martin v. Löwis11437992002-04-12 09:54:03 +000011259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011260if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011261 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011262else
Matthias Kloseb9621712010-04-24 17:59:49 +000011263 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11268$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011269if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011270 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011271
11272fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011273
Matthias Kloseb9621712010-04-24 17:59:49 +000011274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11275$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011276if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011277 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011278else
Matthias Kloseb9621712010-04-24 17:59:49 +000011279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011280/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011281
Martin v. Löwis11437992002-04-12 09:54:03 +000011282int
11283main ()
11284{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011285
Martin v. Löwis11437992002-04-12 09:54:03 +000011286#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011287 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011289 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291 char const *const *pcpcc;
11292 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011293 /* NEC SVR4.0.2 mips cc rejects this. */
11294 struct point {int x, y;};
11295 static struct point const zero = {0,0};
11296 /* AIX XL C 1.02.0.0 rejects this.
11297 It does not let you subtract one const X* pointer from another in
11298 an arm of an if-expression whose if-part is not a constant
11299 expression */
11300 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011301 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011303 ++pcpcc;
11304 ppc = (char**) pcpcc;
11305 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011306 { /* SCO 3.2v4 cc rejects this sort of thing. */
11307 char tx;
11308 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011309 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011310
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011312 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 }
11314 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11315 int x[] = {25, 17};
11316 const int *foo = &x[0];
11317 ++foo;
11318 }
11319 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11320 typedef const int *iptr;
11321 iptr p = 0;
11322 ++p;
11323 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011324 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011326 struct s { int j; const int *ap[3]; } bx;
11327 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 }
11329 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11330 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011331 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011333 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011334#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011335
Martin v. Löwis11437992002-04-12 09:54:03 +000011336 ;
11337 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011338}
Martin v. Löwis11437992002-04-12 09:54:03 +000011339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011340if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011341 ac_cv_c_const=yes
11342else
Matthias Kloseb9621712010-04-24 17:59:49 +000011343 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11348$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011349if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011350
Matthias Kloseb9621712010-04-24 17:59:49 +000011351$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011352
11353fi
11354
Michael W. Hudson54241132001-12-07 15:38:26 +000011355
Guido van Rossumda88dad1995-01-26 00:46:29 +000011356works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11358$as_echo_n "checking for working volatile... " >&6; }
11359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011360/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011361
Martin v. Löwis11437992002-04-12 09:54:03 +000011362int
11363main ()
11364{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011365volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011366 ;
11367 return 0;
11368}
11369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011370if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011371 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011372else
Skip Montanaro6dead952003-09-25 14:50:04 +000011373
Matthias Kloseb9621712010-04-24 17:59:49 +000011374$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011375
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011376
Guido van Rossum627b2d71993-12-24 10:39:16 +000011377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11380$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011381
Guido van Rossumda88dad1995-01-26 00:46:29 +000011382works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11384$as_echo_n "checking for working signed char... " >&6; }
11385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011386/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011387
Martin v. Löwis11437992002-04-12 09:54:03 +000011388int
11389main ()
11390{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011391signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 ;
11393 return 0;
11394}
11395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011396if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011397 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011398else
Skip Montanaro6dead952003-09-25 14:50:04 +000011399
Matthias Kloseb9621712010-04-24 17:59:49 +000011400$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011401
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011402
Guido van Rossum7f43da71994-08-01 12:15:30 +000011403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11406$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011407
Guido van Rossumda88dad1995-01-26 00:46:29 +000011408have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11410$as_echo_n "checking for prototypes... " >&6; }
11411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011412/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011413int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011414int
11415main ()
11416{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011417return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 ;
11419 return 0;
11420}
11421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011423
Matthias Kloseb9621712010-04-24 17:59:49 +000011424$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011425
Matthias Kloseb159a552010-04-25 21:00:44 +000011426 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11430$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011431
Guido van Rossumda88dad1995-01-26 00:46:29 +000011432works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11434$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011436/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011437
11438#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011439int foo(int x, ...) {
11440 va_list va;
11441 va_start(va, x);
11442 va_arg(va, int);
11443 va_arg(va, char *);
11444 va_arg(va, double);
11445 return 0;
11446}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011447
Martin v. Löwis11437992002-04-12 09:54:03 +000011448int
11449main ()
11450{
Guido van Rossum90eea071996-08-30 20:58:57 +000011451return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011452 ;
11453 return 0;
11454}
11455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011457
11458
Matthias Kloseb9621712010-04-24 17:59:49 +000011459$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011460
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011461 works=yes
11462
Guido van Rossum627b2d71993-12-24 10:39:16 +000011463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11466$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011467
Martin v. Löwisd6320502004-08-12 13:45:08 +000011468# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11470$as_echo_n "checking for socketpair... " >&6; }
11471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011472/* end confdefs.h. */
11473
11474#include <sys/types.h>
11475#include <sys/socket.h>
11476
11477int
11478main ()
11479{
11480void *x=socketpair
11481 ;
11482 return 0;
11483}
11484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011486
Matthias Kloseb9621712010-04-24 17:59:49 +000011487$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011488
Matthias Kloseb159a552010-04-25 21:00:44 +000011489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011490$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011491else
Matthias Kloseb9621712010-04-24 17:59:49 +000011492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11493$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011494
11495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011497
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011498# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11500$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011502/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011503#include <sys/types.h>
11504#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011505int
11506main ()
11507{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011508struct sockaddr x;
11509x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 ;
11511 return 0;
11512}
11513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011514if ac_fn_c_try_compile "$LINENO"; then :
11515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11516$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011517
Matthias Kloseb9621712010-04-24 17:59:49 +000011518$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011519
11520else
Matthias Kloseb9621712010-04-24 17:59:49 +000011521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11522$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011523
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011526
Guido van Rossumda88dad1995-01-26 00:46:29 +000011527va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11529$as_echo_n "checking whether va_list is an array... " >&6; }
11530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011531/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011532
11533#ifdef HAVE_STDARG_PROTOTYPES
11534#include <stdarg.h>
11535#else
11536#include <varargs.h>
11537#endif
11538
Martin v. Löwis11437992002-04-12 09:54:03 +000011539int
11540main ()
11541{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011542va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 ;
11544 return 0;
11545}
11546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011547if ac_fn_c_try_compile "$LINENO"; then :
11548
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011549else
Skip Montanaro6dead952003-09-25 14:50:04 +000011550
Martin v. Löwis11437992002-04-12 09:54:03 +000011551
Matthias Kloseb9621712010-04-24 17:59:49 +000011552$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011553
Guido van Rossumda88dad1995-01-26 00:46:29 +000011554 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011555
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11559$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011560
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011561# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011562
11563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Gregory P. Smith69140482012-01-16 02:05:55 -080011565if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011568
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11570$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011571 OLD_CFLAGS=$CFLAGS
11572 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011574/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011575
11576# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011577
Martin v. Löwis11437992002-04-12 09:54:03 +000011578int
11579main ()
11580{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011581
11582 char *name;
11583 struct hostent *he, *res;
11584 char buffer[2048];
11585 int buflen = 2048;
11586 int h_errnop;
11587
11588 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011589
11590 ;
11591 return 0;
11592}
11593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011594if ac_fn_c_try_compile "$LINENO"; 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
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011597
Martin v. Löwis11437992002-04-12 09:54:03 +000011598
Matthias Kloseb9621712010-04-24 17:59:49 +000011599$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011600
Matthias Kloseb9621712010-04-24 17:59:49 +000011601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11602$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011603
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011604else
Skip Montanaro6dead952003-09-25 14:50:04 +000011605
Matthias Kloseb9621712010-04-24 17:59:49 +000011606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11607$as_echo "no" >&6; }
11608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11609$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011611/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011612
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011613# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011614
Martin v. Löwis11437992002-04-12 09:54:03 +000011615int
11616main ()
11617{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011618
11619 char *name;
11620 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011621 char buffer[2048];
11622 int buflen = 2048;
11623 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011624
Matthias Kloseb159a552010-04-25 21:00:44 +000011625 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011626
11627 ;
11628 return 0;
11629}
11630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011631if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011632
Matthias Kloseb9621712010-04-24 17:59:49 +000011633 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011634
Martin v. Löwis11437992002-04-12 09:54:03 +000011635
Matthias Kloseb159a552010-04-25 21:00:44 +000011636$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011637
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11639$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011640
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011641else
Skip Montanaro6dead952003-09-25 14:50:04 +000011642
Matthias Kloseb9621712010-04-24 17:59:49 +000011643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11644$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11646$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11648/* end confdefs.h. */
11649
11650# include <netdb.h>
11651
11652int
11653main ()
11654{
11655
11656 char *name;
11657 struct hostent *he;
11658 struct hostent_data data;
11659
11660 (void) gethostbyname_r(name, he, &data);
11661
11662 ;
11663 return 0;
11664}
11665_ACEOF
11666if ac_fn_c_try_compile "$LINENO"; then :
11667
11668 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11669
11670
11671$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11672
11673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11674$as_echo "yes" >&6; }
11675
11676else
11677
11678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11679$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011680
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011683
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011686
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011689 CFLAGS=$OLD_CFLAGS
11690
11691else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011692
Matthias Kloseb9621712010-04-24 17:59:49 +000011693 for ac_func in gethostbyname
11694do :
11695 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Gregory P. Smith69140482012-01-16 02:05:55 -080011696if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011697 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011698#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011699_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011700
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011701fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011702done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011703
Michael W. Hudson54241132001-12-07 15:38:26 +000011704
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011705fi
11706
Michael W. Hudson54241132001-12-07 15:38:26 +000011707
11708
11709
11710
11711
11712
Guido van Rossum627b2d71993-12-24 10:39:16 +000011713# checks for system services
11714# (none yet)
11715
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011716# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011717ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Gregory P. Smith69140482012-01-16 02:05:55 -080011718if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011719
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011720else
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11722$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011723if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011724 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011725else
Martin v. Löwis11437992002-04-12 09:54:03 +000011726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011727LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011731/* Override any GCC internal prototype to avoid an error.
11732 Use char because int might match the return type of a GCC
11733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011734#ifdef __cplusplus
11735extern "C"
11736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011737char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011738int
11739main ()
11740{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011741return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011742 ;
11743 return 0;
11744}
11745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011746if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011747 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011748else
Matthias Kloseb9621712010-04-24 17:59:49 +000011749 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011751rm -f core conftest.err conftest.$ac_objext \
11752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011753LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11756$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011757if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011758 cat >>confdefs.h <<_ACEOF
11759#define HAVE_LIBIEEE 1
11760_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011761
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011762 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011763
Guido van Rossum627b2d71993-12-24 10:39:16 +000011764fi
11765
Michael W. Hudson54241132001-12-07 15:38:26 +000011766
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011767fi
11768
Michael W. Hudson54241132001-12-07 15:38:26 +000011769
Guido van Rossum7f253911997-05-09 02:42:48 +000011770# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11772$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011774# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011775if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011776 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011777if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011778then
11779
Matthias Kloseb9621712010-04-24 17:59:49 +000011780$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011781
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11783$as_echo "yes" >&6; }
11784else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11785$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011786fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011787else
Matthias Kloseb9621712010-04-24 17:59:49 +000011788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11789$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011790fi
11791
Guido van Rossum7f253911997-05-09 02:42:48 +000011792
Guido van Rossum7f43da71994-08-01 12:15:30 +000011793# check for --with-libm=...
11794
Guido van Rossum563e7081996-09-10 18:20:48 +000011795case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011796Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011797*) LIBM=-lm
11798esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11800$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011802# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011803if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011804 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011805if test "$withval" = no
11806then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11808$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011809elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011810then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11812$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011813else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011814fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011815else
Matthias Kloseb9621712010-04-24 17:59:49 +000011816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11817$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011818fi
11819
Guido van Rossum7f43da71994-08-01 12:15:30 +000011820
11821# check for --with-libc=...
11822
Matthias Kloseb9621712010-04-24 17:59:49 +000011823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11824$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011826# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011827if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011828 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011829if test "$withval" = no
11830then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11832$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011833elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011834then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11836$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011837else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011838fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011839else
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11841$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011842fi
11843
Guido van Rossum7f43da71994-08-01 12:15:30 +000011844
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011845# **************************************************
11846# * Check for various properties of floating point *
11847# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011848
Matthias Kloseb9621712010-04-24 17:59:49 +000011849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11850$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011851if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011853else
11854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011856 ac_cv_little_endian_double=no
11857else
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011859/* end confdefs.h. */
11860
11861#include <string.h>
11862int main() {
11863 double x = 9006104071832581.0;
11864 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11865 return 0;
11866 else
11867 return 1;
11868}
11869
11870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011871if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011872 ac_cv_little_endian_double=yes
11873else
Matthias Kloseb9621712010-04-24 17:59:49 +000011874 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11877 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011878fi
11879
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011880fi
11881
Matthias Kloseb9621712010-04-24 17:59:49 +000011882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11883$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011884if test "$ac_cv_little_endian_double" = yes
11885then
11886
Matthias Kloseb9621712010-04-24 17:59:49 +000011887$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011888
11889fi
11890
Matthias Kloseb9621712010-04-24 17:59:49 +000011891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11892$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011893if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011895else
11896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011898 ac_cv_big_endian_double=no
11899else
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011901/* end confdefs.h. */
11902
11903#include <string.h>
11904int main() {
11905 double x = 9006104071832581.0;
11906 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11907 return 0;
11908 else
11909 return 1;
11910}
11911
11912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011913if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011914 ac_cv_big_endian_double=yes
11915else
Matthias Kloseb9621712010-04-24 17:59:49 +000011916 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11919 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011920fi
11921
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011922fi
11923
Matthias Kloseb9621712010-04-24 17:59:49 +000011924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11925$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011926if test "$ac_cv_big_endian_double" = yes
11927then
11928
Matthias Kloseb9621712010-04-24 17:59:49 +000011929$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011930
11931fi
11932
11933# Some ARM platforms use a mixed-endian representation for doubles.
11934# While Python doesn't currently have full support for these platforms
11935# (see e.g., issue 1762561), we can at least make sure that float <-> string
11936# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11938$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011939if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011940 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011941else
11942
Matthias Kloseb9621712010-04-24 17:59:49 +000011943if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011944 ac_cv_mixed_endian_double=no
11945else
Matthias Kloseb9621712010-04-24 17:59:49 +000011946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011947/* end confdefs.h. */
11948
11949#include <string.h>
11950int main() {
11951 double x = 9006104071832581.0;
11952 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11953 return 0;
11954 else
11955 return 1;
11956}
11957
11958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011959if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011960 ac_cv_mixed_endian_double=yes
11961else
Matthias Kloseb9621712010-04-24 17:59:49 +000011962 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11965 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011966fi
11967
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011968fi
11969
Matthias Kloseb9621712010-04-24 17:59:49 +000011970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11971$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011972if test "$ac_cv_mixed_endian_double" = yes
11973then
11974
Matthias Kloseb9621712010-04-24 17:59:49 +000011975$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011976
11977fi
11978
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011979# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011980# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011981# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011982# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011983# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011984# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011985
11986# This inline assembler syntax may also work for suncc and icc,
11987# so we try it on all platforms.
11988
Matthias Kloseb9621712010-04-24 17:59:49 +000011989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11990$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011992/* end confdefs.h. */
11993
11994int
11995main ()
11996{
11997
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011998 unsigned short cw;
11999 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12000 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012001
12002 ;
12003 return 0;
12004}
12005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012006if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012007 have_gcc_asm_for_x87=yes
12008else
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012010fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12013$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012014if test "$have_gcc_asm_for_x87" = yes
12015then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012016
Matthias Kloseb9621712010-04-24 17:59:49 +000012017$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012018
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012020
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012021# Detect whether system arithmetic is subject to x87-style double
12022# rounding issues. The result of this test has little meaning on non
12023# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12024# mode is round-to-nearest and double rounding issues are present, and
12025# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12027$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012028# $BASECFLAGS may affect the result
12029ac_save_cc="$CC"
12030CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012031if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012032 ac_cv_x87_double_rounding=no
12033else
Matthias Kloseb9621712010-04-24 17:59:49 +000012034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012035/* end confdefs.h. */
12036
12037#include <stdlib.h>
12038#include <math.h>
12039int main() {
12040 volatile double x, y, z;
12041 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12042 x = 0.99999999999999989; /* 1-2**-53 */
12043 y = 1./x;
12044 if (y != 1.)
12045 exit(0);
12046 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12047 x = 1e16;
12048 y = 2.99999;
12049 z = x + y;
12050 if (z != 1e16+4.)
12051 exit(0);
12052 /* both tests show evidence of double rounding */
12053 exit(1);
12054}
12055
12056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012057if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012058 ac_cv_x87_double_rounding=no
12059else
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12063 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012064fi
12065
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012066CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12068$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012069if test "$ac_cv_x87_double_rounding" = yes
12070then
12071
Matthias Kloseb9621712010-04-24 17:59:49 +000012072$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012073
12074fi
12075
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012076# ************************************
12077# * Check for mathematical functions *
12078# ************************************
12079
12080LIBS_SAVE=$LIBS
12081LIBS="$LIBS $LIBM"
12082
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012083for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12084do :
12085 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12086ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012087if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012088 cat >>confdefs.h <<_ACEOF
12089#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12090_ACEOF
12091
12092fi
12093done
12094
12095for ac_func in hypot lgamma log1p round tgamma
12096do :
12097 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12098ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012099if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012100 cat >>confdefs.h <<_ACEOF
12101#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12102_ACEOF
12103
12104fi
12105done
12106
12107ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12108"
Gregory P. Smith69140482012-01-16 02:05:55 -080012109if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012110 ac_have_decl=1
12111else
12112 ac_have_decl=0
12113fi
12114
12115cat >>confdefs.h <<_ACEOF
12116#define HAVE_DECL_ISINF $ac_have_decl
12117_ACEOF
12118ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12119"
Gregory P. Smith69140482012-01-16 02:05:55 -080012120if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012121 ac_have_decl=1
12122else
12123 ac_have_decl=0
12124fi
12125
12126cat >>confdefs.h <<_ACEOF
12127#define HAVE_DECL_ISNAN $ac_have_decl
12128_ACEOF
12129ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12130"
Gregory P. Smith69140482012-01-16 02:05:55 -080012131if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012132 ac_have_decl=1
12133else
12134 ac_have_decl=0
12135fi
12136
12137cat >>confdefs.h <<_ACEOF
12138#define HAVE_DECL_ISFINITE $ac_have_decl
12139_ACEOF
12140
12141
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012142# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12143# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12145$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012146if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012148else
12149
Matthias Kloseb9621712010-04-24 17:59:49 +000012150if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012151 ac_cv_tanh_preserves_zero_sign=no
12152else
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012154/* end confdefs.h. */
12155
12156#include <math.h>
12157#include <stdlib.h>
12158int main() {
12159 /* return 0 if either negative zeros don't exist
12160 on this platform or if negative zeros exist
12161 and tanh(-0.) == -0. */
12162 if (atan2(0., -1.) == atan2(-0., -1.) ||
12163 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12164 else exit(1);
12165}
12166
12167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012168if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012169 ac_cv_tanh_preserves_zero_sign=yes
12170else
Matthias Kloseb9621712010-04-24 17:59:49 +000012171 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12174 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012175fi
12176
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012177fi
12178
Matthias Kloseb9621712010-04-24 17:59:49 +000012179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12180$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012181if test "$ac_cv_tanh_preserves_zero_sign" = yes
12182then
12183
Matthias Kloseb9621712010-04-24 17:59:49 +000012184$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012185
12186fi
12187
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012188if test "$ac_cv_func_log1p" = yes
12189then
12190 # On some versions of AIX, log1p(-0.) returns 0. instead of
12191 # -0. See issue #9920.
12192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12193$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012194 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012195 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012196else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012197
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012198 if test "$cross_compiling" = yes; then :
12199 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012200else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12202/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012203
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012204 #include <math.h>
12205 #include <stdlib.h>
12206 int main() {
12207 /* Fail if the signs of log1p(-0.) and -0. can be
12208 distinguished. */
12209 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12210 return 0;
12211 else
12212 return 1;
12213 }
12214
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012215_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012216if ac_fn_c_try_run "$LINENO"; then :
12217 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012218else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012219 ac_cv_log1p_drops_zero_sign=yes
12220fi
12221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12222 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012223fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012224
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012225fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012226
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12228$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12229fi
12230if test "$ac_cv_log1p_drops_zero_sign" = yes
12231then
12232
12233$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12234
12235fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012236
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012237LIBS=$LIBS_SAVE
12238
Mark Dickinsona614f042009-11-28 12:48:43 +000012239# For multiprocessing module, check that sem_open
12240# actually works. For FreeBSD versions <= 7.2,
12241# the kernel module that provides POSIX semaphores
12242# isn't loaded by default, so an attempt to call
12243# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12245$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012246if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012248else
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012250 ac_cv_posix_semaphores_enabled=yes
12251else
Matthias Kloseb9621712010-04-24 17:59:49 +000012252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012253/* end confdefs.h. */
12254
12255#include <unistd.h>
12256#include <fcntl.h>
12257#include <stdio.h>
12258#include <semaphore.h>
12259#include <sys/stat.h>
12260
12261int main(void) {
12262 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12263 if (a == SEM_FAILED) {
12264 perror("sem_open");
12265 return 1;
12266 }
12267 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012268 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012269 return 0;
12270}
12271
12272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012273if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012274 ac_cv_posix_semaphores_enabled=yes
12275else
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12279 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012280fi
12281
12282
Mark Dickinsona614f042009-11-28 12:48:43 +000012283fi
12284
Matthias Kloseb9621712010-04-24 17:59:49 +000012285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12286$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012287if test $ac_cv_posix_semaphores_enabled = no
12288then
12289
Matthias Kloseb9621712010-04-24 17:59:49 +000012290$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012291
12292fi
12293
Mark Dickinson10683072009-04-18 21:18:19 +000012294# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12296$as_echo_n "checking for broken sem_getvalue... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012297if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012299else
Matthias Kloseb9621712010-04-24 17:59:49 +000012300 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012301 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012302else
Matthias Kloseb9621712010-04-24 17:59:49 +000012303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012304/* end confdefs.h. */
12305
12306#include <unistd.h>
12307#include <fcntl.h>
12308#include <stdio.h>
12309#include <semaphore.h>
12310#include <sys/stat.h>
12311
12312int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012313 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012314 int count;
12315 int res;
12316 if(a==SEM_FAILED){
12317 perror("sem_open");
12318 return 1;
12319
12320 }
12321 res = sem_getvalue(a, &count);
12322 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012323 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012324 return res==-1 ? 1 : 0;
12325}
12326
Mark Dickinson10683072009-04-18 21:18:19 +000012327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012328if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012329 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012330else
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012333rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12334 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012335fi
12336
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012337
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012338fi
12339
Matthias Kloseb9621712010-04-24 17:59:49 +000012340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12341$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012342if test $ac_cv_broken_sem_getvalue = yes
12343then
12344
Matthias Kloseb9621712010-04-24 17:59:49 +000012345$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012346
12347fi
12348
Mark Dickinsonbd792642009-03-18 20:06:12 +000012349# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12351$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012352# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012353if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012354 enableval=$enable_big_digits; case $enable_big_digits in
12355yes)
12356 enable_big_digits=30 ;;
12357no)
12358 enable_big_digits=15 ;;
1235915|30)
12360 ;;
12361*)
Gregory P. Smith69140482012-01-16 02:05:55 -080012362 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 +000012363esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12365$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012366
12367cat >>confdefs.h <<_ACEOF
12368#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12369_ACEOF
12370
12371
12372else
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12374$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012375fi
12376
12377
Guido van Rossumef2255b2000-03-10 22:30:29 +000012378# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012379ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080012380if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012381
12382
Matthias Kloseb9621712010-04-24 17:59:49 +000012383$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012384
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012385 wchar_h="yes"
12386
Guido van Rossumef2255b2000-03-10 22:30:29 +000012387else
Martin v. Löwis11437992002-04-12 09:54:03 +000012388 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012389
12390fi
12391
Michael W. Hudson54241132001-12-07 15:38:26 +000012392
Martin v. Löwis11437992002-04-12 09:54:03 +000012393
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012394# determine wchar_t size
12395if test "$wchar_h" = yes
12396then
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012398# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12399# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12400# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12402$as_echo_n "checking size of wchar_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012403if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012404 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012405else
Matthias Kloseb9621712010-04-24 17:59:49 +000012406 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12407"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012408
Martin v. Löwis11437992002-04-12 09:54:03 +000012409else
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 if test "$ac_cv_type_wchar_t" = yes; then
12411 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12412$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012413as_fn_error 77 "cannot compute sizeof (wchar_t)
Gregory P. Smith69140482012-01-16 02:05:55 -080012414See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012415 else
12416 ac_cv_sizeof_wchar_t=0
12417 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012419
Martin v. Löwis11437992002-04-12 09:54:03 +000012420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12422$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423
12424
12425
Martin v. Löwis11437992002-04-12 09:54:03 +000012426cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012427#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012428_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012429
Michael W. Hudson54241132001-12-07 15:38:26 +000012430
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012431fi
12432
Matthias Kloseb9621712010-04-24 17:59:49 +000012433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12434$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012435have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012437/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012438
12439#include <tcl.h>
12440#if TCL_UTF_MAX != 6
12441# error "NOT UCS4_TCL"
12442#endif
12443int
12444main ()
12445{
12446
12447 ;
12448 return 0;
12449}
12450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012452
12453
Matthias Kloseb9621712010-04-24 17:59:49 +000012454$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012455
12456 have_ucs4_tcl=yes
12457
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12461$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012462
Skip Montanaro6dead952003-09-25 14:50:04 +000012463# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012464if test "$wchar_h" = yes
12465then
12466 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12468$as_echo_n "checking whether wchar_t is signed... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012469 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012471else
12472
Matthias Kloseb9621712010-04-24 17:59:49 +000012473 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012474 ac_cv_wchar_t_signed=yes
12475else
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012477/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012478
12479 #include <wchar.h>
12480 int main()
12481 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012482 /* Success: exit code 0 */
12483 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012484 }
12485
12486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012487if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012488 ac_cv_wchar_t_signed=yes
12489else
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12493 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012494fi
12495
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012496fi
12497
Matthias Kloseb9621712010-04-24 17:59:49 +000012498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12499$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500fi
12501
Matthias Kloseb9621712010-04-24 17:59:49 +000012502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12503$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012504
12505# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012506if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012507 withval=$with_wide_unicode;
12508if test "$withval" != no
12509then unicode_size="4"
12510else unicode_size="2"
12511fi
12512
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012513else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012514
Georg Brandl52d168a2008-01-07 18:10:24 +000012515case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012516 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012517 *) unicode_size="2" ;;
12518esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012519
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012520fi
12521
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012522
12523
Georg Brandl52d168a2008-01-07 18:10:24 +000012524case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012525 4)
12526 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12527
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012528 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012529 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012530 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012531 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012532esac
12533
Michael W. Hudson54241132001-12-07 15:38:26 +000012534
Martin v. Löwis11437992002-04-12 09:54:03 +000012535
Georg Brandl52d168a2008-01-07 18:10:24 +000012536# wchar_t is only usable if it maps to an unsigned type
12537if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012538 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012539then
12540 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012541
Matthias Kloseb9621712010-04-24 17:59:49 +000012542$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012543
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012545
Georg Brandl52d168a2008-01-07 18:10:24 +000012546elif test "$ac_cv_sizeof_short" = "$unicode_size"
12547then
12548 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012549 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012550
Georg Brandl52d168a2008-01-07 18:10:24 +000012551elif test "$ac_cv_sizeof_long" = "$unicode_size"
12552then
12553 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012554 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012555
Georg Brandl52d168a2008-01-07 18:10:24 +000012556else
12557 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12560$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012561
12562# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12564$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012565if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012567else
Matthias Kloseb9621712010-04-24 17:59:49 +000012568 ac_cv_c_bigendian=unknown
12569 # See if we're dealing with a universal compiler.
12570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12571/* end confdefs.h. */
12572#ifndef __APPLE_CC__
12573 not a universal capable compiler
12574 #endif
12575 typedef int dummy;
12576
Skip Montanaro6dead952003-09-25 14:50:04 +000012577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012578if ac_fn_c_try_compile "$LINENO"; then :
12579
12580 # Check for potential -arch flags. It is not universal unless
12581 # there are at least two -arch flags with different values.
12582 ac_arch=
12583 ac_prev=
12584 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12585 if test -n "$ac_prev"; then
12586 case $ac_word in
12587 i?86 | x86_64 | ppc | ppc64)
12588 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12589 ac_arch=$ac_word
12590 else
12591 ac_cv_c_bigendian=universal
12592 break
12593 fi
12594 ;;
12595 esac
12596 ac_prev=
12597 elif test "x$ac_word" = "x-arch"; then
12598 ac_prev=arch
12599 fi
12600 done
12601fi
12602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12603 if test $ac_cv_c_bigendian = unknown; then
12604 # See if sys/param.h defines the BYTE_ORDER macro.
12605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012606/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012607#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012609
Martin v. Löwis11437992002-04-12 09:54:03 +000012610int
12611main ()
12612{
Matthias Kloseb9621712010-04-24 17:59:49 +000012613#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12614 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12615 && LITTLE_ENDIAN)
12616 bogus endian macros
12617 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012618
12619 ;
12620 return 0;
12621}
12622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012623if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012624 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012626/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012627#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012629
Martin v. Löwis11437992002-04-12 09:54:03 +000012630int
12631main ()
12632{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012633#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012634 not big endian
12635 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012636
12637 ;
12638 return 0;
12639}
12640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012641if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012642 ac_cv_c_bigendian=yes
12643else
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012647fi
12648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12649 fi
12650 if test $ac_cv_c_bigendian = unknown; then
12651 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012653/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012654#include <limits.h>
12655
Martin v. Löwis11437992002-04-12 09:54:03 +000012656int
12657main ()
12658{
Matthias Kloseb9621712010-04-24 17:59:49 +000012659#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12660 bogus endian macros
12661 #endif
12662
Martin v. Löwis11437992002-04-12 09:54:03 +000012663 ;
12664 return 0;
12665}
12666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012667if ac_fn_c_try_compile "$LINENO"; then :
12668 # It does; now see whether it defined to _BIG_ENDIAN or not.
12669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12670/* end confdefs.h. */
12671#include <limits.h>
12672
12673int
12674main ()
12675{
12676#ifndef _BIG_ENDIAN
12677 not big endian
12678 #endif
12679
12680 ;
12681 return 0;
12682}
12683_ACEOF
12684if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012685 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012686else
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12690fi
12691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12692 fi
12693 if test $ac_cv_c_bigendian = unknown; then
12694 # Compile a test program.
12695 if test "$cross_compiling" = yes; then :
12696 # Try to guess by grepping values from an object file.
12697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12698/* end confdefs.h. */
12699short int ascii_mm[] =
12700 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12701 short int ascii_ii[] =
12702 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12703 int use_ascii (int i) {
12704 return ascii_mm[i] + ascii_ii[i];
12705 }
12706 short int ebcdic_ii[] =
12707 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12708 short int ebcdic_mm[] =
12709 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12710 int use_ebcdic (int i) {
12711 return ebcdic_mm[i] + ebcdic_ii[i];
12712 }
12713 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715int
12716main ()
12717{
12718return use_ascii (foo) == use_ebcdic (foo);
12719 ;
12720 return 0;
12721}
12722_ACEOF
12723if ac_fn_c_try_compile "$LINENO"; then :
12724 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12725 ac_cv_c_bigendian=yes
12726 fi
12727 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12728 if test "$ac_cv_c_bigendian" = unknown; then
12729 ac_cv_c_bigendian=no
12730 else
12731 # finding both strings is unlikely to happen, but who knows?
12732 ac_cv_c_bigendian=unknown
12733 fi
12734 fi
12735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012737else
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012739/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012740$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012741int
12742main ()
12743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012744
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 /* Are we little or big endian? From Harbison&Steele. */
12746 union
12747 {
12748 long int l;
12749 char c[sizeof (long int)];
12750 } u;
12751 u.l = 1;
12752 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012753
12754 ;
12755 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012756}
Martin v. Löwis11437992002-04-12 09:54:03 +000012757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012758if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012759 ac_cv_c_bigendian=no
12760else
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012762fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12764 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12770$as_echo "$ac_cv_c_bigendian" >&6; }
12771 case $ac_cv_c_bigendian in #(
12772 yes)
12773 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12774;; #(
12775 no)
12776 ;; #(
12777 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012778
Matthias Kloseb9621712010-04-24 17:59:49 +000012779$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 ;; #(
12782 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012783 as_fn_error $? "unknown endianness
Gregory P. Smith69140482012-01-16 02:05:55 -080012784 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012785 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012786
Michael W. Hudson54241132001-12-07 15:38:26 +000012787
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012788# ABI version string for Python extension modules. This appears between the
12789# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12790# from the following attributes which affect the ABI of this Python build (in
12791# this order):
12792#
12793# * The Python implementation (always 'cpython-' for us)
12794# * The major and minor version numbers
12795# * --with-pydebug (adds a 'd')
12796# * --with-pymalloc (adds a 'm')
12797# * --with-wide-unicode (adds a 'u')
12798#
12799# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012800# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12801# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012802
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12804$as_echo_n "checking ABIFLAGS... " >&6; }
12805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12806$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12808$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012809SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12811$as_echo "$SOABI" >&6; }
12812
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12814$as_echo_n "checking LDVERSION... " >&6; }
12815LDVERSION='$(VERSION)$(ABIFLAGS)'
12816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12817$as_echo "$LDVERSION" >&6; }
12818
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012819# SO is the extension of shared libraries `(including the dot!)
12820# -- usually .so, .sl on HP-UX, .dll on Cygwin
12821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12822$as_echo_n "checking SO... " >&6; }
12823if test -z "$SO"
12824then
12825 case $ac_sys_system in
12826 hp*|HP*)
12827 case `uname -m` in
12828 ia64) SO=.so;;
12829 *) SO=.sl;;
12830 esac
12831 ;;
12832 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012833 Linux*|GNU*)
12834 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012835 *) SO=.so;;
12836 esac
12837else
12838 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012839 echo
12840 echo '====================================================================='
12841 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012842 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012843 echo '+ Do you really mean to change the extension for shared libraries? +'
12844 echo '+ Continuing in 10 seconds to let you to ponder. +'
12845 echo '+ +'
12846 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012847 sleep 10
12848fi
12849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12850$as_echo "$SO" >&6; }
12851
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012852# Check whether right shifting a negative integer extends the sign bit
12853# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12855$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012856if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012858else
Martin v. Löwis11437992002-04-12 09:54:03 +000012859
Matthias Kloseb9621712010-04-24 17:59:49 +000012860if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012861 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012862else
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012864/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012865
12866int main()
12867{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012868 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012869}
12870
Martin v. Löwis11437992002-04-12 09:54:03 +000012871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012872if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012873 ac_cv_rshift_extends_sign=yes
12874else
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012879fi
12880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881fi
12882
Matthias Kloseb9621712010-04-24 17:59:49 +000012883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12884$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012885if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012886then
Martin v. Löwis11437992002-04-12 09:54:03 +000012887
Matthias Kloseb9621712010-04-24 17:59:49 +000012888$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012889
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012890fi
12891
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012892# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12894$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012895if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012897else
Martin v. Löwis11437992002-04-12 09:54:03 +000012898
Matthias Kloseb9621712010-04-24 17:59:49 +000012899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012900/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012901#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012902int
12903main ()
12904{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012905
12906 FILE *f = fopen("/dev/null", "r");
12907 flockfile(f);
12908 getc_unlocked(f);
12909 funlockfile(f);
12910
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 ;
12912 return 0;
12913}
12914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012915if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012916 ac_cv_have_getc_unlocked=yes
12917else
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 ac_cv_have_getc_unlocked=no
12919fi
12920rm -f core conftest.err conftest.$ac_objext \
12921 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923
Matthias Kloseb9621712010-04-24 17:59:49 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12925$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012926if test "$ac_cv_have_getc_unlocked" = yes
12927then
Martin v. Löwis11437992002-04-12 09:54:03 +000012928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012930
12931fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012932
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012933# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012934# save the value of LIBS so we don't actually link Python with readline
12935LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012936
Gregory P. Smith18820942008-09-07 06:24:49 +000012937# On some systems we need to link readline to a termcap compatible
12938# library. NOTE: Keep the precedence of listed libraries synchronised
12939# with setup.py.
12940py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12942$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012943for py_libtermcap in "" ncursesw ncurses curses termcap; do
12944 if test -z "$py_libtermcap"; then
12945 READLINE_LIBS="-lreadline"
12946 else
12947 READLINE_LIBS="-lreadline -l$py_libtermcap"
12948 fi
12949 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012951/* end confdefs.h. */
12952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953/* Override any GCC internal prototype to avoid an error.
12954 Use char because int might match the return type of a GCC
12955 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012956#ifdef __cplusplus
12957extern "C"
12958#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012959char readline ();
12960int
12961main ()
12962{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012964 ;
12965 return 0;
12966}
12967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012968if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012969 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012971rm -f core conftest.err conftest.$ac_objext \
12972 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012973 if test $py_cv_lib_readline = yes; then
12974 break
12975 fi
12976done
12977# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12978#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012979if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12981$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012982else
Matthias Kloseb9621712010-04-24 17:59:49 +000012983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12984$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012987
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012988fi
12989
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012990# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12992$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012993if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012995else
12996 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012997LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012999/* end confdefs.h. */
13000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013001/* Override any GCC internal prototype to avoid an error.
13002 Use char because int might match the return type of a GCC
13003 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013004#ifdef __cplusplus
13005extern "C"
13006#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013007char rl_callback_handler_install ();
13008int
13009main ()
13010{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013011return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013012 ;
13013 return 0;
13014}
13015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013016if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013017 ac_cv_lib_readline_rl_callback_handler_install=yes
13018else
Matthias Kloseb9621712010-04-24 17:59:49 +000013019 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013021rm -f core conftest.err conftest.$ac_objext \
13022 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013023LIBS=$ac_check_lib_save_LIBS
13024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13026$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013027if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013030
13031fi
13032
13033
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013034# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013036/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013037#include <readline/readline.h>
13038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013039if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013040 have_readline=yes
13041else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013042 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013043
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013044fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013045rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013046if test $have_readline = yes
13047then
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013049/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013050#include <readline/readline.h>
13051
13052_ACEOF
13053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013054 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013055
Matthias Kloseb9621712010-04-24 17:59:49 +000013056$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013057
13058fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013059rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013060
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013062/* end confdefs.h. */
13063#include <readline/readline.h>
13064
13065_ACEOF
13066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013070
13071fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013072rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013073
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013074fi
13075
Martin v. Löwis0daad592001-09-30 21:09:59 +000013076# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13078$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013079if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013080 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013081else
Martin v. Löwis11437992002-04-12 09:54:03 +000013082 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013083LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013087/* Override any GCC internal prototype to avoid an error.
13088 Use char because int might match the return type of a GCC
13089 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013090#ifdef __cplusplus
13091extern "C"
13092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013093char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013094int
13095main ()
13096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013097return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013098 ;
13099 return 0;
13100}
13101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013102if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013103 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013104else
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013107rm -f core conftest.err conftest.$ac_objext \
13108 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013109LIBS=$ac_check_lib_save_LIBS
13110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13112$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013113if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013114
Matthias Kloseb9621712010-04-24 17:59:49 +000013115$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013116
Martin v. Löwis0daad592001-09-30 21:09:59 +000013117fi
13118
Michael W. Hudson54241132001-12-07 15:38:26 +000013119
Thomas Wouters89d996e2007-09-08 17:39:28 +000013120# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13122$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013123if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013125else
13126 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013127LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013129/* end confdefs.h. */
13130
13131/* Override any GCC internal prototype to avoid an error.
13132 Use char because int might match the return type of a GCC
13133 builtin and then its argument prototype would still apply. */
13134#ifdef __cplusplus
13135extern "C"
13136#endif
13137char rl_completion_display_matches_hook ();
13138int
13139main ()
13140{
13141return rl_completion_display_matches_hook ();
13142 ;
13143 return 0;
13144}
13145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013146if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013147 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013151rm -f core conftest.err conftest.$ac_objext \
13152 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013153LIBS=$ac_check_lib_save_LIBS
13154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13156$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013157if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013158
Matthias Kloseb9621712010-04-24 17:59:49 +000013159$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013160
13161fi
13162
13163
Martin v. Löwis0daad592001-09-30 21:09:59 +000013164# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13166$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013167if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013169else
Martin v. Löwis11437992002-04-12 09:54:03 +000013170 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013171LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175/* Override any GCC internal prototype to avoid an error.
13176 Use char because int might match the return type of a GCC
13177 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013178#ifdef __cplusplus
13179extern "C"
13180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013181char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013182int
13183main ()
13184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013185return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013186 ;
13187 return 0;
13188}
13189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013190if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013192else
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013195rm -f core conftest.err conftest.$ac_objext \
13196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013197LIBS=$ac_check_lib_save_LIBS
13198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13200$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013201if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013204
Guido van Rossum353ae582001-07-10 16:45:32 +000013205fi
13206
Jack Jansendd19cf82001-12-06 22:36:17 +000013207
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013208# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013210/* end confdefs.h. */
13211#include <readline/readline.h>
13212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013213if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013214 have_readline=yes
13215else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013216 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013217
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013218fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013219rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013220if test $have_readline = yes
13221then
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013223/* end confdefs.h. */
13224#include <readline/readline.h>
13225
13226_ACEOF
13227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013231
13232fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013233rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013234
13235fi
13236
Martin v. Löwis82bca632006-02-10 20:49:30 +000013237# End of readline checks: restore LIBS
13238LIBS=$LIBS_no_readline
13239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13241$as_echo_n "checking for broken nice()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013242if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013243 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013244else
Martin v. Löwis11437992002-04-12 09:54:03 +000013245
Matthias Kloseb9621712010-04-24 17:59:49 +000013246if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013247 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013248else
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013250/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013251
13252int main()
13253{
13254 int val1 = nice(1);
13255 if (val1 != -1 && val1 == nice(2))
13256 exit(0);
13257 exit(1);
13258}
13259
Martin v. Löwis11437992002-04-12 09:54:03 +000013260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013261if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013262 ac_cv_broken_nice=yes
13263else
Matthias Kloseb9621712010-04-24 17:59:49 +000013264 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13267 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013268fi
13269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270fi
13271
Matthias Kloseb9621712010-04-24 17:59:49 +000013272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13273$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013274if test "$ac_cv_broken_nice" = yes
13275then
Martin v. Löwis11437992002-04-12 09:54:03 +000013276
Matthias Kloseb9621712010-04-24 17:59:49 +000013277$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013278
13279fi
13280
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13282$as_echo_n "checking for broken poll()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013283if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013285else
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013287 ac_cv_broken_poll=no
13288else
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013290/* end confdefs.h. */
13291
13292#include <poll.h>
13293
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013294int main()
13295{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013296 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013297 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013298
13299 close (42);
13300
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013301 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013302 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013303 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013304 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013305 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013306 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013307 return 1;
13308}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013309
13310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013311if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013312 ac_cv_broken_poll=yes
13313else
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013319
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013320fi
13321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13323$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013324if test "$ac_cv_broken_poll" = yes
13325then
13326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013328
13329fi
13330
Brett Cannon43802422005-02-10 20:48:03 +000013331# 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 +000013332# (which is not required by ISO C or UNIX spec) and/or if we support
13333# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013334ac_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 +000013335#include <$ac_cv_struct_tm>
13336
Matthias Kloseb9621712010-04-24 17:59:49 +000013337"
Gregory P. Smith69140482012-01-16 02:05:55 -080013338if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013339
13340cat >>confdefs.h <<_ACEOF
13341#define HAVE_STRUCT_TM_TM_ZONE 1
13342_ACEOF
13343
13344
13345fi
13346
13347if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013350
13351else
Matthias Kloseb9621712010-04-24 17:59:49 +000013352 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13353"
Gregory P. Smith69140482012-01-16 02:05:55 -080013354if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013355 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356else
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358fi
13359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013360cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013361#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013362_ACEOF
13363
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13365$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013366if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368else
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013370/* end confdefs.h. */
13371#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013372#if !HAVE_DECL_TZNAME
13373extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013374#endif
13375
13376int
13377main ()
13378{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013380 ;
13381 return 0;
13382}
13383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013384if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013385 ac_cv_var_tzname=yes
13386else
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013389rm -f core conftest.err conftest.$ac_objext \
13390 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13393$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013394 if test $ac_cv_var_tzname = yes; then
13395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013397
13398 fi
13399fi
13400
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013401
Martin v. Löwis1d459062005-03-14 21:23:33 +000013402# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13404$as_echo_n "checking for working tzset()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013405if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013407else
13408
Matthias Kloseb9621712010-04-24 17:59:49 +000013409if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013410 ac_cv_working_tzset=no
13411else
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013413/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013414
13415#include <stdlib.h>
13416#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013417#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013418
13419#if HAVE_TZNAME
13420extern char *tzname[];
13421#endif
13422
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013423int main()
13424{
Brett Cannon18367812003-09-19 00:59:16 +000013425 /* Note that we need to ensure that not only does tzset(3)
13426 do 'something' with localtime, but it works as documented
13427 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013428 This includes making sure that tzname is set properly if
13429 tm->tm_zone does not exist since it is the alternative way
13430 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013431
13432 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013433 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013434 */
13435
Martin v. Löwis1d459062005-03-14 21:23:33 +000013436 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013437 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13438
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013439 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013440 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013441 if (localtime(&groundhogday)->tm_hour != 0)
13442 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013443#if HAVE_TZNAME
13444 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13445 if (strcmp(tzname[0], "UTC") ||
13446 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13447 exit(1);
13448#endif
Brett Cannon18367812003-09-19 00:59:16 +000013449
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013450 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013451 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013452 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013453 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013454#if HAVE_TZNAME
13455 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13456 exit(1);
13457#endif
Brett Cannon18367812003-09-19 00:59:16 +000013458
13459 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13460 tzset();
13461 if (localtime(&groundhogday)->tm_hour != 11)
13462 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013463#if HAVE_TZNAME
13464 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13465 exit(1);
13466#endif
13467
13468#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013469 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13470 exit(1);
13471 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13472 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013473#endif
Brett Cannon18367812003-09-19 00:59:16 +000013474
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013475 exit(0);
13476}
13477
13478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013479if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013480 ac_cv_working_tzset=yes
13481else
Matthias Kloseb9621712010-04-24 17:59:49 +000013482 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13485 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013486fi
13487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013488fi
13489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13491$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013492if test "$ac_cv_working_tzset" = yes
13493then
13494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013496
13497fi
13498
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013499# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13501$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013502if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013504else
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013506/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013507#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013508int
13509main ()
13510{
13511
13512struct stat st;
13513st.st_mtim.tv_nsec = 1;
13514
13515 ;
13516 return 0;
13517}
13518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013520 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013521else
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13525fi
13526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13528$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013529if test "$ac_cv_stat_tv_nsec" = yes
13530then
13531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013533
13534fi
13535
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013536# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13538$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013539if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013541else
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013543/* end confdefs.h. */
13544#include <sys/stat.h>
13545int
13546main ()
13547{
13548
13549struct stat st;
13550st.st_mtimespec.tv_nsec = 1;
13551
13552 ;
13553 return 0;
13554}
13555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013556if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013557 ac_cv_stat_tv_nsec2=yes
13558else
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13562fi
13563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13565$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013566if test "$ac_cv_stat_tv_nsec2" = yes
13567then
13568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013570
13571fi
13572
Jack Jansen666b1e72001-10-31 12:11:48 +000013573# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13575$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013576if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013578else
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013580/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013581#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013582int
13583main ()
13584{
Jack Jansen666b1e72001-10-31 12:11:48 +000013585
13586 int rtn;
13587 rtn = mvwdelch(0,0,0);
13588
Martin v. Löwis11437992002-04-12 09:54:03 +000013589 ;
13590 return 0;
13591}
13592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013593if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013594 ac_cv_mvwdelch_is_expression=yes
13595else
Matthias Kloseb9621712010-04-24 17:59:49 +000013596 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13599fi
13600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13602$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013603
13604if test "$ac_cv_mvwdelch_is_expression" = yes
13605then
Martin v. Löwis11437992002-04-12 09:54:03 +000013606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013608
13609fi
13610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13612$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013613if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013614 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013615else
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013617/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013618#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013619int
13620main ()
13621{
Jack Jansen666b1e72001-10-31 12:11:48 +000013622
13623 WINDOW *w;
13624 w->_flags = 0;
13625
Martin v. Löwis11437992002-04-12 09:54:03 +000013626 ;
13627 return 0;
13628}
13629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013630if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013631 ac_cv_window_has_flags=yes
13632else
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13636fi
13637
Matthias Kloseb9621712010-04-24 17:59:49 +000013638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13639$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013640
Jack Jansen666b1e72001-10-31 12:11:48 +000013641
13642if test "$ac_cv_window_has_flags" = yes
13643then
Martin v. Löwis11437992002-04-12 09:54:03 +000013644
Matthias Kloseb9621712010-04-24 17:59:49 +000013645$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013646
13647fi
13648
Matthias Kloseb9621712010-04-24 17:59:49 +000013649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13650$as_echo_n "checking for is_term_resized... " >&6; }
13651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013652/* end confdefs.h. */
13653#include <curses.h>
13654int
13655main ()
13656{
13657void *x=is_term_resized
13658 ;
13659 return 0;
13660}
13661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013662if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013663
Matthias Kloseb9621712010-04-24 17:59:49 +000013664$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013665
Matthias Kloseb159a552010-04-25 21:00:44 +000013666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013667$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013668else
Matthias Kloseb9621712010-04-24 17:59:49 +000013669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13670$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013671
13672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13674
Matthias Kloseb9621712010-04-24 17:59:49 +000013675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13676$as_echo_n "checking for resize_term... " >&6; }
13677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013678/* end confdefs.h. */
13679#include <curses.h>
13680int
13681main ()
13682{
13683void *x=resize_term
13684 ;
13685 return 0;
13686}
13687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013688if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013689
Matthias Kloseb9621712010-04-24 17:59:49 +000013690$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013691
Matthias Kloseb159a552010-04-25 21:00:44 +000013692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013693$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013694else
Matthias Kloseb9621712010-04-24 17:59:49 +000013695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13696$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013697
13698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13702$as_echo_n "checking for resizeterm... " >&6; }
13703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013704/* end confdefs.h. */
13705#include <curses.h>
13706int
13707main ()
13708{
13709void *x=resizeterm
13710 ;
13711 return 0;
13712}
13713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013714if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013717
Matthias Kloseb159a552010-04-25 21:00:44 +000013718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013719$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013720else
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13722$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013723
13724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13728$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013729
13730if test -r /dev/ptmx
13731then
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13733$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013734
Matthias Kloseb9621712010-04-24 17:59:49 +000013735$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013736
Thomas Wouters89f507f2006-12-13 04:49:30 +000013737else
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13739$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013740fi
13741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13743$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013744
13745if test -r /dev/ptc
13746then
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13748$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013751
Thomas Wouters89f507f2006-12-13 04:49:30 +000013752else
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13754$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013755fi
13756
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013757if test "$have_long_long" = yes
13758then
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13760$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013761 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013762 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013765 ac_cv_have_long_long_format=no
13766else
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013768/* end confdefs.h. */
13769
13770 #include <stdio.h>
13771 #include <stddef.h>
13772 #include <string.h>
13773
13774 #ifdef HAVE_SYS_TYPES_H
13775 #include <sys/types.h>
13776 #endif
13777
13778 int main()
13779 {
13780 char buffer[256];
13781
13782 if (sprintf(buffer, "%lld", (long long)123) < 0)
13783 return 1;
13784 if (strcmp(buffer, "123"))
13785 return 1;
13786
13787 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13788 return 1;
13789 if (strcmp(buffer, "-123"))
13790 return 1;
13791
13792 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13793 return 1;
13794 if (strcmp(buffer, "123"))
13795 return 1;
13796
13797 return 0;
13798 }
13799
13800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013801if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013802 ac_cv_have_long_long_format=yes
13803else
Matthias Kloseb9621712010-04-24 17:59:49 +000013804 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13807 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013808fi
13809
13810
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013811fi
13812
Matthias Kloseb9621712010-04-24 17:59:49 +000013813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13814$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013815fi
13816
Mark Dickinson89d7d412009-12-31 20:50:59 +000013817if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013818then
13819
Matthias Kloseb9621712010-04-24 17:59:49 +000013820$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013821
13822fi
13823
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013824if test $ac_sys_system = Darwin
13825then
13826 LIBS="$LIBS -framework CoreFoundation"
13827fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13830$as_echo_n "checking for %zd printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013831if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013833else
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013835 ac_cv_have_size_t_format="cross -- assuming yes"
13836
Thomas Wouters477c8d52006-05-27 19:21:47 +000013837else
Matthias Kloseb9621712010-04-24 17:59:49 +000013838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013839/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013840
Thomas Wouters477c8d52006-05-27 19:21:47 +000013841#include <stdio.h>
13842#include <stddef.h>
13843#include <string.h>
13844
Christian Heimes2c181612007-12-17 20:04:13 +000013845#ifdef HAVE_SYS_TYPES_H
13846#include <sys/types.h>
13847#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013848
13849#ifdef HAVE_SSIZE_T
13850typedef ssize_t Py_ssize_t;
13851#elif SIZEOF_VOID_P == SIZEOF_LONG
13852typedef long Py_ssize_t;
13853#else
13854typedef int Py_ssize_t;
13855#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013856
Christian Heimes2c181612007-12-17 20:04:13 +000013857int main()
13858{
13859 char buffer[256];
13860
Thomas Wouters477c8d52006-05-27 19:21:47 +000013861 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13862 return 1;
13863
Thomas Wouters89f507f2006-12-13 04:49:30 +000013864 if (strcmp(buffer, "123"))
13865 return 1;
13866
13867 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13868 return 1;
13869
13870 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013871 return 1;
13872
13873 return 0;
13874}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013875
Thomas Wouters477c8d52006-05-27 19:21:47 +000013876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013877if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013878 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013879else
Matthias Kloseb9621712010-04-24 17:59:49 +000013880 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13883 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013884fi
13885
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13888$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013889if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013890
Matthias Kloseb9621712010-04-24 17:59:49 +000013891$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013892
13893fi
13894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013896#ifdef HAVE_SYS_TYPES_H
13897#include <sys/types.h>
13898#endif
13899#ifdef HAVE_SYS_SOCKET_H
13900#include <sys/socket.h>
13901#endif
13902
Matthias Kloseb9621712010-04-24 17:59:49 +000013903"
Gregory P. Smith69140482012-01-16 02:05:55 -080013904if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013905
Martin v. Löwis11437992002-04-12 09:54:03 +000013906else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013907
Matthias Kloseb9621712010-04-24 17:59:49 +000013908$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013909
13910fi
13911
Michael W. Hudson54241132001-12-07 15:38:26 +000013912
Matthias Kloseb9621712010-04-24 17:59:49 +000013913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13914$as_echo_n "checking for broken mbstowcs... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013915if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013916 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013917else
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013919 ac_cv_broken_mbstowcs=no
13920else
Matthias Kloseb9621712010-04-24 17:59:49 +000013921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013922/* end confdefs.h. */
13923
13924#include<stdlib.h>
13925int main() {
13926 size_t len = -1;
13927 const char *str = "text";
13928 len = mbstowcs(NULL, str, 0);
13929 return (len != 4);
13930}
13931
13932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013933if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013934 ac_cv_broken_mbstowcs=no
13935else
Matthias Kloseb9621712010-04-24 17:59:49 +000013936 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13939 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013940fi
13941
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013942fi
13943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13945$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013946if test "$ac_cv_broken_mbstowcs" = yes
13947then
13948
Matthias Kloseb9621712010-04-24 17:59:49 +000013949$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013950
13951fi
13952
Antoine Pitrou042b1282010-08-13 21:15:58 +000013953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13954$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013955if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013956 $as_echo_n "(cached) " >&6
13957else
13958 if test "$cross_compiling" = yes; then :
13959 ac_cv_computed_gotos=no
13960else
13961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13962/* end confdefs.h. */
13963
13964int main(int argc, char **argv)
13965{
13966 static void *targets[1] = { &&LABEL1 };
13967 goto LABEL2;
13968LABEL1:
13969 return 0;
13970LABEL2:
13971 goto *targets[0];
13972 return 1;
13973}
13974
13975_ACEOF
13976if ac_fn_c_try_run "$LINENO"; then :
13977 ac_cv_computed_gotos=yes
13978else
13979 ac_cv_computed_gotos=no
13980fi
13981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13982 conftest.$ac_objext conftest.beam conftest.$ac_ext
13983fi
13984
13985fi
13986
13987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13988$as_echo "$ac_cv_computed_gotos" >&6; }
13989if test "$ac_cv_computed_gotos" = yes
13990then
13991
13992$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13993
13994fi
13995
Antoine Pitroub52ec782009-01-25 16:34:23 +000013996# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13998$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013999
14000# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014001if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014002 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014003if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014004then
14005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014007
Matthias Kloseb9621712010-04-24 17:59:49 +000014008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14009$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014010fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014011if test "$withval" = no
14012then
14013
14014$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14015
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14017$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014018fi
14019
Antoine Pitrou042b1282010-08-13 21:15:58 +000014020else
14021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14022$as_echo "no value specified" >&6; }
14023fi
14024
Antoine Pitroub52ec782009-01-25 16:34:23 +000014025
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014026case $ac_sys_system in
14027AIX*)
14028
14029$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14030 ;;
14031esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014032
Michael W. Hudson54241132001-12-07 15:38:26 +000014033
Jesus Cea6a792292010-05-03 21:18:48 +000014034case $ac_sys_system in
Gregory P. Smith69140482012-01-16 02:05:55 -080014035 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 +000014036esac
14037
Gregory P. Smith138fa432010-12-13 08:00:52 +000014038ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Gregory P. Smith69140482012-01-16 02:05:55 -080014039if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000014040
14041$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
14042
14043fi
Jesus Cea6a792292010-05-03 21:18:48 +000014044
14045
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014046
14047
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014048for h in `(cd $srcdir;echo Python/thread_*.h)`
14049do
14050 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14051done
14052
Michael W. Hudson54241132001-12-07 15:38:26 +000014053
Neal Norwitzd24499d2005-12-18 21:36:39 +000014054SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14056$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014057for dir in $SRCDIRS; do
14058 if test ! -d $dir; then
14059 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014060 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014061done
Matthias Kloseb9621712010-04-24 17:59:49 +000014062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14063$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014064
Guido van Rossum627b2d71993-12-24 10:39:16 +000014065# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014066ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014067
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014068ac_config_files="$ac_config_files Modules/ld_so_aix"
14069
Martin v. Löwis11437992002-04-12 09:54:03 +000014070cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014071# This file is a shell script that caches the results of configure
14072# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014073# scripts and configure runs, see configure's option --config-cache.
14074# It is not useful on other systems. If it contains results you don't
14075# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014076#
Martin v. Löwis11437992002-04-12 09:54:03 +000014077# config.status only pays attention to the cache file if you give it
14078# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014079#
Skip Montanaro6dead952003-09-25 14:50:04 +000014080# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014081# loading this file, other *unset* `ac_cv_foo' will be assigned the
14082# following values.
14083
14084_ACEOF
14085
Guido van Rossumf78abae1997-01-21 22:02:36 +000014086# The following way of writing the cache mishandles newlines in values,
14087# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014088# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014089# Ultrix sh set writes to stderr and can't be redirected directly,
14090# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091(
14092 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14093 eval ac_val=\$$ac_var
14094 case $ac_val in #(
14095 *${as_nl}*)
14096 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14098$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014099 esac
14100 case $ac_var in #(
14101 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014102 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14103 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104 esac ;;
14105 esac
14106 done
14107
Martin v. Löwis11437992002-04-12 09:54:03 +000014108 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014109 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14110 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 # `set' does not quote correctly, so add quotes: double-quote
14112 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014114 "s/'/'\\\\''/g;
14115 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014117 *)
14118 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014119 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121 esac |
14122 sort
14123) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014124 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014125 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014126 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014127 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014128 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14129 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14131 :end' >>confcache
14132if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14133 if test -w "$cache_file"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014134 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14136$as_echo "$as_me: updating cache $cache_file" >&6;}
Gregory P. Smith69140482012-01-16 02:05:55 -080014137 if test ! -f "$cache_file" || test -h "$cache_file"; then
14138 cat confcache >"$cache_file"
14139 else
14140 case $cache_file in #(
14141 */* | ?:*)
14142 mv -f confcache "$cache_file"$$ &&
14143 mv -f "$cache_file"$$ "$cache_file" ;; #(
14144 *)
14145 mv -f confcache "$cache_file" ;;
14146 esac
14147 fi
14148 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014149 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14151$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014152 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014153fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014154rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014155
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014156test "x$prefix" = xNONE && prefix=$ac_default_prefix
14157# Let make expand exec_prefix.
14158test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014159
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014160DEFS=-DHAVE_CONFIG_H
14161
Skip Montanaro6dead952003-09-25 14:50:04 +000014162ac_libobjs=
14163ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014164U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014165for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14166 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014169 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14170 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14172 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014173done
14174LIBOBJS=$ac_libobjs
14175
14176LTLIBOBJS=$ac_ltlibobjs
14177
14178
Martin v. Löwis11437992002-04-12 09:54:03 +000014179
Matthias Kloseb9621712010-04-24 17:59:49 +000014180
Gregory P. Smith69140482012-01-16 02:05:55 -080014181: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014182ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014183ac_clean_files_save=$ac_clean_files
14184ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014185{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14186$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14187as_write_fail=0
14188cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014189#! $SHELL
14190# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014191# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014192# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014193# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014194
Martin v. Löwis11437992002-04-12 09:54:03 +000014195debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014196ac_cs_recheck=false
14197ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199SHELL=\${CONFIG_SHELL-$SHELL}
14200export SHELL
14201_ASEOF
14202cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14203## -------------------- ##
14204## M4sh Initialization. ##
14205## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014207# Be more Bourne compatible
14208DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014209if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014210 emulate sh
14211 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014213 # is contrary to our usage. Disable this feature.
14214 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014215 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014216else
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 case `(set -o) 2>/dev/null` in #(
14218 *posix*) :
14219 set -o posix ;; #(
14220 *) :
14221 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014222esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014223fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014224
14225
Matthias Kloseb9621712010-04-24 17:59:49 +000014226as_nl='
14227'
14228export as_nl
14229# Printing a long string crashes Solaris 7 /usr/bin/printf.
14230as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14231as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14232as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14233# Prefer a ksh shell builtin over an external printf program on Solaris,
14234# but without wasting forks for bash or zsh.
14235if test -z "$BASH_VERSION$ZSH_VERSION" \
14236 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14237 as_echo='print -r --'
14238 as_echo_n='print -rn --'
14239elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14240 as_echo='printf %s\n'
14241 as_echo_n='printf %s'
14242else
14243 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14244 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14245 as_echo_n='/usr/ucb/echo -n'
14246 else
14247 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14248 as_echo_n_body='eval
14249 arg=$1;
14250 case $arg in #(
14251 *"$as_nl"*)
14252 expr "X$arg" : "X\\(.*\\)$as_nl";
14253 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14254 esac;
14255 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14256 '
14257 export as_echo_n_body
14258 as_echo_n='sh -c $as_echo_n_body as_echo'
14259 fi
14260 export as_echo_body
14261 as_echo='sh -c $as_echo_body as_echo'
14262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014263
14264# The user is always right.
14265if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 PATH_SEPARATOR=:
14267 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14268 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14269 PATH_SEPARATOR=';'
14270 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014271fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273
14274# IFS
14275# We need space, tab and new line, in precisely that order. Quoting is
14276# there to prevent editors from complaining about space-tab.
14277# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14278# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014279IFS=" "" $as_nl"
14280
14281# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080014282as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014283case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014284 *[\\/]* ) as_myself=$0 ;;
14285 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014286for as_dir in $PATH
14287do
14288 IFS=$as_save_IFS
14289 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14291 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014294 ;;
14295esac
14296# We did not find ourselves, most probably we were run as `sh COMMAND'
14297# in which case we are not to be found in the path.
14298if test "x$as_myself" = x; then
14299 as_myself=$0
14300fi
14301if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14303 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014304fi
14305
Matthias Kloseb9621712010-04-24 17:59:49 +000014306# Unset variables that we do not need and which cause bugs (e.g. in
14307# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14308# suppresses any "Segmentation fault" message there. '((' could
14309# trigger a bug in pdksh 5.2.14.
14310for as_var in BASH_ENV ENV MAIL MAILPATH
14311do eval test x\${$as_var+set} = xset \
14312 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014313done
14314PS1='$ '
14315PS2='> '
14316PS4='+ '
14317
14318# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014319LC_ALL=C
14320export LC_ALL
14321LANGUAGE=C
14322export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014323
Matthias Kloseb9621712010-04-24 17:59:49 +000014324# CDPATH.
14325(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14326
14327
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014328# as_fn_error STATUS ERROR [LINENO LOG_FD]
14329# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014330# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14331# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014332# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014333as_fn_error ()
14334{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014335 as_status=$1; test $as_status -eq 0 && as_status=1
14336 if test "$4"; then
14337 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14338 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014339 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014340 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014341 as_fn_exit $as_status
14342} # as_fn_error
14343
14344
14345# as_fn_set_status STATUS
14346# -----------------------
14347# Set $? to STATUS, without forking.
14348as_fn_set_status ()
14349{
14350 return $1
14351} # as_fn_set_status
14352
14353# as_fn_exit STATUS
14354# -----------------
14355# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14356as_fn_exit ()
14357{
14358 set +e
14359 as_fn_set_status $1
14360 exit $1
14361} # as_fn_exit
14362
14363# as_fn_unset VAR
14364# ---------------
14365# Portably unset VAR.
14366as_fn_unset ()
14367{
14368 { eval $1=; unset $1;}
14369}
14370as_unset=as_fn_unset
14371# as_fn_append VAR VALUE
14372# ----------------------
14373# Append the text in VALUE to the end of the definition contained in VAR. Take
14374# advantage of any shell optimizations that allow amortized linear growth over
14375# repeated appends, instead of the typical quadratic growth present in naive
14376# implementations.
14377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14378 eval 'as_fn_append ()
14379 {
14380 eval $1+=\$2
14381 }'
14382else
14383 as_fn_append ()
14384 {
14385 eval $1=\$$1\$2
14386 }
14387fi # as_fn_append
14388
14389# as_fn_arith ARG...
14390# ------------------
14391# Perform arithmetic evaluation on the ARGs, and store the result in the
14392# global $as_val. Take advantage of shells that can avoid forks. The arguments
14393# must be portable across $(()) and expr.
14394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14395 eval 'as_fn_arith ()
14396 {
14397 as_val=$(( $* ))
14398 }'
14399else
14400 as_fn_arith ()
14401 {
14402 as_val=`expr "$@" || test $? -eq 1`
14403 }
14404fi # as_fn_arith
14405
14406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014407if expr a : '\(a\)' >/dev/null 2>&1 &&
14408 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14409 as_expr=expr
14410else
14411 as_expr=false
14412fi
14413
14414if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14415 as_basename=basename
14416else
14417 as_basename=false
14418fi
14419
Matthias Kloseb9621712010-04-24 17:59:49 +000014420if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14421 as_dirname=dirname
14422else
14423 as_dirname=false
14424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426as_me=`$as_basename -- "$0" ||
14427$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14428 X"$0" : 'X\(//\)$' \| \
14429 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014430$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014431 sed '/^.*\/\([^/][^/]*\)\/*$/{
14432 s//\1/
14433 q
14434 }
14435 /^X\/\(\/\/\)$/{
14436 s//\1/
14437 q
14438 }
14439 /^X\/\(\/\).*/{
14440 s//\1/
14441 q
14442 }
14443 s/.*/./; q'`
14444
Matthias Kloseb9621712010-04-24 17:59:49 +000014445# Avoid depending upon Character Ranges.
14446as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14447as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14448as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14449as_cr_digits='0123456789'
14450as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451
14452ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014453case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014455 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 xy) ECHO_C='\c';;
14458 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14459 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460 esac;;
14461*)
14462 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014463esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014464
Martin v. Löwis11437992002-04-12 09:54:03 +000014465rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466if test -d conf$$.dir; then
14467 rm -f conf$$.dir/conf$$.file
14468else
14469 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014472if (echo >conf$$.file) 2>/dev/null; then
14473 if ln -s conf$$.file conf$$ 2>/dev/null; then
14474 as_ln_s='ln -s'
14475 # ... but there are two gotchas:
14476 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14477 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014478 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014480 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014481 elif ln conf$$.file conf$$ 2>/dev/null; then
14482 as_ln_s=ln
14483 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014484 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014485 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014486else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014487 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000014488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14490rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492
14493# as_fn_mkdir_p
14494# -------------
14495# Create "$as_dir" as a directory, including parents if necessary.
14496as_fn_mkdir_p ()
14497{
14498
14499 case $as_dir in #(
14500 -*) as_dir=./$as_dir;;
14501 esac
14502 test -d "$as_dir" || eval $as_mkdir_p || {
14503 as_dirs=
14504 while :; do
14505 case $as_dir in #(
14506 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14507 *) as_qdir=$as_dir;;
14508 esac
14509 as_dirs="'$as_qdir' $as_dirs"
14510 as_dir=`$as_dirname -- "$as_dir" ||
14511$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14512 X"$as_dir" : 'X\(//\)[^/]' \| \
14513 X"$as_dir" : 'X\(//\)$' \| \
14514 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14515$as_echo X"$as_dir" |
14516 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14517 s//\1/
14518 q
14519 }
14520 /^X\(\/\/\)[^/].*/{
14521 s//\1/
14522 q
14523 }
14524 /^X\(\/\/\)$/{
14525 s//\1/
14526 q
14527 }
14528 /^X\(\/\).*/{
14529 s//\1/
14530 q
14531 }
14532 s/.*/./; q'`
14533 test -d "$as_dir" && break
14534 done
14535 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014536 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014537
14538
14539} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014540if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014541 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014542else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014543 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014544 as_mkdir_p=false
14545fi
14546
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014547
14548# as_fn_executable_p FILE
14549# -----------------------
14550# Test if FILE is an executable regular file.
14551as_fn_executable_p ()
14552{
14553 test -f "$1" && test -x "$1"
14554} # as_fn_executable_p
14555as_test_x='test -x'
14556as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014557
14558# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014559as_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 +000014560
14561# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014562as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014563
14564
Martin v. Löwis11437992002-04-12 09:54:03 +000014565exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014566## ----------------------------------- ##
14567## Main body of $CONFIG_STATUS script. ##
14568## ----------------------------------- ##
14569_ASEOF
14570test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14573# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014574# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575# values after options handling.
14576ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014577This file was extended by python $as_me 3.2, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014578generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014579
14580 CONFIG_FILES = $CONFIG_FILES
14581 CONFIG_HEADERS = $CONFIG_HEADERS
14582 CONFIG_LINKS = $CONFIG_LINKS
14583 CONFIG_COMMANDS = $CONFIG_COMMANDS
14584 $ $0 $@
14585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014586on `(hostname || uname -n) 2>/dev/null | sed 1q`
14587"
14588
Martin v. Löwis11437992002-04-12 09:54:03 +000014589_ACEOF
14590
Matthias Kloseb9621712010-04-24 17:59:49 +000014591case $ac_config_files in *"
14592"*) set x $ac_config_files; shift; ac_config_files=$*;;
14593esac
14594
14595case $ac_config_headers in *"
14596"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14597esac
14598
14599
14600cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014601# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014602config_files="$ac_config_files"
14603config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014606
Matthias Kloseb9621712010-04-24 17:59:49 +000014607cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014608ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014609\`$as_me' instantiates files and other configuration actions
14610from templates according to the current configuration. Unless the files
14611and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014612
Matthias Kloseb9621712010-04-24 17:59:49 +000014613Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014614
14615 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014616 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014617 --config print configuration, then exit
14618 -q, --quiet, --silent
14619 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 -d, --debug don't remove temporary files
14621 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 --file=FILE[:TEMPLATE]
14623 instantiate the configuration file FILE
14624 --header=FILE[:TEMPLATE]
14625 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014626
14627Configuration files:
14628$config_files
14629
14630Configuration headers:
14631$config_headers
14632
Matthias Kloseb9621712010-04-24 17:59:49 +000014633Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014636cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14637ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014638ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014639python config.status 3.2
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014640configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014642
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014643Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014644This config.status script is free software; the Free Software Foundation
14645gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014646
14647ac_pwd='$ac_pwd'
14648srcdir='$srcdir'
14649INSTALL='$INSTALL'
Trent Nelsona45afca2012-08-30 14:32:02 +000014650MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000014651test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014652_ACEOF
14653
Matthias Kloseb9621712010-04-24 17:59:49 +000014654cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14655# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014656ac_need_defaults=:
14657while test $# != 0
14658do
14659 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014660 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14662 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014663 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014664 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014665 --*=)
14666 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14667 ac_optarg=
14668 ac_shift=:
14669 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014671 ac_option=$1
14672 ac_optarg=$2
14673 ac_shift=shift
14674 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014675 esac
14676
Skip Montanaro6dead952003-09-25 14:50:04 +000014677 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014678 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014679 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14680 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014681 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 $as_echo "$ac_cs_version"; exit ;;
14683 --config | --confi | --conf | --con | --co | --c )
14684 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014685 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014686 debug=: ;;
14687 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014688 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 case $ac_optarg in
14690 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014691 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 esac
14693 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014694 ac_need_defaults=false;;
14695 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014696 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 case $ac_optarg in
14698 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14699 esac
14700 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014701 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014702 --he | --h)
14703 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014704 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014705Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014706 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014708 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14709 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14710 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014711
14712 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014713 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014714Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014715
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014718
14719 esac
14720 shift
14721done
14722
Skip Montanaro6dead952003-09-25 14:50:04 +000014723ac_configure_extra_args=
14724
14725if $ac_cs_silent; then
14726 exec 6>/dev/null
14727 ac_configure_extra_args="$ac_configure_extra_args --silent"
14728fi
14729
14730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014731cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014732if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014733 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000014734 shift
14735 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14736 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014738 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014739fi
14740
Martin v. Löwis11437992002-04-12 09:54:03 +000014741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014742cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014743exec 5>>config.log
14744{
14745 echo
14746 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14747## Running $as_me. ##
14748_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014753cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014754_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014755
Matthias Kloseb9621712010-04-24 17:59:49 +000014756cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014757
14758# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014759for ac_config_target in $ac_config_targets
14760do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014761 case $ac_config_target in
14762 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14763 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14764 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014765 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14766 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14768 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014769 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014770 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771
Gregory P. Smith69140482012-01-16 02:05:55 -080014772 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014773 esac
14774done
14775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014776
Martin v. Löwis11437992002-04-12 09:54:03 +000014777# If the user did not use the arguments to specify the items to instantiate,
14778# then the envvar interface is used. Set only those that are not.
14779# We use the long form for the default assignment because of an extremely
14780# bizarre bug on SunOS 4.1.3.
14781if $ac_need_defaults; then
14782 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14783 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14784fi
14785
Skip Montanaro6dead952003-09-25 14:50:04 +000014786# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014787# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014788# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014789# Hook for its removal unless debugging.
14790# Note that there is a small window in which the directory will not be cleaned:
14791# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014792$debug ||
14793{
Gregory P. Smith69140482012-01-16 02:05:55 -080014794 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014795 trap 'exit_status=$?
Gregory P. Smith69140482012-01-16 02:05:55 -080014796 : "${ac_tmp:=$tmp}"
14797 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014798' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014799 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014800}
Martin v. Löwis11437992002-04-12 09:54:03 +000014801# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014802
Martin v. Löwis11437992002-04-12 09:54:03 +000014803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014804 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Gregory P. Smith69140482012-01-16 02:05:55 -080014805 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014806} ||
14807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014808 tmp=./conf$$-$RANDOM
14809 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014810} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080014811ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014812
Matthias Kloseb9621712010-04-24 17:59:49 +000014813# Set up the scripts for CONFIG_FILES section.
14814# No need to generate them if there are no CONFIG_FILES.
14815# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014816if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014817
Matthias Kloseb9621712010-04-24 17:59:49 +000014818
14819ac_cr=`echo X | tr X '\015'`
14820# On cygwin, bash can eat \r inside `` if the user requested igncr.
14821# But we know of no other shell where ac_cr would be empty at this
14822# point, so we can use a bashism as a fallback.
14823if test "x$ac_cr" = x; then
14824 eval ac_cr=\$\'\\r\'
14825fi
14826ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14827if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014828 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014829else
14830 ac_cs_awk_cr=$ac_cr
14831fi
14832
Gregory P. Smith69140482012-01-16 02:05:55 -080014833echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014834_ACEOF
14835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836
Matthias Kloseb9621712010-04-24 17:59:49 +000014837{
14838 echo "cat >conf$$subs.awk <<_ACEOF" &&
14839 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14840 echo "_ACEOF"
14841} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014842 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14843ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014844ac_delim='%!_!# '
14845for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014846 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014847 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848
Matthias Kloseb9621712010-04-24 17:59:49 +000014849 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14850 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851 break
14852 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014853 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014854 else
14855 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014856 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857done
Matthias Kloseb9621712010-04-24 17:59:49 +000014858rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859
Matthias Kloseb9621712010-04-24 17:59:49 +000014860cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Gregory P. Smith69140482012-01-16 02:05:55 -080014861cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014863sed -n '
14864h
14865s/^/S["/; s/!.*/"]=/
14866p
14867g
14868s/^[^!]*!//
14869:repl
14870t repl
14871s/'"$ac_delim"'$//
14872t delim
14873:nl
14874h
14875s/\(.\{148\}\)..*/\1/
14876t more1
14877s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14878p
14879n
14880b repl
14881:more1
14882s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14883p
14884g
14885s/.\{148\}//
14886t nl
14887:delim
14888h
14889s/\(.\{148\}\)..*/\1/
14890t more2
14891s/["\\]/\\&/g; s/^/"/; s/$/"/
14892p
14893b
14894:more2
14895s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14896p
14897g
14898s/.\{148\}//
14899t delim
14900' <conf$$subs.awk | sed '
14901/^[^""]/{
14902 N
14903 s/\n//
14904}
14905' >>$CONFIG_STATUS || ac_write_fail=1
14906rm -f conf$$subs.awk
14907cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14908_ACAWK
Gregory P. Smith69140482012-01-16 02:05:55 -080014909cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014910 for (key in S) S_is_set[key] = 1
14911 FS = ""
14912
14913}
14914{
14915 line = $ 0
14916 nfields = split(line, field, "@")
14917 substed = 0
14918 len = length(field[1])
14919 for (i = 2; i < nfields; i++) {
14920 key = field[i]
14921 keylen = length(key)
14922 if (S_is_set[key]) {
14923 value = S[key]
14924 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14925 len += length(value) + length(field[++i])
14926 substed = 1
14927 } else
14928 len += 1 + keylen
14929 }
14930
14931 print line
14932}
14933
14934_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014936cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14937if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14938 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14939else
14940 cat
Gregory P. Smith69140482012-01-16 02:05:55 -080014941fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014942 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014943_ACEOF
14944
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014945# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14946# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947# trailing colons and then remove the whole line if VPATH becomes empty
14948# (actually we leave an empty line to preserve line numbers).
14949if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014950 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14951h
14952s///
14953s/^/:/
14954s/[ ]*$/:/
14955s/:\$(srcdir):/:/g
14956s/:\${srcdir}:/:/g
14957s/:@srcdir@:/:/g
14958s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014959s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014960x
14961s/\(=[ ]*\).*/\1/
14962G
14963s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964s/^[^=]*=[ ]*$//
14965}'
14966fi
14967
Matthias Kloseb9621712010-04-24 17:59:49 +000014968cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014969fi # test -n "$CONFIG_FILES"
14970
Matthias Kloseb9621712010-04-24 17:59:49 +000014971# Set up the scripts for CONFIG_HEADERS section.
14972# No need to generate them if there are no CONFIG_HEADERS.
14973# This happens for instance with `./config.status Makefile'.
14974if test -n "$CONFIG_HEADERS"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014975cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014976BEGIN {
14977_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978
Matthias Kloseb9621712010-04-24 17:59:49 +000014979# Transform confdefs.h into an awk script `defines.awk', embedded as
14980# here-document in config.status, that substitutes the proper values into
14981# config.h.in to produce config.h.
14982
14983# Create a delimiter string that does not exist in confdefs.h, to ease
14984# handling of long lines.
14985ac_delim='%!_!# '
14986for ac_last_try in false false :; do
Gregory P. Smith69140482012-01-16 02:05:55 -080014987 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14988 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014989 break
14990 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014991 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 else
14993 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14994 fi
14995done
14996
14997# For the awk script, D is an array of macro values keyed by name,
14998# likewise P contains macro parameters if any. Preserve backslash
14999# newline sequences.
15000
15001ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15002sed -n '
15003s/.\{148\}/&'"$ac_delim"'/g
15004t rset
15005:rset
15006s/^[ ]*#[ ]*define[ ][ ]*/ /
15007t def
15008d
15009:def
15010s/\\$//
15011t bsnl
15012s/["\\]/\\&/g
15013s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15014D["\1"]=" \3"/p
15015s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15016d
15017:bsnl
15018s/["\\]/\\&/g
15019s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15020D["\1"]=" \3\\\\\\n"\\/p
15021t cont
15022s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15023t cont
15024d
15025:cont
15026n
15027s/.\{148\}/&'"$ac_delim"'/g
15028t clear
15029:clear
15030s/\\$//
15031t bsnlc
15032s/["\\]/\\&/g; s/^/"/; s/$/"/p
15033d
15034:bsnlc
15035s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15036b cont
15037' <confdefs.h | sed '
15038s/'"$ac_delim"'/"\\\
15039"/g' >>$CONFIG_STATUS || ac_write_fail=1
15040
15041cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15042 for (key in D) D_is_set[key] = 1
15043 FS = ""
15044}
15045/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15046 line = \$ 0
15047 split(line, arg, " ")
15048 if (arg[1] == "#") {
15049 defundef = arg[2]
15050 mac1 = arg[3]
15051 } else {
15052 defundef = substr(arg[1], 2)
15053 mac1 = arg[2]
15054 }
15055 split(mac1, mac2, "(") #)
15056 macro = mac2[1]
15057 prefix = substr(line, 1, index(line, defundef) - 1)
15058 if (D_is_set[macro]) {
15059 # Preserve the white space surrounding the "#".
15060 print prefix "define", macro P[macro] D[macro]
15061 next
15062 } else {
15063 # Replace #undef with comments. This is necessary, for example,
15064 # in the case of _POSIX_SOURCE, which is predefined and required
15065 # on some systems where configure will not decide to define it.
15066 if (defundef == "undef") {
15067 print "/*", prefix defundef, macro, "*/"
15068 next
15069 }
15070 }
15071}
15072{ print }
15073_ACAWK
15074_ACEOF
15075cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015076 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015077fi # test -n "$CONFIG_HEADERS"
15078
15079
15080eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15081shift
15082for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083do
15084 case $ac_tag in
15085 :[FHLC]) ac_mode=$ac_tag; continue;;
15086 esac
15087 case $ac_mode$ac_tag in
15088 :[FHL]*:*);;
Gregory P. Smith69140482012-01-16 02:05:55 -080015089 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090 :[FH]-) ac_tag=-:-;;
15091 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15092 esac
15093 ac_save_IFS=$IFS
15094 IFS=:
15095 set x $ac_tag
15096 IFS=$ac_save_IFS
15097 shift
15098 ac_file=$1
15099 shift
15100
15101 case $ac_mode in
15102 :L) ac_source=$1;;
15103 :[FH])
15104 ac_file_inputs=
15105 for ac_f
15106 do
15107 case $ac_f in
Gregory P. Smith69140482012-01-16 02:05:55 -080015108 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109 *) # Look for the file first in the build tree, then in the source tree
15110 # (if the path is not absolute). The absolute path cannot be DOS-style,
15111 # because $ac_f cannot contain `:'.
15112 test -f "$ac_f" ||
15113 case $ac_f in
15114 [\\/$]*) false;;
15115 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15116 esac ||
Gregory P. Smith69140482012-01-16 02:05:55 -080015117 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015118 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15120 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121 done
15122
15123 # Let's still pretend it is `configure' which instantiates (i.e., don't
15124 # use $as_me), people would be surprised to read:
15125 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 configure_input='Generated from '`
15127 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15128 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129 if test x"$ac_file" != x-; then
15130 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15132$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015133 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 # Neutralize special characters interpreted by sed in replacement strings.
15135 case $configure_input in #(
15136 *\&* | *\|* | *\\* )
15137 ac_sed_conf_input=`$as_echo "$configure_input" |
15138 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15139 *) ac_sed_conf_input=$configure_input;;
15140 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141
15142 case $ac_tag in
Gregory P. Smith69140482012-01-16 02:05:55 -080015143 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15144 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145 esac
15146 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 esac
15148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015149 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015150$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015151 X"$ac_file" : 'X\(//\)[^/]' \| \
15152 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015154$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015155 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15156 s//\1/
15157 q
15158 }
15159 /^X\(\/\/\)[^/].*/{
15160 s//\1/
15161 q
15162 }
15163 /^X\(\/\/\)$/{
15164 s//\1/
15165 q
15166 }
15167 /^X\(\/\).*/{
15168 s//\1/
15169 q
15170 }
15171 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 ac_builddir=.
15174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015175case "$ac_dir" in
15176.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15177*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015178 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015179 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181 case $ac_top_builddir_sub in
15182 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15183 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15184 esac ;;
15185esac
15186ac_abs_top_builddir=$ac_pwd
15187ac_abs_builddir=$ac_pwd$ac_dir_suffix
15188# for backward compatibility:
15189ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015190
15191case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194 ac_top_srcdir=$ac_top_builddir_sub
15195 ac_abs_top_srcdir=$ac_pwd ;;
15196 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015198 ac_top_srcdir=$srcdir
15199 ac_abs_top_srcdir=$srcdir ;;
15200 *) # Relative name.
15201 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15202 ac_top_srcdir=$ac_top_build_prefix$srcdir
15203 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015204esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015205ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015206
Martin v. Löwis11437992002-04-12 09:54:03 +000015207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208 case $ac_mode in
15209 :F)
15210 #
15211 # CONFIG_FILE
15212 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015213
15214 case $INSTALL in
15215 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015216 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015217 esac
Trent Nelsona45afca2012-08-30 14:32:02 +000015218 ac_MKDIR_P=$MKDIR_P
15219 case $MKDIR_P in
15220 [\\/$]* | ?:[\\/]* ) ;;
15221 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15222 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015223_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224
Matthias Kloseb9621712010-04-24 17:59:49 +000015225cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015226# If the template does not know about datarootdir, expand it.
15227# FIXME: This hack should be removed a few years after 2.60.
15228ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015229ac_sed_dataroot='
15230/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231 p
15232 q
15233}
15234/@datadir@/p
15235/@docdir@/p
15236/@infodir@/p
15237/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015238/@mandir@/p'
15239case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015240*datarootdir*) ac_datarootdir_seen=yes;;
15241*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15243$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015245cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015246 ac_datarootdir_hack='
15247 s&@datadir@&$datadir&g
15248 s&@docdir@&$docdir&g
15249 s&@infodir@&$infodir&g
15250 s&@localedir@&$localedir&g
15251 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253esac
15254_ACEOF
15255
15256# Neutralize VPATH when `$srcdir' = `.'.
15257# Shell code in configure.ac might set extrasub.
15258# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015259cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15260ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015261$extrasub
15262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015263cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015264:t
15265/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015266s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015267s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015268s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269s&@srcdir@&$ac_srcdir&;t t
15270s&@abs_srcdir@&$ac_abs_srcdir&;t t
15271s&@top_srcdir@&$ac_top_srcdir&;t t
15272s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15273s&@builddir@&$ac_builddir&;t t
15274s&@abs_builddir@&$ac_abs_builddir&;t t
15275s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15276s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsona45afca2012-08-30 14:32:02 +000015277s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015279"
Gregory P. Smith69140482012-01-16 02:05:55 -080015280eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15281 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015283test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Gregory P. Smith69140482012-01-16 02:05:55 -080015284 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15285 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15286 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 { $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 +000015288which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015289$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015290which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015291
Gregory P. Smith69140482012-01-16 02:05:55 -080015292 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015293 case $ac_file in
Gregory P. Smith69140482012-01-16 02:05:55 -080015294 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15295 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015296 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015297 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015298 ;;
15299 :H)
15300 #
15301 # CONFIG_HEADER
15302 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015304 {
15305 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015306 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15307 } >"$ac_tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015308 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080015309 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015310 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15311$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015312 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015313 rm -f "$ac_file"
Gregory P. Smith69140482012-01-16 02:05:55 -080015314 mv "$ac_tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015315 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015316 fi
15317 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015318 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015319 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015320 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015321 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015322 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015324
15325 esac
15326
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015327
15328 case $ac_file$ac_mode in
15329 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15330
15331 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332done # for ac_tag
15333
Guido van Rossum627b2d71993-12-24 10:39:16 +000015334
Matthias Kloseb9621712010-04-24 17:59:49 +000015335as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015336_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015337ac_clean_files=$ac_clean_files_save
15338
Matthias Kloseb9621712010-04-24 17:59:49 +000015339test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015340 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015341
Martin v. Löwis11437992002-04-12 09:54:03 +000015342
15343# configure is writing to config.log, and then calls config.status.
15344# config.status does its own redirection, appending to config.log.
15345# Unfortunately, on DOS this fails, as config.log is still kept open
15346# by configure, so config.status won't be able to write to it; its
15347# output is simply discarded. So we exec the FD to /dev/null,
15348# effectively closing config.log, so it can be properly (re)opened and
15349# appended to by config.status. When coming back to configure, we
15350# need to make the FD available again.
15351if test "$no_create" != yes; then
15352 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015353 ac_config_status_args=
15354 test "$silent" = yes &&
15355 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015356 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015357 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015358 exec 5>>config.log
15359 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15360 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015361 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015362fi
15363if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15364 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15365$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015366fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015367
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015368
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015369echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015370if test ! -f Modules/Setup
15371then
15372 cp $srcdir/Modules/Setup.dist Modules/Setup
15373fi
15374
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015375echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015376if test ! -f Modules/Setup.local
15377then
15378 echo "# Edit this file for local setup changes" >Modules/Setup.local
15379fi
15380
15381echo "creating Makefile"
15382$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15383 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015384 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015385mv config.c Modules