blob: 68e47842b564a551c63f74bd93c14b4e62563430 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +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+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +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 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +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.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# 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 Klosea0bea5d2010-05-08 10:00:28 +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
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 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 Klosea0bea5d2010-05-08 10:00:28 +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"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
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 Klosea0bea5d2010-05-08 10:00:28 +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
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +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
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +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 Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +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. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +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
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # 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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +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.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +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
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_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 Klosea0bea5d2010-05-08 10:00:28 +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.
Georg Brandl71f4fbb2011-02-25 11:04:50 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +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'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000586PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +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>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000627SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000628THREADHEADERS
629UNICODE_OBJS
630LIBC
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
662LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000663MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000664INSTALL_DATA
665INSTALL_SCRIPT
666INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100667HAS_HG
668HGBRANCH
669HGTAG
670HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400671BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000672SVNVERSION
673ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100674ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000675AR
676RANLIB
677GNULD
678LINKCC
679RUNSHARED
680INSTSONAME
681LDLIBRARYDIR
682BLDLIBRARY
683DLLLIBRARY
684LDLIBRARY
685LIBRARY
686BUILDEXEEXT
687EGREP
688GREP
689CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100690MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100691ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000692MAINCC
693CXX
694OBJEXT
695EXEEXT
696ac_ct_CC
697CPPFLAGS
698LDFLAGS
699CFLAGS
700CC
701EXPORT_MACOSX_DEPLOYMENT_TARGET
702CONFIGURE_MACOSX_DEPLOYMENT_TARGET
703EXTRAMACHDEPPATH
704EXTRAPLATDIR
705SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100706_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000707MACHDEP
708FRAMEWORKINSTALLAPPSPREFIX
709FRAMEWORKUNIXTOOLSPREFIX
710FRAMEWORKALTINSTALLLAST
711FRAMEWORKALTINSTALLFIRST
712FRAMEWORKINSTALLLAST
713FRAMEWORKINSTALLFIRST
714PYTHONFRAMEWORKINSTALLDIR
715PYTHONFRAMEWORKPREFIX
716PYTHONFRAMEWORKDIR
717PYTHONFRAMEWORKIDENTIFIER
718PYTHONFRAMEWORK
719LIPO_32BIT_FLAGS
720ARCH_RUN_32BIT
721UNIVERSALSDK
722CONFIG_ARGS
723SOVERSION
724VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100725PYTHON_FOR_BUILD
726host_os
727host_vendor
728host_cpu
729host
730build_os
731build_vendor
732build_cpu
733build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000734target_alias
735host_alias
736build_alias
737LIBS
738ECHO_T
739ECHO_N
740ECHO_C
741DEFS
742mandir
743localedir
744libdir
745psdir
746pdfdir
747dvidir
748htmldir
749infodir
750docdir
751oldincludedir
752includedir
753localstatedir
754sharedstatedir
755sysconfdir
756datadir
757datarootdir
758libexecdir
759sbindir
760bindir
761program_transform_name
762prefix
763exec_prefix
764PACKAGE_URL
765PACKAGE_BUGREPORT
766PACKAGE_STRING
767PACKAGE_VERSION
768PACKAGE_TARNAME
769PACKAGE_NAME
770PATH_SEPARATOR
771SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000772ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000773ac_user_opts='
774enable_option_checking
775enable_universalsdk
776with_universal_archs
777with_framework_name
778enable_framework
779with_gcc
780with_cxx_main
781with_suffix
782enable_shared
783enable_profiling
784with_pydebug
785enable_toolbox_glue
786with_libs
787with_system_expat
788with_system_ffi
789with_dbmliborder
790with_signal_module
791with_dec_threads
792with_threads
793with_thread
794with_pth
795enable_ipv6
796with_doc_strings
797with_tsc
798with_pymalloc
799with_valgrind
800with_wctype_functions
801with_fpectl
802with_libm
803with_libc
804enable_big_digits
805enable_unicode
806'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000807 ac_precious_vars='build_alias
808host_alias
809target_alias
810CC
811CFLAGS
812LDFLAGS
813LIBS
814CPPFLAGS
815CPP'
816
Guido van Rossum627b2d71993-12-24 10:39:16 +0000817
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000819ac_init_help=
820ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000821ac_unrecognized_opts=
822ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823# The variables have the same names as the options, with
824# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000825cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000826exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828no_recursion=
829prefix=NONE
830program_prefix=NONE
831program_suffix=NONE
832program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837x_includes=NONE
838x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000839
840# Installation directory options.
841# These are left unexpanded so users can "make install exec_prefix=/foo"
842# and all the variables that are supposed to be based on exec_prefix
843# by default will actually change.
844# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846bindir='${exec_prefix}/bin'
847sbindir='${exec_prefix}/sbin'
848libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000849datarootdir='${prefix}/share'
850datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851sysconfdir='${prefix}/etc'
852sharedstatedir='${prefix}/com'
853localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854includedir='${prefix}/include'
855oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000856docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
857infodir='${datarootdir}/info'
858htmldir='${docdir}'
859dvidir='${docdir}'
860pdfdir='${docdir}'
861psdir='${docdir}'
862libdir='${exec_prefix}/lib'
863localedir='${datarootdir}/locale'
864mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000867ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000869do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870 # If the previous option needs an argument, assign it.
871 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873 ac_prev=
874 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000875 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Martin v. Löwiseba40652007-08-30 20:10:57 +0000877 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000878 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
879 *=) ac_optarg= ;;
880 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000881 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883 # Accept the important Cygnus configure options, so we can diagnose typos.
884
Martin v. Löwiseba40652007-08-30 20:10:57 +0000885 case $ac_dashdash$ac_option in
886 --)
887 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889 -bindir | --bindir | --bindi | --bind | --bin | --bi)
890 ac_prev=bindir ;;
891 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000892 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893
894 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000895 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899 -cache-file | --cache-file | --cache-fil | --cache-fi \
900 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
901 ac_prev=cache_file ;;
902 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
903 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 cache_file=$ac_optarg ;;
905
906 --config-cache | -C)
907 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Martin v. Löwiseba40652007-08-30 20:10:57 +0000909 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000911 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913
Martin v. Löwiseba40652007-08-30 20:10:57 +0000914 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
915 | --dataroo | --dataro | --datar)
916 ac_prev=datarootdir ;;
917 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
918 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
919 datarootdir=$ac_optarg ;;
920
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000922 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000924 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000925 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000926 ac_useropt_orig=$ac_useropt
927 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
928 case $ac_user_opts in
929 *"
930"enable_$ac_useropt"
931"*) ;;
932 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
933 ac_unrecognized_sep=', ';;
934 esac
935 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000936
937 -docdir | --docdir | --docdi | --doc | --do)
938 ac_prev=docdir ;;
939 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
940 docdir=$ac_optarg ;;
941
942 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
943 ac_prev=dvidir ;;
944 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
945 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946
947 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000948 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000950 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000951 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000952 ac_useropt_orig=$ac_useropt
953 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
954 case $ac_user_opts in
955 *"
956"enable_$ac_useropt"
957"*) ;;
958 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
959 ac_unrecognized_sep=', ';;
960 esac
961 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
964 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
965 | --exec | --exe | --ex)
966 ac_prev=exec_prefix ;;
967 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
968 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
969 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971
972 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000973 # Obsolete; use --with-gas.
974 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 -help | --help | --hel | --he | -h)
977 ac_init_help=long ;;
978 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
979 ac_init_help=recursive ;;
980 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
981 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
Martin v. Löwiseba40652007-08-30 20:10:57 +0000988 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
989 ac_prev=htmldir ;;
990 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
991 | --ht=*)
992 htmldir=$ac_optarg ;;
993
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994 -includedir | --includedir | --includedi | --included | --include \
995 | --includ | --inclu | --incl | --inc)
996 ac_prev=includedir ;;
997 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
998 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
1001 -infodir | --infodir | --infodi | --infod | --info | --inf)
1002 ac_prev=infodir ;;
1003 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005
1006 -libdir | --libdir | --libdi | --libd)
1007 ac_prev=libdir ;;
1008 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010
1011 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1012 | --libexe | --libex | --libe)
1013 ac_prev=libexecdir ;;
1014 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1015 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
Martin v. Löwiseba40652007-08-30 20:10:57 +00001018 -localedir | --localedir | --localedi | --localed | --locale)
1019 ac_prev=localedir ;;
1020 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1021 localedir=$ac_optarg ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001024 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025 ac_prev=localstatedir ;;
1026 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001027 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
1030 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1031 ac_prev=mandir ;;
1032 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001036 # Obsolete; use --without-fp.
1037 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038
1039 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041 no_create=yes ;;
1042
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001043 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1044 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1045 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1048 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1049 | --oldin | --oldi | --old | --ol | --o)
1050 ac_prev=oldincludedir ;;
1051 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1052 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1053 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1057 ac_prev=prefix ;;
1058 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
1061 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1062 | --program-pre | --program-pr | --program-p)
1063 ac_prev=program_prefix ;;
1064 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1065 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1069 | --program-suf | --program-su | --program-s)
1070 ac_prev=program_suffix ;;
1071 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1072 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -program-transform-name | --program-transform-name \
1076 | --program-transform-nam | --program-transform-na \
1077 | --program-transform-n | --program-transform- \
1078 | --program-transform | --program-transfor \
1079 | --program-transfo | --program-transf \
1080 | --program-trans | --program-tran \
1081 | --progr-tra | --program-tr | --program-t)
1082 ac_prev=program_transform_name ;;
1083 -program-transform-name=* | --program-transform-name=* \
1084 | --program-transform-nam=* | --program-transform-na=* \
1085 | --program-transform-n=* | --program-transform-=* \
1086 | --program-transform=* | --program-transfor=* \
1087 | --program-transfo=* | --program-transf=* \
1088 | --program-trans=* | --program-tran=* \
1089 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
Martin v. Löwiseba40652007-08-30 20:10:57 +00001092 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1093 ac_prev=pdfdir ;;
1094 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1095 pdfdir=$ac_optarg ;;
1096
1097 -psdir | --psdir | --psdi | --psd | --ps)
1098 ac_prev=psdir ;;
1099 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1100 psdir=$ac_optarg ;;
1101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1103 | -silent | --silent | --silen | --sile | --sil)
1104 silent=yes ;;
1105
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001106 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1107 ac_prev=sbindir ;;
1108 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1109 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001111
1112 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1113 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1114 | --sharedst | --shareds | --shared | --share | --shar \
1115 | --sha | --sh)
1116 ac_prev=sharedstatedir ;;
1117 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1118 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1119 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1120 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001123 -site | --site | --sit)
1124 ac_prev=site ;;
1125 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1129 ac_prev=srcdir ;;
1130 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001133 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1134 | --syscon | --sysco | --sysc | --sys | --sy)
1135 ac_prev=sysconfdir ;;
1136 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1137 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001139
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
1145 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1146 verbose=yes ;;
1147
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 -version | --version | --versio | --versi | --vers | -V)
1149 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
1151 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001152 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001153 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001154 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001155 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001156 ac_useropt_orig=$ac_useropt
1157 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1158 case $ac_user_opts in
1159 *"
1160"with_$ac_useropt"
1161"*) ;;
1162 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1163 ac_unrecognized_sep=', ';;
1164 esac
1165 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
1167 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001168 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001170 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001171 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001172 ac_useropt_orig=$ac_useropt
1173 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1174 case $ac_user_opts in
1175 *"
1176"with_$ac_useropt"
1177"*) ;;
1178 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1179 ac_unrecognized_sep=', ';;
1180 esac
1181 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001183 --x)
1184 # Obsolete; use --with-x.
1185 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
1187 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1188 | --x-incl | --x-inc | --x-in | --x-i)
1189 ac_prev=x_includes ;;
1190 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1191 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1195 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1196 ac_prev=x_libraries ;;
1197 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1198 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001201 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1202Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203 ;;
1204
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 *=*)
1206 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1207 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001208 case $ac_envvar in #(
1209 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001210 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001211 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001212 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001213 export $ac_envvar ;;
1214
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001215 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001217 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001219 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001220 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221 ;;
1222
1223 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224done
1225
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001228 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229fi
1230
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001231if test -n "$ac_unrecognized_opts"; then
1232 case $enable_option_checking in
1233 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001234 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001235 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1236 esac
1237fi
1238
1239# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001240for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1241 datadir sysconfdir sharedstatedir localstatedir includedir \
1242 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1243 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001245 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001246 # Remove trailing slashes.
1247 case $ac_val in
1248 */ )
1249 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1250 eval $ac_var=\$ac_val;;
1251 esac
1252 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001254 [\\/$]* | ?:[\\/]* ) continue;;
1255 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001257 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001258done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001259
Martin v. Löwis11437992002-04-12 09:54:03 +00001260# There might be people who depend on the old broken behavior: `$host'
1261# used to hold the argument of --host etc.
1262# FIXME: To remove some day.
1263build=$build_alias
1264host=$host_alias
1265target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266
Martin v. Löwis11437992002-04-12 09:54:03 +00001267# FIXME: To remove some day.
1268if test "x$host_alias" != x; then
1269 if test "x$build_alias" = x; then
1270 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 elif test "x$build_alias" != "x$host_alias"; then
1272 cross_compiling=yes
1273 fi
1274fi
1275
1276ac_tool_prefix=
1277test -n "$host_alias" && ac_tool_prefix=$host_alias-
1278
1279test "$silent" = yes && exec 6>/dev/null
1280
Guido van Rossum627b2d71993-12-24 10:39:16 +00001281
Martin v. Löwiseba40652007-08-30 20:10:57 +00001282ac_pwd=`pwd` && test -n "$ac_pwd" &&
1283ac_ls_di=`ls -di .` &&
1284ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001285 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001286test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001287 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001288
1289
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290# Find the source files, if location was not specified.
1291if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001292 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001293 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001294 ac_confdir=`$as_dirname -- "$as_myself" ||
1295$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1296 X"$as_myself" : 'X\(//\)[^/]' \| \
1297 X"$as_myself" : 'X\(//\)$' \| \
1298 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1299$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001300 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1301 s//\1/
1302 q
1303 }
1304 /^X\(\/\/\)[^/].*/{
1305 s//\1/
1306 q
1307 }
1308 /^X\(\/\/\)$/{
1309 s//\1/
1310 q
1311 }
1312 /^X\(\/\).*/{
1313 s//\1/
1314 q
1315 }
1316 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001317 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001318 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319 srcdir=..
1320 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001321else
1322 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001324if test ! -r "$srcdir/$ac_unique_file"; then
1325 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001326 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001328ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1329ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001330 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001331 pwd)`
1332# When building in place, set srcdir=.
1333if test "$ac_abs_confdir" = "$ac_pwd"; then
1334 srcdir=.
1335fi
1336# Remove unnecessary trailing slashes from srcdir.
1337# Double slashes in file names in object file debugging info
1338# mess up M-x gdb in Emacs.
1339case $srcdir in
1340*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1341esac
1342for ac_var in $ac_precious_vars; do
1343 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1344 eval ac_env_${ac_var}_value=\$${ac_var}
1345 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1346 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1347done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001348
Martin v. Löwis11437992002-04-12 09:54:03 +00001349#
1350# Report the --help message.
1351#
1352if test "$ac_init_help" = "long"; then
1353 # Omit some internal or obsolete options to make the list less imposing.
1354 # This message is too long to be a string in the A/UX 3.1 sh.
1355 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001356\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001357
1358Usage: $0 [OPTION]... [VAR=VALUE]...
1359
1360To assign environment variables (e.g., CC, CFLAGS...), specify them as
1361VAR=VALUE. See below for descriptions of some of the useful variables.
1362
1363Defaults for the options are specified in brackets.
1364
1365Configuration:
1366 -h, --help display this help and exit
1367 --help=short display options specific to this package
1368 --help=recursive display the short help of all the included packages
1369 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001370 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001371 --cache-file=FILE cache test results in FILE [disabled]
1372 -C, --config-cache alias for \`--cache-file=config.cache'
1373 -n, --no-create do not create output files
1374 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1375
Martin v. Löwis11437992002-04-12 09:54:03 +00001376Installation directories:
1377 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001378 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001380 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
1382By default, \`make install' will install all the files in
1383\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1384an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1385for instance \`--prefix=\$HOME'.
1386
1387For better control, use the options below.
1388
1389Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001390 --bindir=DIR user executables [EPREFIX/bin]
1391 --sbindir=DIR system admin executables [EPREFIX/sbin]
1392 --libexecdir=DIR program executables [EPREFIX/libexec]
1393 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1394 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1395 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1396 --libdir=DIR object code libraries [EPREFIX/lib]
1397 --includedir=DIR C header files [PREFIX/include]
1398 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1399 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1400 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1401 --infodir=DIR info documentation [DATAROOTDIR/info]
1402 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1403 --mandir=DIR man documentation [DATAROOTDIR/man]
1404 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1405 --htmldir=DIR html documentation [DOCDIR]
1406 --dvidir=DIR dvi documentation [DOCDIR]
1407 --pdfdir=DIR pdf documentation [DOCDIR]
1408 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001409_ACEOF
1410
1411 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001412
1413System types:
1414 --build=BUILD configure for building on BUILD [guessed]
1415 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001416_ACEOF
1417fi
1418
1419if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001420 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001421 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001422 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 cat <<\_ACEOF
1424
1425Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001426 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1428 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001429 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001430 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001431 --enable-framework[=INSTALLDIR]
1432 Build (MacOSX|Darwin) framework
1433 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001434 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1436 --enable-ipv6 Enable ipv6 (with ipv4) support
1437 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001438 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001439 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001441 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001442
1443Optional Packages:
1444 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1445 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001446 --with-universal-archs=ARCH
1447 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001448 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001449 --with-framework-name=FRAMEWORK
1450 specify an alternate name of the framework built
1451 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001453 --with-cxx-main=<compiler>
1454 compile main() and link python executable with C++
1455 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --with-suffix=.exe set executable suffix
1457 --with-pydebug build with Py_DEBUG defined
1458 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001459 --with-system-expat build pyexpat module using an installed expat
1460 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001461 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001462 --with-dbmliborder=db1:db2:...
1463 order to check db backends for dbm. Valid value is a
1464 colon separated string with the backend names
1465 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001466 --with-signal-module disable/enable signal module
1467 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1468 --with(out)-threads[=DIRECTORY]
1469 disable/enable thread support
1470 --with(out)-thread[=DIRECTORY]
1471 deprecated; use --with(out)-threads
1472 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001474 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001476 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with-fpectl enable SIGFPE catching
1479 --with-libm=STRING math library
1480 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001481
1482Some influential environment variables:
1483 CC C compiler command
1484 CFLAGS C compiler flags
1485 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1486 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001487 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001488 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001489 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 CPP C preprocessor
1491
1492Use these variables to override the choices made by `configure' or to help
1493it to find libraries and programs with nonstandard names/locations.
1494
Georg Brandl464432d2009-05-20 18:24:08 +00001495Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001496_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001498fi
1499
1500if test "$ac_init_help" = "recursive"; then
1501 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001502 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001503 test -d "$ac_dir" ||
1504 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1505 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001506 ac_builddir=.
1507
Martin v. Löwiseba40652007-08-30 20:10:57 +00001508case "$ac_dir" in
1509.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1510*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001511 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001512 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001513 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001514 case $ac_top_builddir_sub in
1515 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1516 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1517 esac ;;
1518esac
1519ac_abs_top_builddir=$ac_pwd
1520ac_abs_builddir=$ac_pwd$ac_dir_suffix
1521# for backward compatibility:
1522ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001523
1524case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001525 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001527 ac_top_srcdir=$ac_top_builddir_sub
1528 ac_abs_top_srcdir=$ac_pwd ;;
1529 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001530 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001531 ac_top_srcdir=$srcdir
1532 ac_abs_top_srcdir=$srcdir ;;
1533 *) # Relative name.
1534 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1535 ac_top_srcdir=$ac_top_build_prefix$srcdir
1536 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001537esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001538ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539
Martin v. Löwiseba40652007-08-30 20:10:57 +00001540 cd "$ac_dir" || { ac_status=$?; continue; }
1541 # Check for guested configure.
1542 if test -f "$ac_srcdir/configure.gnu"; then
1543 echo &&
1544 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1545 elif test -f "$ac_srcdir/configure"; then
1546 echo &&
1547 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001548 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001549 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001550 fi || ac_status=$?
1551 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 done
1553fi
1554
Martin v. Löwiseba40652007-08-30 20:10:57 +00001555test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001556if $ac_init_version; then
1557 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001558python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001559generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001561Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562This configure script is free software; the Free Software Foundation
1563gives unlimited permission to copy, distribute and modify it.
1564_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001565 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001566fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001567
1568## ------------------------ ##
1569## Autoconf initialization. ##
1570## ------------------------ ##
1571
1572# ac_fn_c_try_compile LINENO
1573# --------------------------
1574# Try to compile conftest.$ac_ext, and return whether this succeeded.
1575ac_fn_c_try_compile ()
1576{
1577 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1578 rm -f conftest.$ac_objext
1579 if { { ac_try="$ac_compile"
1580case "(($ac_try" in
1581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1582 *) ac_try_echo=$ac_try;;
1583esac
1584eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1585$as_echo "$ac_try_echo"; } >&5
1586 (eval "$ac_compile") 2>conftest.err
1587 ac_status=$?
1588 if test -s conftest.err; then
1589 grep -v '^ *+' conftest.err >conftest.er1
1590 cat conftest.er1 >&5
1591 mv -f conftest.er1 conftest.err
1592 fi
1593 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1594 test $ac_status = 0; } && {
1595 test -z "$ac_c_werror_flag" ||
1596 test ! -s conftest.err
1597 } && test -s conftest.$ac_objext; then :
1598 ac_retval=0
1599else
1600 $as_echo "$as_me: failed program was:" >&5
1601sed 's/^/| /' conftest.$ac_ext >&5
1602
1603 ac_retval=1
1604fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001605 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001606 as_fn_set_status $ac_retval
1607
1608} # ac_fn_c_try_compile
1609
1610# ac_fn_c_try_cpp LINENO
1611# ----------------------
1612# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1613ac_fn_c_try_cpp ()
1614{
1615 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1616 if { { ac_try="$ac_cpp conftest.$ac_ext"
1617case "(($ac_try" in
1618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1619 *) ac_try_echo=$ac_try;;
1620esac
1621eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1622$as_echo "$ac_try_echo"; } >&5
1623 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1624 ac_status=$?
1625 if test -s conftest.err; then
1626 grep -v '^ *+' conftest.err >conftest.er1
1627 cat conftest.er1 >&5
1628 mv -f conftest.er1 conftest.err
1629 fi
1630 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001631 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001632 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1633 test ! -s conftest.err
1634 }; then :
1635 ac_retval=0
1636else
1637 $as_echo "$as_me: failed program was:" >&5
1638sed 's/^/| /' conftest.$ac_ext >&5
1639
1640 ac_retval=1
1641fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001642 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001643 as_fn_set_status $ac_retval
1644
1645} # ac_fn_c_try_cpp
1646
1647# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1648# -------------------------------------------------------
1649# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1650# the include files in INCLUDES and setting the cache variable VAR
1651# accordingly.
1652ac_fn_c_check_header_mongrel ()
1653{
1654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001655 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1657$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001658if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001659 $as_echo_n "(cached) " >&6
1660fi
1661eval ac_res=\$$3
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1663$as_echo "$ac_res" >&6; }
1664else
1665 # Is the header compilable?
1666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1667$as_echo_n "checking $2 usability... " >&6; }
1668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1669/* end confdefs.h. */
1670$4
1671#include <$2>
1672_ACEOF
1673if ac_fn_c_try_compile "$LINENO"; then :
1674 ac_header_compiler=yes
1675else
1676 ac_header_compiler=no
1677fi
1678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1680$as_echo "$ac_header_compiler" >&6; }
1681
1682# Is the header present?
1683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1684$as_echo_n "checking $2 presence... " >&6; }
1685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1686/* end confdefs.h. */
1687#include <$2>
1688_ACEOF
1689if ac_fn_c_try_cpp "$LINENO"; then :
1690 ac_header_preproc=yes
1691else
1692 ac_header_preproc=no
1693fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001694rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1696$as_echo "$ac_header_preproc" >&6; }
1697
1698# So? What about this header?
1699case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1700 yes:no: )
1701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1702$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1704$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1705 ;;
1706 no:yes:* )
1707 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1708$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1710$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1712$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1714$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1716$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001717( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001718## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001719## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001720 ) | sed "s/^/$as_me: WARNING: /" >&2
1721 ;;
1722esac
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1724$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001725if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001726 $as_echo_n "(cached) " >&6
1727else
1728 eval "$3=\$ac_header_compiler"
1729fi
1730eval ac_res=\$$3
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1732$as_echo "$ac_res" >&6; }
1733fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001734 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001735
1736} # ac_fn_c_check_header_mongrel
1737
1738# ac_fn_c_try_run LINENO
1739# ----------------------
1740# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1741# that executables *can* be run.
1742ac_fn_c_try_run ()
1743{
1744 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1745 if { { ac_try="$ac_link"
1746case "(($ac_try" in
1747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1748 *) ac_try_echo=$ac_try;;
1749esac
1750eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1751$as_echo "$ac_try_echo"; } >&5
1752 (eval "$ac_link") 2>&5
1753 ac_status=$?
1754 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1755 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1756 { { case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759esac
1760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761$as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_try") 2>&5
1763 ac_status=$?
1764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1765 test $ac_status = 0; }; }; then :
1766 ac_retval=0
1767else
1768 $as_echo "$as_me: program exited with status $ac_status" >&5
1769 $as_echo "$as_me: failed program was:" >&5
1770sed 's/^/| /' conftest.$ac_ext >&5
1771
1772 ac_retval=$ac_status
1773fi
1774 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001775 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001776 as_fn_set_status $ac_retval
1777
1778} # ac_fn_c_try_run
1779
1780# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1781# -------------------------------------------------------
1782# Tests whether HEADER exists and can be compiled using the include files in
1783# INCLUDES, setting the cache variable VAR accordingly.
1784ac_fn_c_check_header_compile ()
1785{
1786 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1788$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001789if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001790 $as_echo_n "(cached) " >&6
1791else
1792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1793/* end confdefs.h. */
1794$4
1795#include <$2>
1796_ACEOF
1797if ac_fn_c_try_compile "$LINENO"; then :
1798 eval "$3=yes"
1799else
1800 eval "$3=no"
1801fi
1802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1803fi
1804eval ac_res=\$$3
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1806$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001807 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001808
1809} # ac_fn_c_check_header_compile
1810
1811# ac_fn_c_try_link LINENO
1812# -----------------------
1813# Try to link conftest.$ac_ext, and return whether this succeeded.
1814ac_fn_c_try_link ()
1815{
1816 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817 rm -f conftest.$ac_objext conftest$ac_exeext
1818 if { { ac_try="$ac_link"
1819case "(($ac_try" in
1820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1821 *) ac_try_echo=$ac_try;;
1822esac
1823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1824$as_echo "$ac_try_echo"; } >&5
1825 (eval "$ac_link") 2>conftest.err
1826 ac_status=$?
1827 if test -s conftest.err; then
1828 grep -v '^ *+' conftest.err >conftest.er1
1829 cat conftest.er1 >&5
1830 mv -f conftest.er1 conftest.err
1831 fi
1832 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1833 test $ac_status = 0; } && {
1834 test -z "$ac_c_werror_flag" ||
1835 test ! -s conftest.err
1836 } && test -s conftest$ac_exeext && {
1837 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001838 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001839 }; then :
1840 ac_retval=0
1841else
1842 $as_echo "$as_me: failed program was:" >&5
1843sed 's/^/| /' conftest.$ac_ext >&5
1844
1845 ac_retval=1
1846fi
1847 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1848 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1849 # interfere with the next link command; also delete a directory that is
1850 # left behind by Apple's compiler. We do this before executing the actions.
1851 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001852 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001853 as_fn_set_status $ac_retval
1854
1855} # ac_fn_c_try_link
1856
1857# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1858# -------------------------------------------
1859# Tests whether TYPE exists after having included INCLUDES, setting cache
1860# variable VAR accordingly.
1861ac_fn_c_check_type ()
1862{
1863 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1865$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001866if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001867 $as_echo_n "(cached) " >&6
1868else
1869 eval "$3=no"
1870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1871/* end confdefs.h. */
1872$4
1873int
1874main ()
1875{
1876if (sizeof ($2))
1877 return 0;
1878 ;
1879 return 0;
1880}
1881_ACEOF
1882if ac_fn_c_try_compile "$LINENO"; then :
1883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1884/* end confdefs.h. */
1885$4
1886int
1887main ()
1888{
1889if (sizeof (($2)))
1890 return 0;
1891 ;
1892 return 0;
1893}
1894_ACEOF
1895if ac_fn_c_try_compile "$LINENO"; then :
1896
1897else
1898 eval "$3=yes"
1899fi
1900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1901fi
1902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1903fi
1904eval ac_res=\$$3
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1906$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001907 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001908
1909} # ac_fn_c_check_type
1910
1911# ac_fn_c_find_uintX_t LINENO BITS VAR
1912# ------------------------------------
1913# Finds an unsigned integer type with width BITS, setting cache variable VAR
1914# accordingly.
1915ac_fn_c_find_uintX_t ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1919$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001920if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=no"
1924 # Order is important - never check a type that is potentially smaller
1925 # than half of the expected target width.
1926 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1927 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1929/* end confdefs.h. */
1930$ac_includes_default
1931int
1932main ()
1933{
1934static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001935test_array [0] = 0;
1936return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001937
1938 ;
1939 return 0;
1940}
1941_ACEOF
1942if ac_fn_c_try_compile "$LINENO"; then :
1943 case $ac_type in #(
1944 uint$2_t) :
1945 eval "$3=yes" ;; #(
1946 *) :
1947 eval "$3=\$ac_type" ;;
1948esac
1949fi
1950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001951 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001952
1953else
1954 break
1955fi
1956 done
1957fi
1958eval ac_res=\$$3
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1960$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001961 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001962
1963} # ac_fn_c_find_uintX_t
1964
1965# ac_fn_c_find_intX_t LINENO BITS VAR
1966# -----------------------------------
1967# Finds a signed integer type with width BITS, setting cache variable VAR
1968# accordingly.
1969ac_fn_c_find_intX_t ()
1970{
1971 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1973$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001974if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001975 $as_echo_n "(cached) " >&6
1976else
1977 eval "$3=no"
1978 # Order is important - never check a type that is potentially smaller
1979 # than half of the expected target width.
1980 for ac_type in int$2_t 'int' 'long int' \
1981 'long long int' 'short int' 'signed char'; do
1982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1983/* end confdefs.h. */
1984$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001985 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001986int
1987main ()
1988{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001989static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001990test_array [0] = 0;
1991return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001992
1993 ;
1994 return 0;
1995}
1996_ACEOF
1997if ac_fn_c_try_compile "$LINENO"; then :
1998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002001 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002002int
2003main ()
2004{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002005static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002006 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002007test_array [0] = 0;
2008return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002009
2010 ;
2011 return 0;
2012}
2013_ACEOF
2014if ac_fn_c_try_compile "$LINENO"; then :
2015
2016else
2017 case $ac_type in #(
2018 int$2_t) :
2019 eval "$3=yes" ;; #(
2020 *) :
2021 eval "$3=\$ac_type" ;;
2022esac
2023fi
2024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2025fi
2026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002027 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002028
2029else
2030 break
2031fi
2032 done
2033fi
2034eval ac_res=\$$3
2035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2036$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002037 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002038
2039} # ac_fn_c_find_intX_t
2040
2041# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2042# --------------------------------------------
2043# Tries to find the compile-time value of EXPR in a program that includes
2044# INCLUDES, setting VAR accordingly. Returns whether the value could be
2045# computed
2046ac_fn_c_compute_int ()
2047{
2048 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2049 if test "$cross_compiling" = yes; then
2050 # Depending upon the size, compute the lo and hi bounds.
2051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$4
2054int
2055main ()
2056{
2057static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002058test_array [0] = 0;
2059return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 ac_lo=0 ac_mid=0
2067 while :; do
2068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069/* end confdefs.h. */
2070$4
2071int
2072main ()
2073{
2074static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002075test_array [0] = 0;
2076return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083 ac_hi=$ac_mid; break
2084else
2085 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2086 if test $ac_lo -le $ac_mid; then
2087 ac_lo= ac_hi=
2088 break
2089 fi
2090 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093 done
2094else
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002102test_array [0] = 0;
2103return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002104
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_hi=-1 ac_mid=-1
2111 while :; do
2112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113/* end confdefs.h. */
2114$4
2115int
2116main ()
2117{
2118static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002119test_array [0] = 0;
2120return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002121
2122 ;
2123 return 0;
2124}
2125_ACEOF
2126if ac_fn_c_try_compile "$LINENO"; then :
2127 ac_lo=$ac_mid; break
2128else
2129 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2130 if test $ac_mid -le $ac_hi; then
2131 ac_lo= ac_hi=
2132 break
2133 fi
2134 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2135fi
2136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2137 done
2138else
2139 ac_lo= ac_hi=
2140fi
2141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2142fi
2143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144# Binary search between lo and hi bounds.
2145while test "x$ac_lo" != "x$ac_hi"; do
2146 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148/* end confdefs.h. */
2149$4
2150int
2151main ()
2152{
2153static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002154test_array [0] = 0;
2155return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002156
2157 ;
2158 return 0;
2159}
2160_ACEOF
2161if ac_fn_c_try_compile "$LINENO"; then :
2162 ac_hi=$ac_mid
2163else
2164 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167done
2168case $ac_lo in #((
2169?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2170'') ac_retval=1 ;;
2171esac
2172 else
2173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174/* end confdefs.h. */
2175$4
2176static long int longval () { return $2; }
2177static unsigned long int ulongval () { return $2; }
2178#include <stdio.h>
2179#include <stdlib.h>
2180int
2181main ()
2182{
2183
2184 FILE *f = fopen ("conftest.val", "w");
2185 if (! f)
2186 return 1;
2187 if (($2) < 0)
2188 {
2189 long int i = longval ();
2190 if (i != ($2))
2191 return 1;
2192 fprintf (f, "%ld", i);
2193 }
2194 else
2195 {
2196 unsigned long int i = ulongval ();
2197 if (i != ($2))
2198 return 1;
2199 fprintf (f, "%lu", i);
2200 }
2201 /* Do not output a trailing newline, as this causes \r\n confusion
2202 on some platforms. */
2203 return ferror (f) || fclose (f) != 0;
2204
2205 ;
2206 return 0;
2207}
2208_ACEOF
2209if ac_fn_c_try_run "$LINENO"; then :
2210 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2211else
2212 ac_retval=1
2213fi
2214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2215 conftest.$ac_objext conftest.beam conftest.$ac_ext
2216rm -f conftest.val
2217
2218 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002219 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002220 as_fn_set_status $ac_retval
2221
2222} # ac_fn_c_compute_int
2223
2224# ac_fn_c_check_func LINENO FUNC VAR
2225# ----------------------------------
2226# Tests whether FUNC exists, setting the cache variable VAR accordingly
2227ac_fn_c_check_func ()
2228{
2229 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2231$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002232if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002233 $as_echo_n "(cached) " >&6
2234else
2235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236/* end confdefs.h. */
2237/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2238 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2239#define $2 innocuous_$2
2240
2241/* System header to define __stub macros and hopefully few prototypes,
2242 which can conflict with char $2 (); below.
2243 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2244 <limits.h> exists even on freestanding compilers. */
2245
2246#ifdef __STDC__
2247# include <limits.h>
2248#else
2249# include <assert.h>
2250#endif
2251
2252#undef $2
2253
2254/* Override any GCC internal prototype to avoid an error.
2255 Use char because int might match the return type of a GCC
2256 builtin and then its argument prototype would still apply. */
2257#ifdef __cplusplus
2258extern "C"
2259#endif
2260char $2 ();
2261/* The GNU C library defines this for functions which it implements
2262 to always fail with ENOSYS. Some functions are actually named
2263 something starting with __ and the normal name is an alias. */
2264#if defined __stub_$2 || defined __stub___$2
2265choke me
2266#endif
2267
2268int
2269main ()
2270{
2271return $2 ();
2272 ;
2273 return 0;
2274}
2275_ACEOF
2276if ac_fn_c_try_link "$LINENO"; then :
2277 eval "$3=yes"
2278else
2279 eval "$3=no"
2280fi
2281rm -f core conftest.err conftest.$ac_objext \
2282 conftest$ac_exeext conftest.$ac_ext
2283fi
2284eval ac_res=\$$3
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2286$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002287 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002288
2289} # ac_fn_c_check_func
2290
2291# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2292# ----------------------------------------------------
2293# Tries to find if the field MEMBER exists in type AGGR, after including
2294# INCLUDES, setting cache variable VAR accordingly.
2295ac_fn_c_check_member ()
2296{
2297 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2299$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002300if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$5
2306int
2307main ()
2308{
2309static $2 ac_aggr;
2310if (ac_aggr.$3)
2311return 0;
2312 ;
2313 return 0;
2314}
2315_ACEOF
2316if ac_fn_c_try_compile "$LINENO"; then :
2317 eval "$4=yes"
2318else
2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h. */
2321$5
2322int
2323main ()
2324{
2325static $2 ac_aggr;
2326if (sizeof ac_aggr.$3)
2327return 0;
2328 ;
2329 return 0;
2330}
2331_ACEOF
2332if ac_fn_c_try_compile "$LINENO"; then :
2333 eval "$4=yes"
2334else
2335 eval "$4=no"
2336fi
2337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2338fi
2339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340fi
2341eval ac_res=\$$4
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2343$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002344 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002345
2346} # ac_fn_c_check_member
2347
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002348# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2349# ---------------------------------------------
2350# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2351# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002352ac_fn_c_check_decl ()
2353{
2354 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002355 as_decl_name=`echo $2|sed 's/ *(.*//'`
2356 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2358$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002359if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002360 $as_echo_n "(cached) " >&6
2361else
2362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2363/* end confdefs.h. */
2364$4
2365int
2366main ()
2367{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002368#ifndef $as_decl_name
2369#ifdef __cplusplus
2370 (void) $as_decl_use;
2371#else
2372 (void) $as_decl_name;
2373#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002374#endif
2375
2376 ;
2377 return 0;
2378}
2379_ACEOF
2380if ac_fn_c_try_compile "$LINENO"; then :
2381 eval "$3=yes"
2382else
2383 eval "$3=no"
2384fi
2385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2386fi
2387eval ac_res=\$$3
2388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2389$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002390 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002391
2392} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002393cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002394This file contains any messages produced by compilers while
2395running configure, to aid debugging if configure makes a mistake.
2396
Martin v. Löwis174440b2008-10-03 08:59:41 +00002397It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002398generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002399
2400 $ $0 $@
2401
2402_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002403exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002404{
2405cat <<_ASUNAME
2406## --------- ##
2407## Platform. ##
2408## --------- ##
2409
2410hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2411uname -m = `(uname -m) 2>/dev/null || echo unknown`
2412uname -r = `(uname -r) 2>/dev/null || echo unknown`
2413uname -s = `(uname -s) 2>/dev/null || echo unknown`
2414uname -v = `(uname -v) 2>/dev/null || echo unknown`
2415
2416/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2417/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2418
2419/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2420/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2421/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002422/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002423/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2424/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2425/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2426
2427_ASUNAME
2428
2429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2430for as_dir in $PATH
2431do
2432 IFS=$as_save_IFS
2433 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002434 $as_echo "PATH: $as_dir"
2435 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002436IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002437
2438} >&5
2439
2440cat >&5 <<_ACEOF
2441
2442
2443## ----------- ##
2444## Core tests. ##
2445## ----------- ##
2446
2447_ACEOF
2448
2449
2450# Keep a trace of the command line.
2451# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002452# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002453# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002454# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002455ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002456ac_configure_args0=
2457ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002458ac_must_keep_next=false
2459for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002460do
Skip Montanaro6dead952003-09-25 14:50:04 +00002461 for ac_arg
2462 do
2463 case $ac_arg in
2464 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2465 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2466 | -silent | --silent | --silen | --sile | --sil)
2467 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002469 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002470 esac
2471 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002472 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002473 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002474 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002475 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002476 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002477 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002478 case $ac_arg in
2479 *=* | --config-cache | -C | -disable-* | --disable-* \
2480 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2481 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2482 | -with-* | --with-* | -without-* | --without-* | --x)
2483 case "$ac_configure_args0 " in
2484 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2485 esac
2486 ;;
2487 -* ) ac_must_keep_next=true ;;
2488 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002489 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002490 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 ;;
2492 esac
2493 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002494done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002495{ ac_configure_args0=; unset ac_configure_args0;}
2496{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002497
2498# When interrupted or exit'd, cleanup temporary files, and complete
2499# config.log. We remove comments because anyway the quotes in there
2500# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002501# WARNING: Use '\'' to represent an apostrophe within the trap.
2502# 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 +00002503trap 'exit_status=$?
2504 # Save into config.log some information that might help in debugging.
2505 {
2506 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002507
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002508 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002509## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002510## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002511 echo
2512 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002513(
2514 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2515 eval ac_val=\$$ac_var
2516 case $ac_val in #(
2517 *${as_nl}*)
2518 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002519 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2520$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002521 esac
2522 case $ac_var in #(
2523 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002524 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2525 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002526 esac ;;
2527 esac
2528 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002530 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2531 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002533 "s/'\''/'\''\\\\'\'''\''/g;
2534 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2535 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002536 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002537 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002538 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002539 esac |
2540 sort
2541)
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002543
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002544 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002545## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002546## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002547 echo
2548 for ac_var in $ac_subst_vars
2549 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002550 eval ac_val=\$$ac_var
2551 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002552 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002553 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002554 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 done | sort
2556 echo
2557
2558 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002559 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002560## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002561## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002562 echo
2563 for ac_var in $ac_subst_files
2564 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002565 eval ac_val=\$$ac_var
2566 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002567 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002568 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002569 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002570 done | sort
2571 echo
2572 fi
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002575 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002576## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002577## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002579 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 echo
2581 fi
2582 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002583 $as_echo "$as_me: caught signal $ac_signal"
2584 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002585 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002586 rm -f core *.core core.conftest.* &&
2587 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002590for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002591 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002592done
2593ac_signal=0
2594
2595# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002597
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002598$as_echo "/* confdefs.h */" > confdefs.h
2599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600# Predefined preprocessor variables.
2601
2602cat >>confdefs.h <<_ACEOF
2603#define PACKAGE_NAME "$PACKAGE_NAME"
2604_ACEOF
2605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606cat >>confdefs.h <<_ACEOF
2607#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2608_ACEOF
2609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_VERSION "$PACKAGE_VERSION"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_STRING "$PACKAGE_STRING"
2616_ACEOF
2617
Martin v. Löwis11437992002-04-12 09:54:03 +00002618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2620_ACEOF
2621
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_URL "$PACKAGE_URL"
2624_ACEOF
2625
Martin v. Löwis11437992002-04-12 09:54:03 +00002626
2627# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002628# Prefer an explicitly selected file to automatically selected ones.
2629ac_site_file1=NONE
2630ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002631if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002632 # We do not want a PATH search for config.site.
2633 case $CONFIG_SITE in #((
2634 -*) ac_site_file1=./$CONFIG_SITE;;
2635 */*) ac_site_file1=$CONFIG_SITE;;
2636 *) ac_site_file1=./$CONFIG_SITE;;
2637 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002638elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002639 ac_site_file1=$prefix/share/config.site
2640 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002641else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002642 ac_site_file1=$ac_default_prefix/share/config.site
2643 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002644fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002645for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002646do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002647 test "x$ac_site_file" = xNONE && continue
2648 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2650$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002652 . "$ac_site_file" \
2653 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2655as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002656See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002657 fi
2658done
2659
2660if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002661 # Some versions of bash will fail to source /dev/null (special files
2662 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2663 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2665$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002667 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2668 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 esac
2670 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002671else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002672 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2673$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 >$cache_file
2675fi
2676
2677# Check that the precious variables saved in the cache have kept the same
2678# value.
2679ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002680for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2682 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002683 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2684 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 case $ac_old_set,$ac_new_set in
2686 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002687 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2688$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 +00002689 ac_cache_corrupted=: ;;
2690 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002691 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2692$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 ac_cache_corrupted=: ;;
2694 ,);;
2695 *)
2696 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002697 # differences in whitespace do not lead to failure.
2698 ac_old_val_w=`echo x $ac_old_val`
2699 ac_new_val_w=`echo x $ac_new_val`
2700 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2702$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2703 ac_cache_corrupted=:
2704 else
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2706$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2707 eval $ac_var=\$ac_old_val
2708 fi
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2710$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2712$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 fi;;
2714 esac
2715 # Pass precious variables to config.status.
2716 if test "$ac_new_set" = set; then
2717 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002718 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 *) ac_arg=$ac_var=$ac_new_val ;;
2720 esac
2721 case " $ac_configure_args " in
2722 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002723 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 esac
2725 fi
2726done
2727if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002728 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2729$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2731$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002732 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002733fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002734## -------------------- ##
2735## Main body of script. ##
2736## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002737
Guido van Rossum7f43da71994-08-01 12:15:30 +00002738ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002739ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002740ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2741ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2742ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002743
Guido van Rossum627b2d71993-12-24 10:39:16 +00002744
Michael W. Hudson54241132001-12-07 15:38:26 +00002745
Martin v. Löwiseba40652007-08-30 20:10:57 +00002746ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002747
2748
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002749ac_aux_dir=
2750for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2751 if test -f "$ac_dir/install-sh"; then
2752 ac_aux_dir=$ac_dir
2753 ac_install_sh="$ac_aux_dir/install-sh -c"
2754 break
2755 elif test -f "$ac_dir/install.sh"; then
2756 ac_aux_dir=$ac_dir
2757 ac_install_sh="$ac_aux_dir/install.sh -c"
2758 break
2759 elif test -f "$ac_dir/shtool"; then
2760 ac_aux_dir=$ac_dir
2761 ac_install_sh="$ac_aux_dir/shtool install -c"
2762 break
2763 fi
2764done
2765if test -z "$ac_aux_dir"; then
2766 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2767fi
2768
2769# These three variables are undocumented and unsupported,
2770# and are intended to be withdrawn in a future Autoconf release.
2771# They can cause serious problems if a builder's source tree is in a directory
2772# whose full name contains unusual characters.
2773ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2774ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2775ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2776
2777
2778# Make sure we can run config.sub.
2779$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2780 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2781
2782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2783$as_echo_n "checking build system type... " >&6; }
2784if ${ac_cv_build+:} false; then :
2785 $as_echo_n "(cached) " >&6
2786else
2787 ac_build_alias=$build_alias
2788test "x$ac_build_alias" = x &&
2789 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2790test "x$ac_build_alias" = x &&
2791 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2792ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2793 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2794
2795fi
2796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2797$as_echo "$ac_cv_build" >&6; }
2798case $ac_cv_build in
2799*-*-*) ;;
2800*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2801esac
2802build=$ac_cv_build
2803ac_save_IFS=$IFS; IFS='-'
2804set x $ac_cv_build
2805shift
2806build_cpu=$1
2807build_vendor=$2
2808shift; shift
2809# Remember, the first character of IFS is used to create $*,
2810# except with old shells:
2811build_os=$*
2812IFS=$ac_save_IFS
2813case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2814
2815
2816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2817$as_echo_n "checking host system type... " >&6; }
2818if ${ac_cv_host+:} false; then :
2819 $as_echo_n "(cached) " >&6
2820else
2821 if test "x$host_alias" = x; then
2822 ac_cv_host=$ac_cv_build
2823else
2824 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2825 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2826fi
2827
2828fi
2829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2830$as_echo "$ac_cv_host" >&6; }
2831case $ac_cv_host in
2832*-*-*) ;;
2833*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2834esac
2835host=$ac_cv_host
2836ac_save_IFS=$IFS; IFS='-'
2837set x $ac_cv_host
2838shift
2839host_cpu=$1
2840host_vendor=$2
2841shift; shift
2842# Remember, the first character of IFS is used to create $*,
2843# except with old shells:
2844host_os=$*
2845IFS=$ac_save_IFS
2846case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2847
2848
2849
2850
2851
2852if test "$cross_compiling" = yes; then
2853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2854$as_echo_n "checking for python interpreter for cross build... " >&6; }
2855 if test -z "$PYTHON_FOR_BUILD"; then
2856 for interp in python$PACKAGE_VERSION python2 python; do
2857 which $interp >/dev/null 2>&1 || continue
2858 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2859 break
2860 fi
2861 interp=
2862 done
2863 if test x$interp = x; then
2864 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2865 fi
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2867$as_echo "$interp" >&6; }
2868 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
2869 fi
2870elif test "$cross_compiling" = maybe; then
2871 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2872else
2873 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2874fi
2875
2876
Martin v. Löwis11437992002-04-12 09:54:03 +00002877
Georg Brandlbcd64a32009-03-31 21:45:18 +00002878if test "$prefix" != "/"; then
2879 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2880fi
2881
2882
Martin v. Löwis11437992002-04-12 09:54:03 +00002883
2884
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002885# We don't use PACKAGE_ variables, and they cause conflicts
2886# with other autoconf-based packages that include Python.h
2887grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2888rm confdefs.h
2889mv confdefs.h.new confdefs.h
2890
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002891
Martin v. Löwis174440b2008-10-03 08:59:41 +00002892VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002893
Martin v. Löwis1142de32002-03-29 16:28:31 +00002894
2895SOVERSION=1.0
2896
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002897# The later defininition of _XOPEN_SOURCE disables certain features
2898# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2899
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002900$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002901
2902
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002903# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2904# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2905# them.
2906
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002907$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002908
2909
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002910# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2911# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2912# them.
2913
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002914$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002915
2916
Martin v. Löwisd6320502004-08-12 13:45:08 +00002917# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2918# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2919
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002920$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002921
2922
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002923# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2924# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2925# them.
2926
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002927$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002928
2929
2930
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002931define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002932
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002933# Arguments passed to configure.
2934
2935CONFIG_ARGS="$ac_configure_args"
2936
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2938$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002939# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002940if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002941 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002942 case $enableval in
2943 yes)
2944 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002945 if test ! -d "${enableval}"
2946 then
2947 enableval=/
2948 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002949 ;;
2950 esac
2951 case $enableval in
2952 no)
2953 UNIVERSALSDK=
2954 enable_universalsdk=
2955 ;;
2956 *)
2957 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002958 if test ! -d "${UNIVERSALSDK}"
2959 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002960 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002961 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002962 ;;
2963 esac
2964
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002965
Ronald Oussoren988117f2006-04-29 11:31:35 +00002966else
2967
2968 UNIVERSALSDK=
2969 enable_universalsdk=
2970
Martin v. Löwiseba40652007-08-30 20:10:57 +00002971fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002972
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002973if test -n "${UNIVERSALSDK}"
2974then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2976$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002977else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2979$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002980fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002981
Martin v. Löwiseba40652007-08-30 20:10:57 +00002982
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002983
Ned Deily8e60f6e2013-05-30 00:14:29 -07002984ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002985
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002986UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002987
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2989$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002990
2991# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002992if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002993 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2995$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002996 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002997 if test "${enable_universalsdk}" ; then
2998 :
2999 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003000 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003001 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003002
3003else
3004
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3006$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003007
3008fi
3009
3010
3011
3012
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003013
3014# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003015if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003016 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003017 if test "${enable_framework}"; then
3018 :
3019 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003020 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003021 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003022 PYTHONFRAMEWORK=${withval}
3023 PYTHONFRAMEWORKDIR=${withval}.framework
3024 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3025
3026else
3027
3028 PYTHONFRAMEWORK=Python
3029 PYTHONFRAMEWORKDIR=Python.framework
3030 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3031
3032fi
3033
Martin v. Löwiseba40652007-08-30 20:10:57 +00003034# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003035if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003036 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003037 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003038 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003039 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003040 esac
3041 case $enableval in
3042 no)
3043 PYTHONFRAMEWORK=
3044 PYTHONFRAMEWORKDIR=no-framework
3045 PYTHONFRAMEWORKPREFIX=
3046 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003047 FRAMEWORKINSTALLFIRST=
3048 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003049 FRAMEWORKALTINSTALLFIRST=
3050 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003051 if test "x${prefix}" = "xNONE"; then
3052 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3053 else
3054 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3055 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003056 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003057 ;;
3058 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003059 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003060 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003061 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003062 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003063 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3064 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003065 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003066
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003067 if test "x${prefix}" = "xNONE" ; then
3068 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003069
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003070 else
3071 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3072 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003073
3074 case "${enableval}" in
3075 /System*)
3076 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3077 if test "${prefix}" = "NONE" ; then
3078 # See below
3079 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3080 fi
3081 ;;
3082
3083 /Library*)
3084 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3085 ;;
3086
3087 */Library/Frameworks)
3088 MDIR="`dirname "${enableval}"`"
3089 MDIR="`dirname "${MDIR}"`"
3090 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3091
3092 if test "${prefix}" = "NONE"; then
3093 # User hasn't specified the
3094 # --prefix option, but wants to install
3095 # the framework in a non-default location,
3096 # ensure that the compatibility links get
3097 # installed relative to that prefix as well
3098 # instead of in /usr/local.
3099 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3100 fi
3101 ;;
3102
3103 *)
3104 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3105 ;;
3106 esac
3107
Jack Jansen127e56e2001-09-11 14:41:54 +00003108 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003109
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003110 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003111 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003112 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003113
Martin v. Löwiseba40652007-08-30 20:10:57 +00003114 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003115
Martin v. Löwiseba40652007-08-30 20:10:57 +00003116 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003117
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003118 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3119
3120 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3121
Jack Jansene578a632001-08-15 01:27:14 +00003122 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003123
Guido van Rossum563e7081996-09-10 18:20:48 +00003124else
Martin v. Löwis11437992002-04-12 09:54:03 +00003125
Jack Jansene578a632001-08-15 01:27:14 +00003126 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003128 PYTHONFRAMEWORKPREFIX=
3129 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003130 FRAMEWORKINSTALLFIRST=
3131 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003132 FRAMEWORKALTINSTALLFIRST=
3133 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003134 if test "x${prefix}" = "xNONE" ; then
3135 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3136 else
3137 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3138 fi
Jack Jansene578a632001-08-15 01:27:14 +00003139 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003140
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003141
Martin v. Löwiseba40652007-08-30 20:10:57 +00003142fi
3143
Michael W. Hudson54241132001-12-07 15:38:26 +00003144
3145
3146
3147
Jack Jansene578a632001-08-15 01:27:14 +00003148
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003149
3150
Ronald Oussoren5b787322006-06-06 19:50:24 +00003151
3152
3153
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003154
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003155
Jack Jansene578a632001-08-15 01:27:14 +00003156##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003157## AS_HELP_STRING([--with-dyld],
3158## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003159##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003160# Set name for machine-dependent library files
3161
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3163$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003164if test -z "$MACHDEP"
3165then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003166 # avoid using uname for cross builds
3167 if test "$cross_compiling" = yes; then
3168 # ac_sys_system and ac_sys_release are only used for setting
3169 # `define_xopen_source' in the case statement below. For the
3170 # current supported cross builds, this macro is not adjusted.
3171 case "$host" in
3172 *-*-linux*)
3173 ac_sys_system=Linux
3174 ;;
3175 *-*-cygwin*)
3176 ac_sys_system=Cygwin
3177 ;;
3178 *)
3179 # for now, limit cross builds to known configurations
3180 MACHDEP="unknown"
3181 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3182 esac
3183 ac_sys_release=
3184 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003185 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003186 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003187 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003188 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003189 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003190 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003191 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003192 fi
3193 ac_md_system=`echo $ac_sys_system |
3194 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3195 ac_md_release=`echo $ac_sys_release |
3196 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3197 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003198
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003199 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003200 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003201 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003202 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003203 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003204 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003205 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003206 esac
3207fi
3208
3209
3210if test "$cross_compiling" = yes; then
3211 case "$host" in
3212 *-*-linux*)
3213 case "$host_cpu" in
3214 arm*)
3215 _host_cpu=arm
3216 ;;
3217 *)
3218 _host_cpu=$host_cpu
3219 esac
3220 ;;
3221 *-*-cygwin*)
3222 _host_cpu=
3223 ;;
3224 *)
3225 # for now, limit cross builds to known configurations
3226 MACHDEP="unknown"
3227 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003229 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003230fi
Guido van Rossum91922671997-10-09 20:24:13 +00003231
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003232# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3233# disable features if it is defined, without any means to access these
3234# features as extensions. For these systems, we skip the definition of
3235# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3236# some feature, make sure there is no alternative way to access this
3237# feature. Also, when using wildcards, make sure you have verified the
3238# need for not defining _XOPEN_SOURCE on all systems matching the
3239# wildcard, and that the wildcard does not include future systems
3240# (which may remove their limitations).
3241case $ac_sys_system/$ac_sys_release in
3242 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3243 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003244 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003245 # In addition, Stefan Krah confirms that issue #1244610 exists through
3246 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003247 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003248 define_xopen_source=no
3249 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3250 # also defined. This can be overridden by defining _BSD_SOURCE
3251 # As this has a different meaning on Linux, only define it on OpenBSD
3252
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003253$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003254
3255 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003256 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003257 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3258 # also defined. This can be overridden by defining _BSD_SOURCE
3259 # As this has a different meaning on Linux, only define it on OpenBSD
3260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003261$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003262
3263 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003264 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3265 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3266 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003267 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003268 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003269 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3270 # request to enable features supported by the standard as a request
3271 # to disable features not supported by the standard. The best way
3272 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3273 # entirely and define __EXTENSIONS__ instead.
3274 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003275 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003276 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3277 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003278 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003279 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003280 define_xopen_source=no;;
3281 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003282 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003283 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003284 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003285 # On FreeBSD 4, the math functions C89 does not cover are never defined
3286 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3287 FreeBSD/4.*)
3288 define_xopen_source=no;;
3289 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3290 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3291 # identifies itself as Darwin/7.*
3292 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3293 # disables platform specific features beyond repair.
3294 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3295 # has no effect, don't bother defining them
3296 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003297 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003298 Darwin/1[0-9].*)
3299 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003300 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3301 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3302 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003303 AIX/4)
3304 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003305 AIX/5)
3306 if test `uname -r` -eq 1; then
3307 define_xopen_source=no
3308 fi
3309 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003310 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3311 # defining NI_NUMERICHOST.
3312 QNX/6.3.2)
3313 define_xopen_source=no
3314 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003315
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003316esac
3317
3318if test $define_xopen_source = yes
3319then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003320
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003321$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003322
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003323
3324 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3325 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3326 # several APIs are not declared. Since this is also needed in some
3327 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003328
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003329$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003330
3331
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003332
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003333$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003334
3335
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003336fi
3337
Guido van Rossum91922671997-10-09 20:24:13 +00003338#
3339# SGI compilers allow the specification of the both the ABI and the
3340# ISA on the command line. Depending on the values of these switches,
3341# different and often incompatable code will be generated.
3342#
3343# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3344# thus supply support for various ABI/ISA combinations. The MACHDEP
3345# variable is also adjusted.
3346#
3347
3348if test ! -z "$SGI_ABI"
3349then
3350 CC="cc $SGI_ABI"
3351 LDFLAGS="$SGI_ABI $LDFLAGS"
3352 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3353fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3355$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003356
Jack Jansen83f898c2002-12-30 22:23:40 +00003357# And add extra plat-mac for darwin
3358
Jack Jansen7b59b422003-03-17 15:44:10 +00003359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3361$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003362if test -z "$EXTRAPLATDIR"
3363then
3364 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003365 darwin)
3366 EXTRAPLATDIR="\$(PLATMACDIRS)"
3367 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3368 ;;
3369 *)
3370 EXTRAPLATDIR=""
3371 EXTRAMACHDEPPATH=""
3372 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003373 esac
3374fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3376$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003377
Jack Jansen6b08a402004-06-03 12:41:45 +00003378# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3379# it may influence the way we can build extensions, so distutils
3380# needs to check it
3381
Ronald Oussoren988117f2006-04-29 11:31:35 +00003382
Jack Jansen6b08a402004-06-03 12:41:45 +00003383CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003384EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003385
Guido van Rossum627b2d71993-12-24 10:39:16 +00003386# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003387
3388# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3389# for debug/optimization stuff. BASECFLAGS is for flags that are required
3390# just to get things to compile and link. Users are free to override OPT
3391# when running configure or make. The build should not break if they do.
3392# BASECFLAGS should generally not be messed with, however.
3393
3394# XXX shouldn't some/most/all of this code be merged with the stuff later
3395# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3397$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003398
Martin v. Löwiseba40652007-08-30 20:10:57 +00003399# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003400if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003401 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003402 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003403 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003404 without_gcc=yes;;
3405 yes) CC=gcc
3406 without_gcc=no;;
3407 *) CC=$withval
3408 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003409 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003410else
Martin v. Löwis11437992002-04-12 09:54:03 +00003411
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003412 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003413 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003414 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003415 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003416 case $BE_HOST_CPU in
3417 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003418 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003419 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003420 BASECFLAGS="$BASECFLAGS -export pragma"
3421 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003422 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003423 ;;
3424 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003425 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003426 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003427 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003428 ;;
3429 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003430 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003431 ;;
3432 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003433 AR="\$(srcdir)/Modules/ar_beos"
3434 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003435 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003436 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003437 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003438fi
3439
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3441$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003442
Guido van Rossum8b131c51995-03-09 14:10:13 +00003443# If the user switches compilers, we can't believe the cache
3444if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3445then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003446 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003447(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003448fi
3449
Trent Nelson15daa352012-12-13 06:46:39 +00003450if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3451 # Normally, MIPSpro CC treats #error directives as warnings, which means
3452 # a successful exit code is returned (0). This is a problem because IRIX
3453 # has a bunch of system headers with this guard at the top:
3454 #
3455 # #ifndef __c99
3456 # #error This header file is to be used only for c99 mode compilations
3457 # #else
3458 #
3459 # When autoconf tests for such a header, like stdint.h, this happens:
3460 #
3461 # configure:4619: cc -c conftest.c >&5
3462 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3463 # #error directive: This header file is to be used only for c99 mode
3464 # compilations
3465 #
3466 # #error This header file is to be used only for c99 mode compilations
3467 # ^
3468 #
3469 # configure:4619: $? = 0
3470 # configure:4619: result: yes
3471 #
3472 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3473 # warning as an error, which causes cc to return a non-zero result,
3474 # which autoconf can interpret correctly.
3475 CFLAGS="$CFLAGS -diag_error 1035"
3476 # Whilst we're here, we might as well make sure CXX defaults to something
3477 # sensible if we're not using gcc.
3478 if test -z "$CXX"; then
3479 CXX="CC"
3480 fi
3481fi
3482
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003483# If the user set CFLAGS, use this instead of the automatically
3484# determined setting
3485preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003486ac_ext=c
3487ac_cpp='$CPP $CPPFLAGS'
3488ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3489ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3490ac_compiler_gnu=$ac_cv_c_compiler_gnu
3491if test -n "$ac_tool_prefix"; then
3492 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3493set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3495$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003496if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003497 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003498else
3499 if test -n "$CC"; then
3500 ac_cv_prog_CC="$CC" # Let the user override the test.
3501else
Martin v. Löwis11437992002-04-12 09:54:03 +00003502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3503for as_dir in $PATH
3504do
3505 IFS=$as_save_IFS
3506 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003507 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003508 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003509 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003510 $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 +00003511 break 2
3512 fi
3513done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003514 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003515IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003516
Jack Jansendd19cf82001-12-06 22:36:17 +00003517fi
3518fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003519CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003520if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3522$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003523else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3525$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003526fi
3527
Martin v. Löwiseba40652007-08-30 20:10:57 +00003528
Martin v. Löwis11437992002-04-12 09:54:03 +00003529fi
3530if test -z "$ac_cv_prog_CC"; then
3531 ac_ct_CC=$CC
3532 # Extract the first word of "gcc", so it can be a program name with args.
3533set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3535$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003536if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003537 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003538else
3539 if test -n "$ac_ct_CC"; then
3540 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3541else
3542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3543for as_dir in $PATH
3544do
3545 IFS=$as_save_IFS
3546 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003547 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003548 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003549 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003550 $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 +00003551 break 2
3552 fi
3553done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003554 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003555IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003556
3557fi
3558fi
3559ac_ct_CC=$ac_cv_prog_ac_ct_CC
3560if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3562$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003563else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3565$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003566fi
3567
Martin v. Löwiseba40652007-08-30 20:10:57 +00003568 if test "x$ac_ct_CC" = x; then
3569 CC=""
3570 else
3571 case $cross_compiling:$ac_tool_warned in
3572yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003573{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3574$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003575ac_tool_warned=yes ;;
3576esac
3577 CC=$ac_ct_CC
3578 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003579else
3580 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003581fi
3582
Jack Jansendd19cf82001-12-06 22:36:17 +00003583if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003584 if test -n "$ac_tool_prefix"; then
3585 # 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 +00003586set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3588$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003589if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003590 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003591else
3592 if test -n "$CC"; then
3593 ac_cv_prog_CC="$CC" # Let the user override the test.
3594else
Martin v. Löwis11437992002-04-12 09:54:03 +00003595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3596for as_dir in $PATH
3597do
3598 IFS=$as_save_IFS
3599 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003600 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003603 $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 +00003604 break 2
3605 fi
3606done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003607 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003608IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003609
3610fi
3611fi
3612CC=$ac_cv_prog_CC
3613if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3615$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003616else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3618$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003619fi
3620
Martin v. Löwiseba40652007-08-30 20:10:57 +00003621
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003623fi
3624if test -z "$CC"; then
3625 # Extract the first word of "cc", so it can be a program name with args.
3626set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3628$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003629if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003630 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003631else
3632 if test -n "$CC"; then
3633 ac_cv_prog_CC="$CC" # Let the user override the test.
3634else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003635 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3637for as_dir in $PATH
3638do
3639 IFS=$as_save_IFS
3640 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003641 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3644 ac_prog_rejected=yes
3645 continue
3646 fi
3647 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003648 $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 +00003649 break 2
3650 fi
3651done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003652 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003653IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003654
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003655if test $ac_prog_rejected = yes; then
3656 # We found a bogon in the path, so make sure we never use it.
3657 set dummy $ac_cv_prog_CC
3658 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003659 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003660 # We chose a different compiler from the bogus one.
3661 # However, it has the same basename, so the bogon will be chosen
3662 # first if we set CC to just the basename; use the full file name.
3663 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003664 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003665 fi
3666fi
3667fi
3668fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003669CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003670if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3672$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003673else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3675$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003676fi
3677
Martin v. Löwiseba40652007-08-30 20:10:57 +00003678
Martin v. Löwis11437992002-04-12 09:54:03 +00003679fi
3680if test -z "$CC"; then
3681 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003682 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 do
3684 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3685set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3687$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003688if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003689 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003690else
3691 if test -n "$CC"; then
3692 ac_cv_prog_CC="$CC" # Let the user override the test.
3693else
Martin v. Löwis11437992002-04-12 09:54:03 +00003694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3695for as_dir in $PATH
3696do
3697 IFS=$as_save_IFS
3698 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003699 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003702 $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 +00003703 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003704 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003705done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003706 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003707IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003708
3709fi
3710fi
3711CC=$ac_cv_prog_CC
3712if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3714$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003715else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3717$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003718fi
3719
Martin v. Löwiseba40652007-08-30 20:10:57 +00003720
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 test -n "$CC" && break
3722 done
3723fi
3724if test -z "$CC"; then
3725 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003726 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003727do
3728 # Extract the first word of "$ac_prog", so it can be a program name with args.
3729set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3731$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003732if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003733 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003734else
3735 if test -n "$ac_ct_CC"; then
3736 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3737else
3738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3739for as_dir in $PATH
3740do
3741 IFS=$as_save_IFS
3742 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003743 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003746 $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 +00003747 break 2
3748 fi
3749done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003750 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003751IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003752
Martin v. Löwis11437992002-04-12 09:54:03 +00003753fi
3754fi
3755ac_ct_CC=$ac_cv_prog_ac_ct_CC
3756if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3758$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003759else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3761$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003762fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003763
Martin v. Löwiseba40652007-08-30 20:10:57 +00003764
Martin v. Löwis11437992002-04-12 09:54:03 +00003765 test -n "$ac_ct_CC" && break
3766done
Michael W. Hudson54241132001-12-07 15:38:26 +00003767
Martin v. Löwiseba40652007-08-30 20:10:57 +00003768 if test "x$ac_ct_CC" = x; then
3769 CC=""
3770 else
3771 case $cross_compiling:$ac_tool_warned in
3772yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003773{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3774$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003775ac_tool_warned=yes ;;
3776esac
3777 CC=$ac_ct_CC
3778 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003779fi
3780
3781fi
3782
3783
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003784test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3785$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003786as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003787See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003788
3789# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003790$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3791set X $ac_compile
3792ac_compiler=$2
3793for ac_option in --version -v -V -qversion; do
3794 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003795case "(($ac_try" in
3796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3797 *) ac_try_echo=$ac_try;;
3798esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3800$as_echo "$ac_try_echo"; } >&5
3801 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003803 if test -s conftest.err; then
3804 sed '10a\
3805... rest of stderr output deleted ...
3806 10q' conftest.err >conftest.er1
3807 cat conftest.er1 >&5
3808 fi
3809 rm -f conftest.er1 conftest.err
3810 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3811 test $ac_status = 0; }
3812done
Martin v. Löwis11437992002-04-12 09:54:03 +00003813
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003815/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817int
3818main ()
3819{
3820
3821 ;
3822 return 0;
3823}
3824_ACEOF
3825ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003826ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003827# Try to create an executable without -o first, disregard a.out.
3828# It will help us diagnose broken compilers, and finding out an intuition
3829# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3831$as_echo_n "checking whether the C compiler works... " >&6; }
3832ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3833
3834# The possible output files:
3835ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3836
Martin v. Löwiseba40652007-08-30 20:10:57 +00003837ac_rmfiles=
3838for ac_file in $ac_files
3839do
3840 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003841 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003842 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3843 esac
3844done
3845rm -f $ac_rmfiles
3846
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003847if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003848case "(($ac_try" in
3849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3850 *) ac_try_echo=$ac_try;;
3851esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003852eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3853$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003854 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003856 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3857 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003858 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3859# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3860# in a Makefile. We should not override ac_cv_exeext if it was cached,
3861# so that the user can short-circuit this test for compilers unknown to
3862# Autoconf.
3863for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003864do
3865 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003867 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003868 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003869 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003870 # We found the default executable, but exeext='' is most
3871 # certainly right.
3872 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003873 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003874 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003875 then :; else
3876 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3877 fi
3878 # We set ac_cv_exeext here because the later test for it is not
3879 # safe: cross compilers may not add the suffix if given an `-o'
3880 # argument, so we may need to know it at that point already.
3881 # Even if this section looks crufty: it has the advantage of
3882 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003883 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003884 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003885 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003886 esac
3887done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888test "$ac_cv_exeext" = no && ac_cv_exeext=
3889
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003890else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003891 ac_file=''
3892fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003893if test -z "$ac_file"; then :
3894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3895$as_echo "no" >&6; }
3896$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003897sed 's/^/| /' conftest.$ac_ext >&5
3898
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003899{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003901as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003902See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003903else
3904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3905$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003906fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3908$as_echo_n "checking for C compiler default output file name... " >&6; }
3909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3910$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003911ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003912
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003913rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003914ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3916$as_echo_n "checking for suffix of executables... " >&6; }
3917if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003918case "(($ac_try" in
3919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3920 *) ac_try_echo=$ac_try;;
3921esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3923$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003924 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003925 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003926 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3927 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003928 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3929# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3930# work properly (i.e., refer to `conftest.exe'), while it won't with
3931# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003932for ac_file in conftest.exe conftest conftest.*; do
3933 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003935 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003936 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003937 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003938 * ) break;;
3939 esac
3940done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003941else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003942 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003944as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003945See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003946fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003947rm -f conftest conftest$ac_cv_exeext
3948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3949$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003950
3951rm -f conftest.$ac_ext
3952EXEEXT=$ac_cv_exeext
3953ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3955/* end confdefs.h. */
3956#include <stdio.h>
3957int
3958main ()
3959{
3960FILE *f = fopen ("conftest.out", "w");
3961 return ferror (f) || fclose (f) != 0;
3962
3963 ;
3964 return 0;
3965}
Skip Montanaro6dead952003-09-25 14:50:04 +00003966_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003967ac_clean_files="$ac_clean_files conftest.out"
3968# Check that the compiler produces executables we can run. If not, either
3969# the compiler is broken, or we cross compile.
3970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3971$as_echo_n "checking whether we are cross compiling... " >&6; }
3972if test "$cross_compiling" != yes; then
3973 { { ac_try="$ac_link"
3974case "(($ac_try" in
3975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3976 *) ac_try_echo=$ac_try;;
3977esac
3978eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3979$as_echo "$ac_try_echo"; } >&5
3980 (eval "$ac_link") 2>&5
3981 ac_status=$?
3982 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3983 test $ac_status = 0; }
3984 if { ac_try='./conftest$ac_cv_exeext'
3985 { { case "(($ac_try" in
3986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3987 *) ac_try_echo=$ac_try;;
3988esac
3989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3990$as_echo "$ac_try_echo"; } >&5
3991 (eval "$ac_try") 2>&5
3992 ac_status=$?
3993 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3994 test $ac_status = 0; }; }; then
3995 cross_compiling=no
3996 else
3997 if test "$cross_compiling" = maybe; then
3998 cross_compiling=yes
3999 else
4000 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4001$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004002as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004003If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004004See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004005 fi
4006 fi
4007fi
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4009$as_echo "$cross_compiling" >&6; }
4010
4011rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4012ac_clean_files=$ac_clean_files_save
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4014$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004015if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004016 $as_echo_n "(cached) " >&6
4017else
4018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004020
Martin v. Löwis11437992002-04-12 09:54:03 +00004021int
4022main ()
4023{
4024
4025 ;
4026 return 0;
4027}
4028_ACEOF
4029rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004030if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004031case "(($ac_try" in
4032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033 *) ac_try_echo=$ac_try;;
4034esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004035eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4036$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004037 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004038 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004039 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4040 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004041 for ac_file in conftest.o conftest.obj conftest.*; do
4042 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004043 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004044 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004045 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4046 break;;
4047 esac
4048done
4049else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004050 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004051sed 's/^/| /' conftest.$ac_ext >&5
4052
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004053{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004055as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004056See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004057fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004058rm -f conftest.$ac_cv_objext conftest.$ac_ext
4059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4061$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004062OBJEXT=$ac_cv_objext
4063ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4065$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004066if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004067 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004068else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004071
Martin v. Löwis11437992002-04-12 09:54:03 +00004072int
4073main ()
4074{
4075#ifndef __GNUC__
4076 choke me
4077#endif
4078
4079 ;
4080 return 0;
4081}
4082_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004083if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004084 ac_compiler_gnu=yes
4085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004086 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004089ac_cv_c_compiler_gnu=$ac_compiler_gnu
4090
4091fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4093$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4094if test $ac_compiler_gnu = yes; then
4095 GCC=yes
4096else
4097 GCC=
4098fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004099ac_test_CFLAGS=${CFLAGS+set}
4100ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4102$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004103if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004104 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004105else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004106 ac_save_c_werror_flag=$ac_c_werror_flag
4107 ac_c_werror_flag=yes
4108 ac_cv_prog_cc_g=no
4109 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004112
Martin v. Löwis11437992002-04-12 09:54:03 +00004113int
4114main ()
4115{
4116
4117 ;
4118 return 0;
4119}
4120_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004121if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004122 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004123else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004124 CFLAGS=""
4125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004126/* end confdefs.h. */
4127
4128int
4129main ()
4130{
4131
4132 ;
4133 return 0;
4134}
4135_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004136if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004138else
4139 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004140 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004142/* end confdefs.h. */
4143
4144int
4145main ()
4146{
4147
4148 ;
4149 return 0;
4150}
4151_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004152if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004153 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4160 ac_c_werror_flag=$ac_save_c_werror_flag
4161fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4163$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004164if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004166elif test $ac_cv_prog_cc_g = yes; then
4167 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004168 CFLAGS="-g -O2"
4169 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004170 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171 fi
4172else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004173 if test "$GCC" = yes; then
4174 CFLAGS="-O2"
4175 else
4176 CFLAGS=
4177 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004178fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4180$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004181if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004182 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004183else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004184 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004185ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
4188#include <stdarg.h>
4189#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004190struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004191/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4192struct buf { int x; };
4193FILE * (*rcsopen) (struct buf *, struct stat *, int);
4194static char *e (p, i)
4195 char **p;
4196 int i;
4197{
4198 return p[i];
4199}
4200static char *f (char * (*g) (char **, int), char **p, ...)
4201{
4202 char *s;
4203 va_list v;
4204 va_start (v,p);
4205 s = g (p, va_arg (v,int));
4206 va_end (v);
4207 return s;
4208}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004209
4210/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4211 function prototypes and stuff, but not '\xHH' hex character constants.
4212 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004213 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004214 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4215 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004216 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004217int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4218
Martin v. Löwiseba40652007-08-30 20:10:57 +00004219/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4220 inside strings and character constants. */
4221#define FOO(x) 'x'
4222int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4223
Skip Montanaro6dead952003-09-25 14:50:04 +00004224int test (int i, double x);
4225struct s1 {int (*f) (int a);};
4226struct s2 {int (*f) (double a);};
4227int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4228int argc;
4229char **argv;
4230int
4231main ()
4232{
4233return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4234 ;
4235 return 0;
4236}
4237_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004238for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4239 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004240do
4241 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004242 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004243 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004245rm -f core conftest.err conftest.$ac_objext
4246 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004247done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004248rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004249CC=$ac_save_CC
4250
4251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004252# AC_CACHE_VAL
4253case "x$ac_cv_prog_cc_c89" in
4254 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4256$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004257 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4259$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004260 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004261 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4263$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004264esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004265if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004266
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004267fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004268
Martin v. Löwis11437992002-04-12 09:54:03 +00004269ac_ext=c
4270ac_cpp='$CPP $CPPFLAGS'
4271ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4272ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4273ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004275if test ! -z "$preset_cflags"
4276then
4277 CFLAGS=$preset_cflags
4278fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004279
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004280
4281
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4283$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004284
Martin v. Löwiseba40652007-08-30 20:10:57 +00004285# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004286if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004287 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004288
4289 case $withval in
4290 no) with_cxx_main=no
4291 MAINCC='$(CC)';;
4292 yes) with_cxx_main=yes
4293 MAINCC='$(CXX)';;
4294 *) with_cxx_main=yes
4295 MAINCC=$withval
4296 if test -z "$CXX"
4297 then
4298 CXX=$withval
4299 fi;;
4300 esac
4301else
4302
4303 with_cxx_main=no
4304 MAINCC='$(CC)'
4305
Martin v. Löwiseba40652007-08-30 20:10:57 +00004306fi
4307
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4309$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004310
4311preset_cxx="$CXX"
4312if test -z "$CXX"
4313then
4314 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004315 gcc) if test -n "$ac_tool_prefix"; then
4316 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4317set dummy ${ac_tool_prefix}g++; ac_word=$2
4318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4319$as_echo_n "checking for $ac_word... " >&6; }
4320if ${ac_cv_path_CXX+:} false; then :
4321 $as_echo_n "(cached) " >&6
4322else
4323 case $CXX in
4324 [\\/]* | ?:[\\/]*)
4325 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4326 ;;
4327 *)
4328 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4329for as_dir in notfound
4330do
4331 IFS=$as_save_IFS
4332 test -z "$as_dir" && as_dir=.
4333 for ac_exec_ext in '' $ac_executable_extensions; do
4334 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4335 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4336 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4337 break 2
4338 fi
4339done
4340 done
4341IFS=$as_save_IFS
4342
4343 ;;
4344esac
4345fi
4346CXX=$ac_cv_path_CXX
4347if test -n "$CXX"; then
4348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4349$as_echo "$CXX" >&6; }
4350else
4351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4352$as_echo "no" >&6; }
4353fi
4354
4355
4356fi
4357if test -z "$ac_cv_path_CXX"; then
4358 ac_pt_CXX=$CXX
4359 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004360set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4362$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004363if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004364 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004365else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004366 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004367 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004368 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004369 ;;
4370 *)
4371 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4372for as_dir in notfound
4373do
4374 IFS=$as_save_IFS
4375 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004376 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004377 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004378 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004379 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004380 break 2
4381 fi
4382done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004383 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004384IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004385
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004386 ;;
4387esac
4388fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004389ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4390if test -n "$ac_pt_CXX"; then
4391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4392$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4395$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004397
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004398 if test "x$ac_pt_CXX" = x; then
4399 CXX="g++"
4400 else
4401 case $cross_compiling:$ac_tool_warned in
4402yes:)
4403{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4404$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4405ac_tool_warned=yes ;;
4406esac
4407 CXX=$ac_pt_CXX
4408 fi
4409else
4410 CXX="$ac_cv_path_CXX"
4411fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004412 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004413 cc) if test -n "$ac_tool_prefix"; then
4414 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4415set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4417$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004418if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004419 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004420else
4421 case $CXX in
4422 [\\/]* | ?:[\\/]*)
4423 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4424 ;;
4425 *)
4426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4427for as_dir in notfound
4428do
4429 IFS=$as_save_IFS
4430 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004431 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004432 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004433 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004434 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004435 break 2
4436 fi
4437done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004438 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004439IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004440
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004441 ;;
4442esac
4443fi
4444CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004445if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4447$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004448else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4450$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004452
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004453
4454fi
4455if test -z "$ac_cv_path_CXX"; then
4456 ac_pt_CXX=$CXX
4457 # Extract the first word of "c++", so it can be a program name with args.
4458set dummy c++; ac_word=$2
4459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4460$as_echo_n "checking for $ac_word... " >&6; }
4461if ${ac_cv_path_ac_pt_CXX+:} false; then :
4462 $as_echo_n "(cached) " >&6
4463else
4464 case $ac_pt_CXX in
4465 [\\/]* | ?:[\\/]*)
4466 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4467 ;;
4468 *)
4469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4470for as_dir in notfound
4471do
4472 IFS=$as_save_IFS
4473 test -z "$as_dir" && as_dir=.
4474 for ac_exec_ext in '' $ac_executable_extensions; do
4475 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4476 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4477 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4478 break 2
4479 fi
4480done
4481 done
4482IFS=$as_save_IFS
4483
4484 ;;
4485esac
4486fi
4487ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4488if test -n "$ac_pt_CXX"; then
4489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4490$as_echo "$ac_pt_CXX" >&6; }
4491else
4492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4493$as_echo "no" >&6; }
4494fi
4495
4496 if test "x$ac_pt_CXX" = x; then
4497 CXX="c++"
4498 else
4499 case $cross_compiling:$ac_tool_warned in
4500yes:)
4501{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4502$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4503ac_tool_warned=yes ;;
4504esac
4505 CXX=$ac_pt_CXX
4506 fi
4507else
4508 CXX="$ac_cv_path_CXX"
4509fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004510 ;;
4511 esac
4512 if test "$CXX" = "notfound"
4513 then
4514 CXX=""
4515 fi
4516fi
4517if test -z "$CXX"
4518then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004519 if test -n "$ac_tool_prefix"; then
4520 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4521 do
4522 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4523set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4525$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004526if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004527 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004528else
4529 if test -n "$CXX"; then
4530 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4531else
4532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4533for as_dir in $PATH
4534do
4535 IFS=$as_save_IFS
4536 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004537 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004538 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004539 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004541 break 2
4542 fi
4543done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004544 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004545IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004546
4547fi
4548fi
4549CXX=$ac_cv_prog_CXX
4550if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4552$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004553else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4555$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004556fi
4557
Martin v. Löwiseba40652007-08-30 20:10:57 +00004558
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004559 test -n "$CXX" && break
4560 done
4561fi
4562if test -z "$CXX"; then
4563 ac_ct_CXX=$CXX
4564 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4565do
4566 # Extract the first word of "$ac_prog", so it can be a program name with args.
4567set dummy $ac_prog; ac_word=$2
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4569$as_echo_n "checking for $ac_word... " >&6; }
4570if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4571 $as_echo_n "(cached) " >&6
4572else
4573 if test -n "$ac_ct_CXX"; then
4574 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4575else
4576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4577for as_dir in $PATH
4578do
4579 IFS=$as_save_IFS
4580 test -z "$as_dir" && as_dir=.
4581 for ac_exec_ext in '' $ac_executable_extensions; do
4582 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4583 ac_cv_prog_ac_ct_CXX="$ac_prog"
4584 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4585 break 2
4586 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004587done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004588 done
4589IFS=$as_save_IFS
4590
4591fi
4592fi
4593ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4594if test -n "$ac_ct_CXX"; then
4595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4596$as_echo "$ac_ct_CXX" >&6; }
4597else
4598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4599$as_echo "no" >&6; }
4600fi
4601
4602
4603 test -n "$ac_ct_CXX" && break
4604done
4605
4606 if test "x$ac_ct_CXX" = x; then
4607 CXX="notfound"
4608 else
4609 case $cross_compiling:$ac_tool_warned in
4610yes:)
4611{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4612$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4613ac_tool_warned=yes ;;
4614esac
4615 CXX=$ac_ct_CXX
4616 fi
4617fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004618
4619 if test "$CXX" = "notfound"
4620 then
4621 CXX=""
4622 fi
4623fi
4624if test "$preset_cxx" != "$CXX"
4625then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004626 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004627
4628 By default, distutils will build C++ extension modules with \"$CXX\".
4629 If this is not intended, then set CXX on the configure command line.
4630 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004631$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004632
4633 By default, distutils will build C++ extension modules with \"$CXX\".
4634 If this is not intended, then set CXX on the configure command line.
4635 " >&2;}
4636fi
4637
doko@python.org4e63fbe2013-01-25 13:08:27 +01004638MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4639
4640
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004641
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004642# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004643
4644ac_ext=c
4645ac_cpp='$CPP $CPPFLAGS'
4646ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4647ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4648ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4650$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004651# On Suns, sometimes $CPP names a directory.
4652if test -n "$CPP" && test -d "$CPP"; then
4653 CPP=
4654fi
4655if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004656 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004657 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004658else
Martin v. Löwis11437992002-04-12 09:54:03 +00004659 # Double quotes because CPP needs to be expanded
4660 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4661 do
4662 ac_preproc_ok=false
4663for ac_c_preproc_warn_flag in '' yes
4664do
4665 # Use a header file that comes with gcc, so configuring glibc
4666 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004667 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4668 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004669 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004670 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004672/* end confdefs.h. */
4673#ifdef __STDC__
4674# include <limits.h>
4675#else
4676# include <assert.h>
4677#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004678 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004680if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004681
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004682else
Martin v. Löwis11437992002-04-12 09:54:03 +00004683 # Broken: fails on valid input.
4684continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004685fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004686rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004687
Martin v. Löwiseba40652007-08-30 20:10:57 +00004688 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004689 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004692#include <ac_nonexistent.h>
4693_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004694if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004695 # Broken: success on invalid input.
4696continue
4697else
Martin v. Löwis11437992002-04-12 09:54:03 +00004698 # Passes both tests.
4699ac_preproc_ok=:
4700break
4701fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004702rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004703
4704done
4705# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004706rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004707if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004708 break
4709fi
4710
4711 done
4712 ac_cv_prog_CPP=$CPP
4713
4714fi
4715 CPP=$ac_cv_prog_CPP
4716else
4717 ac_cv_prog_CPP=$CPP
4718fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4720$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004721ac_preproc_ok=false
4722for ac_c_preproc_warn_flag in '' yes
4723do
4724 # Use a header file that comes with gcc, so configuring glibc
4725 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004726 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4727 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004728 # On the NeXT, cc -E runs the code through the compiler's parser,
4729 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004731/* end confdefs.h. */
4732#ifdef __STDC__
4733# include <limits.h>
4734#else
4735# include <assert.h>
4736#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004737 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004738_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004739if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004740
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004741else
Martin v. Löwis11437992002-04-12 09:54:03 +00004742 # Broken: fails on valid input.
4743continue
4744fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004745rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004746
Martin v. Löwiseba40652007-08-30 20:10:57 +00004747 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004748 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004751#include <ac_nonexistent.h>
4752_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004753if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004754 # Broken: success on invalid input.
4755continue
4756else
Martin v. Löwis11437992002-04-12 09:54:03 +00004757 # Passes both tests.
4758ac_preproc_ok=:
4759break
4760fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004761rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004762
4763done
4764# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004765rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004766if $ac_preproc_ok; then :
4767
Martin v. Löwis11437992002-04-12 09:54:03 +00004768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004769 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4770$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004771as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004772See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004773fi
4774
4775ac_ext=c
4776ac_cpp='$CPP $CPPFLAGS'
4777ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4778ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4779ac_compiler_gnu=$ac_cv_c_compiler_gnu
4780
4781
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4783$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004784if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004785 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004786else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004787 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004788 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004789 # Loop through the user's path and test for each of PROGNAME-LIST
4790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004791for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4792do
4793 IFS=$as_save_IFS
4794 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004795 for ac_prog in grep ggrep; do
4796 for ac_exec_ext in '' $ac_executable_extensions; do
4797 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004798 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004799# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004800 # Check for GNU $ac_path_GREP
4801case `"$ac_path_GREP" --version 2>&1` in
4802*GNU*)
4803 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4804*)
4805 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004806 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004807 while :
4808 do
4809 cat "conftest.in" "conftest.in" >"conftest.tmp"
4810 mv "conftest.tmp" "conftest.in"
4811 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004812 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004813 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4814 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004815 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004816 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4817 # Best one so far, save it but keep looking for a better one
4818 ac_cv_path_GREP="$ac_path_GREP"
4819 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004820 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004821 # 10*(2^10) chars as input seems more than enough
4822 test $ac_count -gt 10 && break
4823 done
4824 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4825esac
4826
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004827 $ac_path_GREP_found && break 3
4828 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004829 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004830 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004831IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004832 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004833 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004834 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004835else
4836 ac_cv_path_GREP=$GREP
4837fi
4838
Martin v. Löwiseba40652007-08-30 20:10:57 +00004839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4841$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004842 GREP="$ac_cv_path_GREP"
4843
4844
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4846$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004847if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004848 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004849else
4850 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4851 then ac_cv_path_EGREP="$GREP -E"
4852 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004853 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004854 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004855 # Loop through the user's path and test for each of PROGNAME-LIST
4856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004857for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4858do
4859 IFS=$as_save_IFS
4860 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004861 for ac_prog in egrep; do
4862 for ac_exec_ext in '' $ac_executable_extensions; do
4863 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004864 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004865# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004866 # Check for GNU $ac_path_EGREP
4867case `"$ac_path_EGREP" --version 2>&1` in
4868*GNU*)
4869 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4870*)
4871 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004872 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004873 while :
4874 do
4875 cat "conftest.in" "conftest.in" >"conftest.tmp"
4876 mv "conftest.tmp" "conftest.in"
4877 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004878 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004879 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4880 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004881 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004882 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4883 # Best one so far, save it but keep looking for a better one
4884 ac_cv_path_EGREP="$ac_path_EGREP"
4885 ac_path_EGREP_max=$ac_count
4886 fi
4887 # 10*(2^10) chars as input seems more than enough
4888 test $ac_count -gt 10 && break
4889 done
4890 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4891esac
4892
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004893 $ac_path_EGREP_found && break 3
4894 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004895 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004896 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004897IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004898 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004899 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004900 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004901else
4902 ac_cv_path_EGREP=$EGREP
4903fi
4904
Martin v. Löwiseba40652007-08-30 20:10:57 +00004905 fi
4906fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4908$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004909 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004910
4911
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4913$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004914if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004915 $as_echo_n "(cached) " >&6
4916else
4917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004918/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004919#include <stdlib.h>
4920#include <stdarg.h>
4921#include <string.h>
4922#include <float.h>
4923
4924int
4925main ()
4926{
4927
4928 ;
4929 return 0;
4930}
4931_ACEOF
4932if ac_fn_c_try_compile "$LINENO"; then :
4933 ac_cv_header_stdc=yes
4934else
4935 ac_cv_header_stdc=no
4936fi
4937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4938
4939if test $ac_cv_header_stdc = yes; then
4940 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4942/* end confdefs.h. */
4943#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004944
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004945_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004947 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004948
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004950 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004951fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004952rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004953
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004954fi
4955
4956if test $ac_cv_header_stdc = yes; then
4957 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4959/* end confdefs.h. */
4960#include <stdlib.h>
4961
4962_ACEOF
4963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4964 $EGREP "free" >/dev/null 2>&1; then :
4965
4966else
4967 ac_cv_header_stdc=no
4968fi
4969rm -f conftest*
4970
4971fi
4972
4973if test $ac_cv_header_stdc = yes; then
4974 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4975 if test "$cross_compiling" = yes; then :
4976 :
4977else
4978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4979/* end confdefs.h. */
4980#include <ctype.h>
4981#include <stdlib.h>
4982#if ((' ' & 0x0FF) == 0x020)
4983# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4984# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4985#else
4986# define ISLOWER(c) \
4987 (('a' <= (c) && (c) <= 'i') \
4988 || ('j' <= (c) && (c) <= 'r') \
4989 || ('s' <= (c) && (c) <= 'z'))
4990# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4991#endif
4992
4993#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4994int
4995main ()
4996{
4997 int i;
4998 for (i = 0; i < 256; i++)
4999 if (XOR (islower (i), ISLOWER (i))
5000 || toupper (i) != TOUPPER (i))
5001 return 2;
5002 return 0;
5003}
5004_ACEOF
5005if ac_fn_c_try_run "$LINENO"; then :
5006
5007else
5008 ac_cv_header_stdc=no
5009fi
5010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5011 conftest.$ac_objext conftest.beam conftest.$ac_ext
5012fi
5013
5014fi
5015fi
5016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5017$as_echo "$ac_cv_header_stdc" >&6; }
5018if test $ac_cv_header_stdc = yes; then
5019
5020$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5021
5022fi
5023
5024# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5025for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5026 inttypes.h stdint.h unistd.h
5027do :
5028 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5029ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5030"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005031if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005032 cat >>confdefs.h <<_ACEOF
5033#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5034_ACEOF
5035
5036fi
5037
5038done
5039
5040
5041
5042 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005043if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005044 MINIX=yes
5045else
5046 MINIX=
5047fi
5048
5049
5050 if test "$MINIX" = yes; then
5051
5052$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5053
5054
5055$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5056
5057
5058$as_echo "#define _MINIX 1" >>confdefs.h
5059
5060 fi
5061
5062
5063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5064$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005065if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005066 $as_echo_n "(cached) " >&6
5067else
5068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5069/* end confdefs.h. */
5070
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005071# define __EXTENSIONS__ 1
5072 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005073int
5074main ()
5075{
5076
5077 ;
5078 return 0;
5079}
5080_ACEOF
5081if ac_fn_c_try_compile "$LINENO"; then :
5082 ac_cv_safe_to_define___extensions__=yes
5083else
5084 ac_cv_safe_to_define___extensions__=no
5085fi
5086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5087fi
5088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5089$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5090 test $ac_cv_safe_to_define___extensions__ = yes &&
5091 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5092
5093 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5094
5095 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5096
5097 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5098
5099 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5100
5101
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005102
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005103# Check for unsupported systems
5104case $ac_sys_system/$ac_sys_release in
5105atheos*|Linux*/1*)
5106 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5107 echo See README for details.
5108 exit 1;;
5109esac
5110
5111
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5113$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005114
5115# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005116if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005117 withval=$with_suffix;
5118 case $withval in
5119 no) EXEEXT=;;
5120 yes) EXEEXT=.exe;;
5121 *) EXEEXT=$withval;;
5122 esac
5123fi
5124
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5126$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005127
5128# Test whether we're running on a non-case-sensitive system, in which
5129# case we give a warning if no ext is given
5130
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5132$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005133if test ! -d CaseSensitiveTestDir; then
5134mkdir CaseSensitiveTestDir
5135fi
5136
5137if test -d casesensitivetestdir
5138then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5140$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005141 BUILDEXEEXT=.exe
5142else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5144$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005145 BUILDEXEEXT=$EXEEXT
5146fi
5147rmdir CaseSensitiveTestDir
5148
5149case $MACHDEP in
5150bsdos*)
5151 case $CC in
5152 gcc) CC="$CC -D_HAVE_BSDI";;
5153 esac;;
5154esac
5155
5156case $ac_sys_system in
5157hp*|HP*)
5158 case $CC in
5159 cc|*/cc) CC="$CC -Ae";;
5160 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005161SunOS*)
5162 # Some functions have a prototype only with that define, e.g. confstr
5163
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005164$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005165
5166 ;;
5167esac
5168
5169
5170
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5172$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005173if test -z "$LIBRARY"
5174then
5175 LIBRARY='libpython$(VERSION).a'
5176fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5178$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005179
5180# LDLIBRARY is the name of the library to link against (as opposed to the
5181# name of the library into which to insert object files). BLDLIBRARY is also
5182# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5183# is blank as the main program is not linked directly against LDLIBRARY.
5184# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5185# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5186# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5187# DLLLIBRARY is the shared (i.e., DLL) library.
5188#
5189# RUNSHARED is used to run shared python without installed libraries
5190#
5191# INSTSONAME is the name of the shared library that will be use to install
5192# on the system - some systems like version suffix, others don't
5193
5194
5195
5196
5197
5198
5199LDLIBRARY="$LIBRARY"
5200BLDLIBRARY='$(LDLIBRARY)'
5201INSTSONAME='$(LDLIBRARY)'
5202DLLLIBRARY=''
5203LDLIBRARYDIR=''
5204RUNSHARED=''
5205
5206# LINKCC is the command that links the python executable -- default is $(CC).
5207# If CXX is set, and if it is needed to link a main function that was
5208# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5209# python might then depend on the C++ runtime
5210# This is altered for AIX in order to build the export list before
5211# linking.
5212
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5214$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005215if test -z "$LINKCC"
5216then
5217 LINKCC='$(PURIFY) $(MAINCC)'
5218 case $ac_sys_system in
5219 AIX*)
5220 exp_extra="\"\""
5221 if test $ac_sys_release -ge 5 -o \
5222 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5223 exp_extra="."
5224 fi
5225 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005226 QNX*)
5227 # qcc must be used because the other compilers do not
5228 # support -N.
5229 LINKCC=qcc;;
5230 esac
5231fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5233$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005234
5235# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5236# make sure we default having it set to "no": this is used by
5237# distutils.unixccompiler to know if it should add --enable-new-dtags
5238# to linker command lines, and failing to detect GNU ld simply results
5239# in the same bahaviour as before.
5240
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5242$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005243ac_prog=ld
5244if test "$GCC" = yes; then
5245 ac_prog=`$CC -print-prog-name=ld`
5246fi
5247case `"$ac_prog" -V 2>&1 < /dev/null` in
5248 *GNU*)
5249 GNULD=yes;;
5250 *)
5251 GNULD=no;;
5252esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5254$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005255
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5257$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005258# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005259if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005260 enableval=$enable_shared;
5261fi
5262
5263
5264if test -z "$enable_shared"
5265then
5266 case $ac_sys_system in
5267 CYGWIN* | atheos*)
5268 enable_shared="yes";;
5269 *)
5270 enable_shared="no";;
5271 esac
5272fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5274$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005275
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5277$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005278# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005279if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005280 enableval=$enable_profiling;
5281fi
5282
5283if test "x$enable_profiling" = xyes; then
5284 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005285 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005287/* end confdefs.h. */
5288int main() { return 0; }
5289_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005290if ac_fn_c_try_link "$LINENO"; then :
5291
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005292else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005293 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005294fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005295rm -f core conftest.err conftest.$ac_objext \
5296 conftest$ac_exeext conftest.$ac_ext
5297 CC="$ac_save_cc"
5298else
5299 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005300fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5302$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005303
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005304if test "x$enable_profiling" = xyes; then
5305 BASECFLAGS="-pg $BASECFLAGS"
5306 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005307fi
5308
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5310$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311
5312# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5313# library that we build, but we do not want to link against it (we
5314# will find it with a -framework option). For this reason there is an
5315# extra variable BLDLIBRARY against which Python and the extension
5316# modules are linked, BLDLIBRARY. This is normally the same as
5317# LDLIBRARY, but empty for MacOSX framework builds.
5318if test "$enable_framework"
5319then
5320 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5321 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5322 BLDLIBRARY=''
5323else
5324 BLDLIBRARY='$(LDLIBRARY)'
5325fi
5326
5327# Other platforms follow
5328if test $enable_shared = "yes"; then
5329
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005330$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005331
5332 case $ac_sys_system in
5333 BeOS*)
5334 LDLIBRARY='libpython$(VERSION).so'
5335 ;;
5336 CYGWIN*)
5337 LDLIBRARY='libpython$(VERSION).dll.a'
5338 DLLLIBRARY='libpython$(VERSION).dll'
5339 ;;
5340 SunOS*)
5341 LDLIBRARY='libpython$(VERSION).so'
5342 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
5343 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5344 INSTSONAME="$LDLIBRARY".$SOVERSION
5345 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005346 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005347 LDLIBRARY='libpython$(VERSION).so'
5348 BLDLIBRARY='-L. -lpython$(VERSION)'
5349 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5350 case $ac_sys_system in
5351 FreeBSD*)
5352 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5353 ;;
5354 esac
5355 INSTSONAME="$LDLIBRARY".$SOVERSION
5356 ;;
5357 hp*|HP*)
5358 case `uname -m` in
5359 ia64)
5360 LDLIBRARY='libpython$(VERSION).so'
5361 ;;
5362 *)
5363 LDLIBRARY='libpython$(VERSION).sl'
5364 ;;
5365 esac
5366 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
5367 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5368 ;;
5369 OSF*)
5370 LDLIBRARY='libpython$(VERSION).so'
5371 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
5372 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5373 ;;
5374 atheos*)
5375 LDLIBRARY='libpython$(VERSION).so'
5376 BLDLIBRARY='-L. -lpython$(VERSION)'
5377 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5378 ;;
5379 Darwin*)
5380 LDLIBRARY='libpython$(VERSION).dylib'
5381 BLDLIBRARY='-L. -lpython$(VERSION)'
5382 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5383 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005384 AIX*)
5385 LDLIBRARY='libpython$(VERSION).so'
5386 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5387 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005388
5389 esac
5390else # shared is disabled
5391 case $ac_sys_system in
5392 CYGWIN*)
5393 BLDLIBRARY='$(LIBRARY)'
5394 LDLIBRARY='libpython$(VERSION).dll.a'
5395 ;;
5396 esac
5397fi
5398
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005399if test "$cross_compiling" = yes; then
5400 RUNSHARED=
5401fi
5402
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5404$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005405
5406if test -n "$ac_tool_prefix"; then
5407 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5408set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5410$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005411if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005412 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005413else
5414 if test -n "$RANLIB"; then
5415 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5416else
5417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5418for as_dir in $PATH
5419do
5420 IFS=$as_save_IFS
5421 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005422 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005423 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005424 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005425 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005426 break 2
5427 fi
5428done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005429 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005430IFS=$as_save_IFS
5431
5432fi
5433fi
5434RANLIB=$ac_cv_prog_RANLIB
5435if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5437$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005438else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5440$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005441fi
5442
5443
5444fi
5445if test -z "$ac_cv_prog_RANLIB"; then
5446 ac_ct_RANLIB=$RANLIB
5447 # Extract the first word of "ranlib", so it can be a program name with args.
5448set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5450$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005451if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005452 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005453else
5454 if test -n "$ac_ct_RANLIB"; then
5455 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5456else
5457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5458for as_dir in $PATH
5459do
5460 IFS=$as_save_IFS
5461 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005462 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005464 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005466 break 2
5467 fi
5468done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005469 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005470IFS=$as_save_IFS
5471
5472fi
5473fi
5474ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5475if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5477$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5480$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005481fi
5482
5483 if test "x$ac_ct_RANLIB" = x; then
5484 RANLIB=":"
5485 else
5486 case $cross_compiling:$ac_tool_warned in
5487yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005488{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5489$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005490ac_tool_warned=yes ;;
5491esac
5492 RANLIB=$ac_ct_RANLIB
5493 fi
5494else
5495 RANLIB="$ac_cv_prog_RANLIB"
5496fi
5497
5498
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005499if test -n "$ac_tool_prefix"; then
5500 for ac_prog in ar aal
5501 do
5502 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5503set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5505$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005506if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005507 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005508else
5509 if test -n "$AR"; then
5510 ac_cv_prog_AR="$AR" # Let the user override the test.
5511else
5512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5513for as_dir in $PATH
5514do
5515 IFS=$as_save_IFS
5516 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005517 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005518 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005519 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005520 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005521 break 2
5522 fi
5523done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005524 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005525IFS=$as_save_IFS
5526
5527fi
5528fi
5529AR=$ac_cv_prog_AR
5530if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5532$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005533else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5535$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005536fi
5537
5538
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005539 test -n "$AR" && break
5540 done
5541fi
5542if test -z "$AR"; then
5543 ac_ct_AR=$AR
5544 for ac_prog in ar aal
5545do
5546 # Extract the first word of "$ac_prog", so it can be a program name with args.
5547set dummy $ac_prog; ac_word=$2
5548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5549$as_echo_n "checking for $ac_word... " >&6; }
5550if ${ac_cv_prog_ac_ct_AR+:} false; then :
5551 $as_echo_n "(cached) " >&6
5552else
5553 if test -n "$ac_ct_AR"; then
5554 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5555else
5556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5557for as_dir in $PATH
5558do
5559 IFS=$as_save_IFS
5560 test -z "$as_dir" && as_dir=.
5561 for ac_exec_ext in '' $ac_executable_extensions; do
5562 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5563 ac_cv_prog_ac_ct_AR="$ac_prog"
5564 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5565 break 2
5566 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005567done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005568 done
5569IFS=$as_save_IFS
5570
5571fi
5572fi
5573ac_ct_AR=$ac_cv_prog_ac_ct_AR
5574if test -n "$ac_ct_AR"; then
5575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5576$as_echo "$ac_ct_AR" >&6; }
5577else
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5579$as_echo "no" >&6; }
5580fi
5581
5582
5583 test -n "$ac_ct_AR" && break
5584done
5585
5586 if test "x$ac_ct_AR" = x; then
5587 AR="ar"
5588 else
5589 case $cross_compiling:$ac_tool_warned in
5590yes:)
5591{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5592$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5593ac_tool_warned=yes ;;
5594esac
5595 AR=$ac_ct_AR
5596 fi
5597fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005598
5599
5600# tweak ARFLAGS only if the user didn't set it on the command line
5601
5602if test -z "$ARFLAGS"
5603then
5604 ARFLAGS="rc"
5605fi
5606
5607
5608# Extract the first word of "svnversion", so it can be a program name with args.
5609set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5611$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005612if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005613 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005614else
5615 if test -n "$SVNVERSION"; then
5616 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5617else
5618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5619for as_dir in $PATH
5620do
5621 IFS=$as_save_IFS
5622 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005623 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005625 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005627 break 2
5628 fi
5629done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005630 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005631IFS=$as_save_IFS
5632
5633 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5634fi
5635fi
5636SVNVERSION=$ac_cv_prog_SVNVERSION
5637if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5639$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005640else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5642$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005643fi
5644
5645
5646if test $SVNVERSION = found
5647then
5648 SVNVERSION="svnversion \$(srcdir)"
5649else
5650 SVNVERSION="echo Unversioned directory"
5651fi
5652
Trent Nelsond86ceec2012-10-16 09:42:45 -04005653
Trent Nelsonabf20512012-10-17 04:32:49 -04005654if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005655 # If we're building out-of-tree make sure Include (in the current dir)
5656 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5657 # and graminit.h to get picked up from the correct directory.
5658 # (A side effect of this is that these resources will automatically be
5659 # regenerated when building out-of-tree, regardless of whether or not
5660 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5661 # off.)
5662 BASECPPFLAGS="-IInclude"
5663else
5664 BASECPPFLAGS=""
5665fi
5666
Georg Brandl3a5508e2011-03-06 10:42:21 +01005667
5668
5669
5670# Extract the first word of "hg", so it can be a program name with args.
5671set dummy hg; ac_word=$2
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5673$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005674if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005675 $as_echo_n "(cached) " >&6
5676else
5677 if test -n "$HAS_HG"; then
5678 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5679else
5680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5681for as_dir in $PATH
5682do
5683 IFS=$as_save_IFS
5684 test -z "$as_dir" && as_dir=.
5685 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005687 ac_cv_prog_HAS_HG="found"
5688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5689 break 2
5690 fi
5691done
5692 done
5693IFS=$as_save_IFS
5694
5695 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5696fi
5697fi
5698HAS_HG=$ac_cv_prog_HAS_HG
5699if test -n "$HAS_HG"; then
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5701$as_echo "$HAS_HG" >&6; }
5702else
5703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5704$as_echo "no" >&6; }
5705fi
5706
5707
5708if test $HAS_HG = found
5709then
5710 HGVERSION="hg id -i \$(srcdir)"
5711 HGTAG="hg id -t \$(srcdir)"
5712 HGBRANCH="hg id -b \$(srcdir)"
5713else
5714 HGVERSION=""
5715 HGTAG=""
5716 HGBRANCH=""
5717fi
5718
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005719case $MACHDEP in
5720bsdos*|hp*|HP*)
5721 # install -d does not work on BSDI or HP-UX
5722 if test -z "$INSTALL"
5723 then
5724 INSTALL="${srcdir}/install-sh -c"
5725 fi
5726esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005727# Find a good install program. We prefer a C program (faster),
5728# so one script is as good as another. But avoid the broken or
5729# incompatible versions:
5730# SysV /etc/install, /usr/sbin/install
5731# SunOS /usr/etc/install
5732# IRIX /sbin/install
5733# AIX /bin/install
5734# AmigaOS /C/install, which installs bootblocks on floppy discs
5735# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5736# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5737# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5738# OS/2's system install, which has a completely different semantic
5739# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005740# Reject install programs that cannot install multiple files.
5741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5742$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005743if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005744if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005745 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005746else
5747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5748for as_dir in $PATH
5749do
5750 IFS=$as_save_IFS
5751 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005752 # Account for people who put trailing slashes in PATH elements.
5753case $as_dir/ in #((
5754 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005755 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005756 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005757 /usr/ucb/* ) ;;
5758 *)
5759 # OSF1 and SCO ODT 3.0 have their own names for install.
5760 # Don't use installbsd from OSF since it installs stuff as root
5761 # by default.
5762 for ac_prog in ginstall scoinst install; do
5763 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005764 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005765 if test $ac_prog = install &&
5766 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5767 # AIX install. It has an incompatible calling convention.
5768 :
5769 elif test $ac_prog = install &&
5770 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5771 # program-specific install script used by HP pwplus--don't use.
5772 :
5773 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005774 rm -rf conftest.one conftest.two conftest.dir
5775 echo one > conftest.one
5776 echo two > conftest.two
5777 mkdir conftest.dir
5778 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5779 test -s conftest.one && test -s conftest.two &&
5780 test -s conftest.dir/conftest.one &&
5781 test -s conftest.dir/conftest.two
5782 then
5783 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5784 break 3
5785 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005786 fi
5787 fi
5788 done
5789 done
5790 ;;
5791esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005792
5793 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005794IFS=$as_save_IFS
5795
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005796rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005797
5798fi
5799 if test "${ac_cv_path_install+set}" = set; then
5800 INSTALL=$ac_cv_path_install
5801 else
5802 # As a last resort, use the slow shell script. Don't cache a
5803 # value for INSTALL within a source directory, because that will
5804 # break other packages using the cache if that directory is
5805 # removed, or if the value is a relative name.
5806 INSTALL=$ac_install_sh
5807 fi
5808fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5810$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005811
5812# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5813# It thinks the first close brace ends the variable substitution.
5814test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5815
5816test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5817
5818test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5819
Trent Nelsonf6407a12012-08-30 14:56:13 +00005820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5821$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5822if test -z "$MKDIR_P"; then
5823 if ${ac_cv_path_mkdir+:} false; then :
5824 $as_echo_n "(cached) " >&6
5825else
5826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5827for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5828do
5829 IFS=$as_save_IFS
5830 test -z "$as_dir" && as_dir=.
5831 for ac_prog in mkdir gmkdir; do
5832 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005833 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005834 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5835 'mkdir (GNU coreutils) '* | \
5836 'mkdir (coreutils) '* | \
5837 'mkdir (fileutils) '4.1*)
5838 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5839 break 3;;
5840 esac
5841 done
5842 done
5843 done
5844IFS=$as_save_IFS
5845
5846fi
5847
5848 test -d ./--version && rmdir ./--version
5849 if test "${ac_cv_path_mkdir+set}" = set; then
5850 MKDIR_P="$ac_cv_path_mkdir -p"
5851 else
5852 # As a last resort, use the slow shell script. Don't cache a
5853 # value for MKDIR_P within a source directory, because that will
5854 # break other packages using the cache if that directory is
5855 # removed, or if the value is a relative name.
5856 MKDIR_P="$ac_install_sh -d"
5857 fi
5858fi
5859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5860$as_echo "$MKDIR_P" >&6; }
5861
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005862
5863# Not every filesystem supports hard links
5864
5865if test -z "$LN" ; then
5866 case $ac_sys_system in
5867 BeOS*) LN="ln -s";;
5868 CYGWIN*) LN="ln -s";;
5869 atheos*) LN="ln -s";;
5870 *) LN=ln;;
5871 esac
5872fi
5873
5874# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5876$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005877
5878# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005879if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005880 withval=$with_pydebug;
5881if test "$withval" != no
5882then
5883
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005884$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005885
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5887$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005888 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005889else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5890$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005891fi
5892else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005895fi
5896
5897
5898# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5899# merged with this chunk of code?
5900
5901# Optimizer/debugger flags
5902# ------------------------
5903# (The following bit of code is complicated enough - please keep things
5904# indented properly. Just pretend you're editing Python code. ;-)
5905
5906# There are two parallel sets of case statements below, one that checks to
5907# see if OPT was set and one that does BASECFLAGS setting based upon
5908# compiler and platform. BASECFLAGS tweaks need to be made even if the
5909# user set OPT.
5910
5911# tweak OPT based on compiler and platform, only if the user didn't set
5912# it on the command line
5913
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005914if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005915then
5916 case $GCC in
5917 yes)
5918 if test "$CC" != 'g++' ; then
5919 STRICT_PROTO="-Wstrict-prototypes"
5920 fi
5921 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5922 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5923 WRAP="-fwrapv"
5924 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005925
5926 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005927 case $CC in
5928 *clang*) WRAP="-fwrapv"
5929 ;;
5930 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005931
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005932 case $ac_cv_prog_cc_g in
5933 yes)
5934 if test "$Py_DEBUG" = 'true' ; then
5935 # Optimization messes up debuggers, so turn it off for
5936 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005937 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005938 else
5939 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5940 fi
5941 ;;
5942 *)
5943 OPT="-O3 -Wall $STRICT_PROTO"
5944 ;;
5945 esac
5946 case $ac_sys_system in
5947 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5948 ;;
5949 esac
5950 ;;
5951
5952 *)
5953 OPT="-O"
5954 ;;
5955 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005956fi
5957
5958
5959
5960# The -arch flags for universal builds on OSX
5961UNIVERSAL_ARCH_FLAGS=
5962
5963
5964# tweak BASECFLAGS based on compiler and platform
5965case $GCC in
5966yes)
5967 # Python violates C99 rules, by casting between incompatible
5968 # pointer types. GCC may generate bad code as a result of that,
5969 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5971$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005972 ac_save_cc="$CC"
5973 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005974 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005975 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005976else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005978/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005979
5980int
5981main ()
5982{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005983
Gregory P. Smith373469a2009-11-01 21:03:38 +00005984 ;
5985 return 0;
5986}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005987_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005988if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005989 ac_cv_no_strict_aliasing_ok=yes
5990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005991 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005992fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005994fi
5995
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005996 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5998$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005999 if test $ac_cv_no_strict_aliasing_ok = yes
6000 then
6001 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6002 fi
6003
6004 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6005 # support. Without this, treatment of subnormals doesn't follow
6006 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006007 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006008 alpha*)
6009 BASECFLAGS="$BASECFLAGS -mieee"
6010 ;;
6011 esac
6012
6013 case $ac_sys_system in
6014 SCO_SV*)
6015 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6016 ;;
6017 # is there any other compiler on Darwin besides gcc?
6018 Darwin*)
6019 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6020 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006021 if test "${CC}" = gcc
6022 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6024$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006025 case "${UNIVERSALSDK}" in
6026 */MacOSX10.4u.sdk)
6027 # Build using 10.4 SDK, force usage of gcc when the
6028 # compiler is gcc, otherwise the user will get very
6029 # confusing error messages when building on OSX 10.6
6030 CC=gcc-4.0
6031 CPP=cpp-4.0
6032 ;;
6033 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6035$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006036 fi
6037
6038 # Calculate the right deployment target for this build.
6039 #
6040 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
6041 if test ${cur_target} '>' 10.2; then
6042 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006043 if test ${enable_universalsdk}; then
6044 if test "${UNIVERSAL_ARCHS}" = "all"; then
6045 # Ensure that the default platform for a
6046 # 4-way universal build is OSX 10.5,
6047 # that's the first OS release where
6048 # 4-way builds make sense.
6049 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006050
6051 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6052 cur_target='10.5'
6053
6054 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6055 cur_target='10.5'
6056
6057 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6058 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006059 fi
6060 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006061 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006062 # On Intel macs default to a deployment
6063 # target of 10.4, that's the first OSX
6064 # release with Intel support.
6065 cur_target="10.4"
6066 fi
6067 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006068 fi
6069 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6070
6071 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6072 # environment with a value that is the same as what we'll use
6073 # in the Makefile to ensure that we'll get the same compiler
6074 # environment during configure and build time.
6075 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6076 export MACOSX_DEPLOYMENT_TARGET
6077 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6078
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006079 if test "${enable_universalsdk}"; then
6080 UNIVERSAL_ARCH_FLAGS=""
6081 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6082 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6083 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006084 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006085
6086 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6087 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6088 LIPO_32BIT_FLAGS=""
6089 ARCH_RUN_32BIT="true"
6090
6091 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6092 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6093 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006094 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006095
6096 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6097 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6098 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006099 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006100
6101 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6102 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6103 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006104 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006105
6106 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006107 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006108
6109 fi
6110
6111
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006112 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6113 if test "${UNIVERSALSDK}" != "/"
6114 then
6115 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6116 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6117 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006118 fi
6119
6120 fi
6121
6122
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006123 ;;
6124 OSF*)
6125 BASECFLAGS="$BASECFLAGS -mieee"
6126 ;;
6127 esac
6128 ;;
6129
6130*)
6131 case $ac_sys_system in
6132 OpenUNIX*|UnixWare*)
6133 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6134 ;;
6135 OSF*)
6136 BASECFLAGS="$BASECFLAGS -ieee -std"
6137 ;;
6138 SCO_SV*)
6139 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6140 ;;
6141 esac
6142 ;;
6143esac
6144
6145if test "$Py_DEBUG" = 'true'; then
6146 :
6147else
6148 OPT="-DNDEBUG $OPT"
6149fi
6150
6151if test "$ac_arch_flags"
6152then
6153 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6154fi
6155
6156# disable check for icc since it seems to pass, but generates a warning
6157if test "$CC" = icc
6158then
6159 ac_cv_opt_olimit_ok=no
6160fi
6161
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6163$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006164if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006165 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006166else
6167 ac_save_cc="$CC"
6168CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006170/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006171
6172int
6173main ()
6174{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006175
Gregory P. Smith373469a2009-11-01 21:03:38 +00006176 ;
6177 return 0;
6178}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006179_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006180if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006181 ac_cv_opt_olimit_ok=yes
6182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006183 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006184
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006185fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006187CC="$ac_save_cc"
6188fi
6189
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6191$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006192if test $ac_cv_opt_olimit_ok = yes; then
6193 case $ac_sys_system in
6194 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6195 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6196 # environment?
6197 Darwin*)
6198 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006199 # XXX thankfully this useless troublemaker of a flag has been
6200 # eradicated in the 3.x line. For now, make sure it isn't picked
6201 # up by any of our other platforms that use CC.
6202 AIX*|SunOS*|HP-UX*|IRIX*)
6203 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006204 *)
6205 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6206 ;;
6207 esac
6208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6210$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006211 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006212 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006213else
6214 ac_save_cc="$CC"
6215 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006217/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006218
6219int
6220main ()
6221{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006222
Gregory P. Smith373469a2009-11-01 21:03:38 +00006223 ;
6224 return 0;
6225}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006226_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006227if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006228 ac_cv_olimit_ok=yes
6229else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006230 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006231
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006232fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006234 CC="$ac_save_cc"
6235fi
6236
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6238$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006239 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006240 case $ac_sys_system in
6241 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6242 HP-UX*)
6243 ;;
6244 *)
6245 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6246 ;;
6247 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006248 fi
6249fi
6250
6251# Check whether GCC supports PyArg_ParseTuple format
6252if test "$GCC" = "yes"
6253then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6255$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006256 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006257 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006259/* end confdefs.h. */
6260
6261 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006262int
6263main ()
6264{
6265
6266 ;
6267 return 0;
6268}
Matthias Klosec511b472010-05-08 11:01:39 +00006269
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006270_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006271if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006272
Matthias Klosec511b472010-05-08 11:01:39 +00006273
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006274$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006275
Matthias Klosec511b472010-05-08 11:01:39 +00006276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006277$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006278
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006279else
Matthias Klosec511b472010-05-08 11:01:39 +00006280
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006282$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006283
6284fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6286 CFLAGS=$save_CFLAGS
6287fi
6288
6289# On some compilers, pthreads are available without further options
6290# (e.g. MacOS X). On some of these systems, the compiler will not
6291# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6292# So we have to see first whether pthreads are available without
6293# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6295$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006296if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006297 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006298else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006299 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006300 ac_cv_pthread_is_default=no
6301else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006303/* end confdefs.h. */
6304
Stefan Krahae66ca62012-11-22 22:36:57 +01006305#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006306#include <pthread.h>
6307
6308void* routine(void* p){return NULL;}
6309
6310int main(){
6311 pthread_t p;
6312 if(pthread_create(&p,NULL,routine,NULL)!=0)
6313 return 1;
6314 (void)pthread_detach(p);
6315 return 0;
6316}
6317
6318_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006319if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006320
6321 ac_cv_pthread_is_default=yes
6322 ac_cv_kthread=no
6323 ac_cv_pthread=no
6324
6325else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006327fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6329 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006330fi
6331
6332
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006333fi
6334
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6336$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006337
6338
6339if test $ac_cv_pthread_is_default = yes
6340then
6341 ac_cv_kpthread=no
6342else
6343# -Kpthread, if available, provides the right #defines
6344# and linker options to make pthread_create available
6345# Some compilers won't report that they do not support -Kpthread,
6346# so we need to run a program to see whether it really made the
6347# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6349$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006350if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006351 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006352else
6353 ac_save_cc="$CC"
6354CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006355if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006356 ac_cv_kpthread=no
6357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006359/* end confdefs.h. */
6360
Stefan Krahae66ca62012-11-22 22:36:57 +01006361#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006362#include <pthread.h>
6363
6364void* routine(void* p){return NULL;}
6365
6366int main(){
6367 pthread_t p;
6368 if(pthread_create(&p,NULL,routine,NULL)!=0)
6369 return 1;
6370 (void)pthread_detach(p);
6371 return 0;
6372}
6373
6374_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006375if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006376 ac_cv_kpthread=yes
6377else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006378 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006379fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6381 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006382fi
6383
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006384CC="$ac_save_cc"
6385fi
6386
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6388$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006389fi
6390
6391if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6392then
6393# -Kthread, if available, provides the right #defines
6394# and linker options to make pthread_create available
6395# Some compilers won't report that they do not support -Kthread,
6396# so we need to run a program to see whether it really made the
6397# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6399$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006400if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006401 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006402else
6403 ac_save_cc="$CC"
6404CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006405if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006406 ac_cv_kthread=no
6407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006409/* end confdefs.h. */
6410
Stefan Krahae66ca62012-11-22 22:36:57 +01006411#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006412#include <pthread.h>
6413
6414void* routine(void* p){return NULL;}
6415
6416int main(){
6417 pthread_t p;
6418 if(pthread_create(&p,NULL,routine,NULL)!=0)
6419 return 1;
6420 (void)pthread_detach(p);
6421 return 0;
6422}
6423
6424_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006425if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006426 ac_cv_kthread=yes
6427else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006428 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006429fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6431 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006432fi
6433
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006434CC="$ac_save_cc"
6435fi
6436
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6438$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006439fi
6440
6441if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6442then
6443# -pthread, if available, provides the right #defines
6444# and linker options to make pthread_create available
6445# Some compilers won't report that they do not support -pthread,
6446# so we need to run a program to see whether it really made the
6447# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6449$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006450if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006451 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006452else
6453 ac_save_cc="$CC"
6454CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006455if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006456 ac_cv_pthread=no
6457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006459/* end confdefs.h. */
6460
Stefan Krahae66ca62012-11-22 22:36:57 +01006461#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006462#include <pthread.h>
6463
6464void* routine(void* p){return NULL;}
6465
6466int main(){
6467 pthread_t p;
6468 if(pthread_create(&p,NULL,routine,NULL)!=0)
6469 return 1;
6470 (void)pthread_detach(p);
6471 return 0;
6472}
6473
6474_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006475if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006476 ac_cv_pthread=yes
6477else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006478 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006479fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6481 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006482fi
6483
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006484CC="$ac_save_cc"
6485fi
6486
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6488$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006489fi
6490
6491# If we have set a CC compiler flag for thread support then
6492# check if it works for CXX, too.
6493ac_cv_cxx_thread=no
6494if test ! -z "$CXX"
6495then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6497$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006498ac_save_cxx="$CXX"
6499
6500if test "$ac_cv_kpthread" = "yes"
6501then
6502 CXX="$CXX -Kpthread"
6503 ac_cv_cxx_thread=yes
6504elif test "$ac_cv_kthread" = "yes"
6505then
6506 CXX="$CXX -Kthread"
6507 ac_cv_cxx_thread=yes
6508elif test "$ac_cv_pthread" = "yes"
6509then
6510 CXX="$CXX -pthread"
6511 ac_cv_cxx_thread=yes
6512fi
6513
6514if test $ac_cv_cxx_thread = yes
6515then
6516 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6517 $CXX -c conftest.$ac_ext 2>&5
6518 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6519 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6520 then
6521 ac_cv_cxx_thread=yes
6522 else
6523 ac_cv_cxx_thread=no
6524 fi
6525 rm -fr conftest*
6526fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6528$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006529fi
6530CXX="$ac_save_cxx"
6531
6532
6533# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6535$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006536if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006537 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006538else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006540/* end confdefs.h. */
6541#include <stdlib.h>
6542#include <stdarg.h>
6543#include <string.h>
6544#include <float.h>
6545
6546int
6547main ()
6548{
6549
6550 ;
6551 return 0;
6552}
6553_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006554if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006555 ac_cv_header_stdc=yes
6556else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006557 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006558fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6560
6561if test $ac_cv_header_stdc = yes; then
6562 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006564/* end confdefs.h. */
6565#include <string.h>
6566
6567_ACEOF
6568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006569 $EGREP "memchr" >/dev/null 2>&1; then :
6570
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006571else
6572 ac_cv_header_stdc=no
6573fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006574rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006575
6576fi
6577
6578if test $ac_cv_header_stdc = yes; then
6579 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006581/* end confdefs.h. */
6582#include <stdlib.h>
6583
6584_ACEOF
6585if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006586 $EGREP "free" >/dev/null 2>&1; then :
6587
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006588else
6589 ac_cv_header_stdc=no
6590fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006591rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006592
6593fi
6594
6595if test $ac_cv_header_stdc = yes; then
6596 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006597 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006598 :
6599else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006601/* end confdefs.h. */
6602#include <ctype.h>
6603#include <stdlib.h>
6604#if ((' ' & 0x0FF) == 0x020)
6605# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6606# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6607#else
6608# define ISLOWER(c) \
6609 (('a' <= (c) && (c) <= 'i') \
6610 || ('j' <= (c) && (c) <= 'r') \
6611 || ('s' <= (c) && (c) <= 'z'))
6612# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6613#endif
6614
6615#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6616int
6617main ()
6618{
6619 int i;
6620 for (i = 0; i < 256; i++)
6621 if (XOR (islower (i), ISLOWER (i))
6622 || toupper (i) != TOUPPER (i))
6623 return 2;
6624 return 0;
6625}
6626_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006627if ac_fn_c_try_run "$LINENO"; then :
6628
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006629else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006630 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006631fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6633 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006634fi
6635
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006636fi
6637fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6639$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006640if test $ac_cv_header_stdc = yes; then
6641
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006642$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006643
6644fi
6645
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006646for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6647fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006648ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006649shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006650unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006651sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6652sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006653sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00006654sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006655sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00006656sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006657bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006658do :
6659 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6660ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006661if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006662 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006663#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006664_ACEOF
6665
6666fi
6667
Guido van Rossum627b2d71993-12-24 10:39:16 +00006668done
6669
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006670ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006671for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006672 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6674$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006675if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006676 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006677else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006679/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006680#include <sys/types.h>
6681#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006682
Martin v. Löwis11437992002-04-12 09:54:03 +00006683int
6684main ()
6685{
6686if ((DIR *) 0)
6687return 0;
6688 ;
6689 return 0;
6690}
6691_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006692if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006693 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006695 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006698fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006699eval ac_res=\$$as_ac_Header
6700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6701$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006702if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006703 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006704#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006705_ACEOF
6706
6707ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006708fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006709
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006710done
6711# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6712if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6714$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006715if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006716 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006717else
Martin v. Löwis11437992002-04-12 09:54:03 +00006718 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006721
Martin v. Löwiseba40652007-08-30 20:10:57 +00006722/* Override any GCC internal prototype to avoid an error.
6723 Use char because int might match the return type of a GCC
6724 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006725#ifdef __cplusplus
6726extern "C"
6727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006728char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006729int
6730main ()
6731{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006732return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006733 ;
6734 return 0;
6735}
6736_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006737for ac_lib in '' dir; do
6738 if test -z "$ac_lib"; then
6739 ac_res="none required"
6740 else
6741 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006742 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006743 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006744 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006745 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006746fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006747rm -f core conftest.err conftest.$ac_objext \
6748 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006749 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006752done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006753if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006754
Martin v. Löwiseba40652007-08-30 20:10:57 +00006755else
6756 ac_cv_search_opendir=no
6757fi
6758rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006759LIBS=$ac_func_search_save_LIBS
6760fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6762$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006763ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006764if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006765 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006766
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006767fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006768
Michael W. Hudson54241132001-12-07 15:38:26 +00006769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6771$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006772if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006773 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006774else
6775 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006778
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779/* Override any GCC internal prototype to avoid an error.
6780 Use char because int might match the return type of a GCC
6781 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006782#ifdef __cplusplus
6783extern "C"
6784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006785char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006786int
6787main ()
6788{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006789return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 ;
6791 return 0;
6792}
6793_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006794for ac_lib in '' x; do
6795 if test -z "$ac_lib"; then
6796 ac_res="none required"
6797 else
6798 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006799 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006800 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006801 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006802 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006804rm -f core conftest.err conftest.$ac_objext \
6805 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006806 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006807 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006809done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006810if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006811
Martin v. Löwiseba40652007-08-30 20:10:57 +00006812else
6813 ac_cv_search_opendir=no
6814fi
6815rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006816LIBS=$ac_func_search_save_LIBS
6817fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6819$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006820ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006821if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006822 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006823
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006824fi
6825
6826fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006827
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6829$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006830if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006831 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006834/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006835#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006836int
6837main ()
6838{
6839return makedev(0, 0);
6840 ;
6841 return 0;
6842}
6843_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006844if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006845 ac_cv_header_sys_types_h_makedev=yes
6846else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006847 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006848fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006849rm -f core conftest.err conftest.$ac_objext \
6850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006851
6852fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6854$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006855
6856if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006857ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006858if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006859
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006860$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006861
6862fi
6863
6864
6865
6866 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006867 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006868if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006869
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006870$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006871
6872fi
6873
6874
6875 fi
6876fi
6877
Michael W. Hudson54241132001-12-07 15:38:26 +00006878
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006879# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006880for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006881do :
6882 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006883#ifdef HAVE_CURSES_H
6884#include <curses.h>
6885#endif
6886
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006887"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006888if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006889 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006890#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006891_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006892
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006893fi
6894
6895done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006896
6897
Martin v. Löwis11017b12006-01-14 18:12:57 +00006898# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006899for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006900do :
6901 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 +00006902#ifdef HAVE_ASM_TYPES_H
6903#include <asm/types.h>
6904#endif
6905#ifdef HAVE_SYS_SOCKET_H
6906#include <sys/socket.h>
6907#endif
6908
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006909"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006910if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006911 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006912#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006913_ACEOF
6914
6915fi
6916
6917done
6918
6919
Guido van Rossum627b2d71993-12-24 10:39:16 +00006920# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006921was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6923$as_echo_n "checking for clock_t in time.h... " >&6; }
6924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006925/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006926#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006927
6928_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006931 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006932else
Martin v. Löwis11437992002-04-12 09:54:03 +00006933
6934
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006935$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006936
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006937
Guido van Rossum627b2d71993-12-24 10:39:16 +00006938fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006939rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006940
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6942$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006943
Neal Norwitz11690112002-07-30 01:08:28 +00006944# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6946$as_echo_n "checking for makedev... " >&6; }
6947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006948/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006949
6950#if defined(MAJOR_IN_MKDEV)
6951#include <sys/mkdev.h>
6952#elif defined(MAJOR_IN_SYSMACROS)
6953#include <sys/sysmacros.h>
6954#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006955#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006956#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006957int
6958main ()
6959{
6960 makedev(0, 0)
6961 ;
6962 return 0;
6963}
6964_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006965if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006966 ac_cv_has_makedev=yes
6967else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006968 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006969fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006970rm -f core conftest.err conftest.$ac_objext \
6971 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006972if test "$ac_cv_has_makedev" = "no"; then
6973 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006975/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006976
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006977#define _OSF_SOURCE 1
6978#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006979
Neal Norwitz11690112002-07-30 01:08:28 +00006980int
6981main ()
6982{
6983 makedev(0, 0)
6984 ;
6985 return 0;
6986}
6987_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006988if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006989 ac_cv_has_makedev=yes
6990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006991 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006993rm -f core conftest.err conftest.$ac_objext \
6994 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006995 if test "$ac_cv_has_makedev" = "yes"; then
6996
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006997$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006998
6999 fi
7000fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7002$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007003if test "$ac_cv_has_makedev" = "yes"; then
7004
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007005$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007006
7007fi
7008
Martin v. Löwis399a6892002-10-04 10:22:02 +00007009# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7010# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7011# defined, but the compiler does not support pragma redefine_extname,
7012# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7013# structures (such as rlimit64) without declaring them. As a
7014# work-around, disable LFS on such configurations
7015
7016use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7018$as_echo_n "checking Solaris LFS bug... " >&6; }
7019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007020/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007021
7022#define _LARGEFILE_SOURCE 1
7023#define _FILE_OFFSET_BITS 64
7024#include <sys/resource.h>
7025
Martin v. Löwis399a6892002-10-04 10:22:02 +00007026int
7027main ()
7028{
7029struct rlimit foo;
7030 ;
7031 return 0;
7032}
7033_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007035 sol_lfs_bug=no
7036else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007037 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7041$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007042if test "$sol_lfs_bug" = "yes"; then
7043 use_lfs=no
7044fi
7045
7046if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007047# Two defines needed to enable largefile support on various platforms
7048# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007049case $ac_sys_system/$ac_sys_release in
7050AIX*)
7051
7052$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7053
7054 ;;
7055esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007056
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007057$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007058
7059
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007060$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007061
Martin v. Löwis399a6892002-10-04 10:22:02 +00007062fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007063
Guido van Rossum84e7b241996-08-19 21:59:00 +00007064# Add some code to confdefs.h so that the test for off_t works on SCO
7065cat >> confdefs.h <<\EOF
7066#if defined(SCO_DS)
7067#undef _OFF_T
7068#endif
7069EOF
7070
Guido van Rossumef2255b2000-03-10 22:30:29 +00007071# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007072ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007073if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007075else
Martin v. Löwis11437992002-04-12 09:54:03 +00007076
7077cat >>confdefs.h <<_ACEOF
7078#define mode_t int
7079_ACEOF
7080
7081fi
7082
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007083ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007084if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007086else
Martin v. Löwis11437992002-04-12 09:54:03 +00007087
7088cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007089#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007090_ACEOF
7091
7092fi
7093
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007094ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007095if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007097else
Martin v. Löwis11437992002-04-12 09:54:03 +00007098
7099cat >>confdefs.h <<_ACEOF
7100#define pid_t int
7101_ACEOF
7102
7103fi
7104
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007105
Martin v. Löwis11437992002-04-12 09:54:03 +00007106cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007107#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007108_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007109
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007110ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007111if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007112
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007113else
Martin v. Löwis11437992002-04-12 09:54:03 +00007114
7115cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007116#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007117_ACEOF
7118
7119fi
7120
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7122$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007123if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007124 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007125else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007127/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007128#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007129
7130_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007132 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007133 ac_cv_type_uid_t=yes
7134else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007135 ac_cv_type_uid_t=no
7136fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007137rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007138
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007139fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7141$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007142if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007143
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007144$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007145
7146
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007147$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007148
7149fi
7150
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007151
7152# There are two separate checks for each of the exact-width integer types we
7153# need. First we check whether the type is available using the usual
7154# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7155# and <stdint.h> where available). We then also use the special type checks of
7156# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7157# directly, #define's uint32_t to be a suitable type.
7158
7159ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7160if test "x$ac_cv_type_uint32_t" = xyes; then :
7161
7162$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7163
7164fi
7165
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007166ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7167case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007168 no|yes) ;; #(
7169 *)
7170
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007171$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007172
7173
7174cat >>confdefs.h <<_ACEOF
7175#define uint32_t $ac_cv_c_uint32_t
7176_ACEOF
7177;;
7178 esac
7179
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007180
7181ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7182if test "x$ac_cv_type_uint64_t" = xyes; then :
7183
7184$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7185
7186fi
7187
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007188ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7189case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007190 no|yes) ;; #(
7191 *)
7192
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007193$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007194
7195
7196cat >>confdefs.h <<_ACEOF
7197#define uint64_t $ac_cv_c_uint64_t
7198_ACEOF
7199;;
7200 esac
7201
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007202
7203ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7204if test "x$ac_cv_type_int32_t" = xyes; then :
7205
7206$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7207
7208fi
7209
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007210ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7211case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007212 no|yes) ;; #(
7213 *)
7214
7215cat >>confdefs.h <<_ACEOF
7216#define int32_t $ac_cv_c_int32_t
7217_ACEOF
7218;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007219esac
7220
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007221
7222ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7223if test "x$ac_cv_type_int64_t" = xyes; then :
7224
7225$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7226
7227fi
7228
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007229ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7230case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007231 no|yes) ;; #(
7232 *)
7233
7234cat >>confdefs.h <<_ACEOF
7235#define int64_t $ac_cv_c_int64_t
7236_ACEOF
7237;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007238esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007239
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007240
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007242if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007243
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007244$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007245
7246fi
7247
Jack Jansendd19cf82001-12-06 22:36:17 +00007248
Michael W. Hudson54241132001-12-07 15:38:26 +00007249# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007250# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007251# The cast to long int works around a bug in the HP C Compiler
7252# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7253# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7254# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7256$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007257if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007258 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007259else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007260 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 +00007261
Martin v. Löwis11437992002-04-12 09:54:03 +00007262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007263 if test "$ac_cv_type_int" = yes; then
7264 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7265$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007266as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007267See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007268 else
7269 ac_cv_sizeof_int=0
7270 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007272
Martin v. Löwis11437992002-04-12 09:54:03 +00007273fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7275$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007276
7277
7278
Martin v. Löwis11437992002-04-12 09:54:03 +00007279cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007280#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007281_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007282
7283
Martin v. Löwiseba40652007-08-30 20:10:57 +00007284# The cast to long int works around a bug in the HP C Compiler
7285# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7286# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7287# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7289$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007290if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007293 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 +00007294
Martin v. Löwis11437992002-04-12 09:54:03 +00007295else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007296 if test "$ac_cv_type_long" = yes; then
7297 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007299as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007300See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007301 else
7302 ac_cv_sizeof_long=0
7303 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007304fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007305
Martin v. Löwis11437992002-04-12 09:54:03 +00007306fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7308$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007309
7310
7311
Martin v. Löwis11437992002-04-12 09:54:03 +00007312cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007313#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007314_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007315
7316
Martin v. Löwiseba40652007-08-30 20:10:57 +00007317# The cast to long int works around a bug in the HP C Compiler
7318# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7319# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7320# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7322$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007323if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007324 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007325else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007326 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 +00007327
Martin v. Löwis11437992002-04-12 09:54:03 +00007328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007329 if test "$ac_cv_type_void_p" = yes; then
7330 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7331$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007332as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007333See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007334 else
7335 ac_cv_sizeof_void_p=0
7336 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007337fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007338
Martin v. Löwis11437992002-04-12 09:54:03 +00007339fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7341$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007342
7343
7344
Martin v. Löwis11437992002-04-12 09:54:03 +00007345cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007346#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007347_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007348
7349
Martin v. Löwiseba40652007-08-30 20:10:57 +00007350# The cast to long int works around a bug in the HP C Compiler
7351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7353# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7355$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007356if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007357 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007358else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007359 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 +00007360
Martin v. Löwis11437992002-04-12 09:54:03 +00007361else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007362 if test "$ac_cv_type_short" = yes; then
7363 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007365as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007366See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007367 else
7368 ac_cv_sizeof_short=0
7369 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007370fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007371
Martin v. Löwis11437992002-04-12 09:54:03 +00007372fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7374$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007375
7376
7377
Martin v. Löwis11437992002-04-12 09:54:03 +00007378cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007379#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007380_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007381
7382
Martin v. Löwiseba40652007-08-30 20:10:57 +00007383# The cast to long int works around a bug in the HP C Compiler
7384# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7385# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7386# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7388$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007389if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007390 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007391else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007392 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 +00007393
Martin v. Löwis11437992002-04-12 09:54:03 +00007394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007395 if test "$ac_cv_type_float" = yes; then
7396 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7397$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007398as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007399See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007400 else
7401 ac_cv_sizeof_float=0
7402 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007403fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007404
Martin v. Löwis11437992002-04-12 09:54:03 +00007405fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7407$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007408
7409
7410
Martin v. Löwis11437992002-04-12 09:54:03 +00007411cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007412#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007413_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007414
7415
Martin v. Löwiseba40652007-08-30 20:10:57 +00007416# The cast to long int works around a bug in the HP C Compiler
7417# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7418# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7419# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7421$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007422if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007423 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007425 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 +00007426
Martin v. Löwis11437992002-04-12 09:54:03 +00007427else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007428 if test "$ac_cv_type_double" = 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;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007431as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007432See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007433 else
7434 ac_cv_sizeof_double=0
7435 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007436fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007437
Martin v. Löwis11437992002-04-12 09:54:03 +00007438fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7440$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007441
7442
7443
Martin v. Löwis11437992002-04-12 09:54:03 +00007444cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007445#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007446_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007447
7448
Martin v. Löwiseba40652007-08-30 20:10:57 +00007449# The cast to long int works around a bug in the HP C Compiler
7450# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7451# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7452# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7454$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007455if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007456 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007458 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 +00007459
Martin v. Löwis11437992002-04-12 09:54:03 +00007460else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007461 if test "$ac_cv_type_fpos_t" = yes; then
7462 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7463$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007464as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007465See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007466 else
7467 ac_cv_sizeof_fpos_t=0
7468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007469fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007470
Martin v. Löwis11437992002-04-12 09:54:03 +00007471fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7473$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007474
7475
7476
Martin v. Löwis11437992002-04-12 09:54:03 +00007477cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007478#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007479_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007480
Michael W. Hudson54241132001-12-07 15:38:26 +00007481
Martin v. Löwiseba40652007-08-30 20:10:57 +00007482# The cast to long int works around a bug in the HP C Compiler
7483# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7484# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7485# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7487$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007488if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007489 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007491 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 +00007492
Martin v. Löwis18e16552006-02-15 17:27:45 +00007493else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007494 if test "$ac_cv_type_size_t" = yes; then
7495 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7496$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007497as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007498See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007499 else
7500 ac_cv_sizeof_size_t=0
7501 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007502fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007503
Martin v. Löwis18e16552006-02-15 17:27:45 +00007504fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7506$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007507
7508
7509
Martin v. Löwis18e16552006-02-15 17:27:45 +00007510cat >>confdefs.h <<_ACEOF
7511#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7512_ACEOF
7513
7514
Christian Heimes951cc0f2008-01-31 23:08:23 +00007515# The cast to long int works around a bug in the HP C Compiler
7516# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7517# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7518# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7520$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007521if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007522 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007523else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007524 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes951cc0f2008-01-31 23:08:23 +00007525
Christian Heimes951cc0f2008-01-31 23:08:23 +00007526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007527 if test "$ac_cv_type_pid_t" = yes; then
7528 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7529$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007530as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007531See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007532 else
7533 ac_cv_sizeof_pid_t=0
7534 fi
7535fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007536
Christian Heimes951cc0f2008-01-31 23:08:23 +00007537fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7539$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007540
7541
7542
7543cat >>confdefs.h <<_ACEOF
7544#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7545_ACEOF
7546
7547
Michael W. Hudson54241132001-12-07 15:38:26 +00007548
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7550$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007551have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007553/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007554
Martin v. Löwis11437992002-04-12 09:54:03 +00007555int
7556main ()
7557{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007558long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007559 ;
7560 return 0;
7561}
7562_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007563if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007564
7565
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007566$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007567
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007568 have_long_long=yes
7569
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7573$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007574if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007575# The cast to long int works around a bug in the HP C Compiler
7576# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7577# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7578# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7580$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007581if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007582 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007583else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007584 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 +00007585
Martin v. Löwis11437992002-04-12 09:54:03 +00007586else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007587 if test "$ac_cv_type_long_long" = yes; then
7588 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007590as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007591See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007592 else
7593 ac_cv_sizeof_long_long=0
7594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007595fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007596
Martin v. Löwis11437992002-04-12 09:54:03 +00007597fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7599$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007600
7601
7602
Martin v. Löwis11437992002-04-12 09:54:03 +00007603cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007604#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007605_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007606
Michael W. Hudson54241132001-12-07 15:38:26 +00007607
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007608fi
7609
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7611$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007612have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007614/* end confdefs.h. */
7615
7616int
7617main ()
7618{
Matthias Klosec511b472010-05-08 11:01:39 +00007619long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007620 ;
7621 return 0;
7622}
7623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007624if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007625
7626
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007627$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007628
7629 have_long_double=yes
7630
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007631fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7634$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007635if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007636# The cast to long int works around a bug in the HP C Compiler
7637# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7638# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7639# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7641$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007642if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007643 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007645 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007646
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007648 if test "$ac_cv_type_long_double" = yes; then
7649 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007651as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007652See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007653 else
7654 ac_cv_sizeof_long_double=0
7655 fi
7656fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007657
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007658fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7660$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007661
7662
7663
7664cat >>confdefs.h <<_ACEOF
7665#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7666_ACEOF
7667
7668
7669fi
7670
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7672$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007673have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007675/* end confdefs.h. */
7676
7677int
7678main ()
7679{
7680_Bool x; x = (_Bool)0;
7681 ;
7682 return 0;
7683}
7684_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007685if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007686
7687
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007688$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007689
7690 have_c99_bool=yes
7691
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7695$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007696if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007697# The cast to long int works around a bug in the HP C Compiler
7698# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7699# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7700# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7702$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007703if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007704 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007706 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007707
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007708else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007709 if test "$ac_cv_type__Bool" = yes; then
7710 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007712as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007713See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 else
7715 ac_cv_sizeof__Bool=0
7716 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007717fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007718
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007719fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7721$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007722
7723
7724
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007725cat >>confdefs.h <<_ACEOF
7726#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7727_ACEOF
7728
7729
7730fi
7731
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007732ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007733 #include <stdint.h>
7734 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007735 #ifdef HAVE_INTTYPES_H
7736 #include <inttypes.h>
7737 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007738"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007739if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007740
7741cat >>confdefs.h <<_ACEOF
7742#define HAVE_UINTPTR_T 1
7743_ACEOF
7744
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745# The cast to long int works around a bug in the HP C Compiler
7746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7748# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7750$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007751if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007752 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007753else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007754 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 +00007755
Martin v. Löwis11437992002-04-12 09:54:03 +00007756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007757 if test "$ac_cv_type_uintptr_t" = yes; then
7758 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007760as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007761See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762 else
7763 ac_cv_sizeof_uintptr_t=0
7764 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007765fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007766
Martin v. Löwis11437992002-04-12 09:54:03 +00007767fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7769$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007770
7771
7772
Martin v. Löwis11437992002-04-12 09:54:03 +00007773cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007774#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007775_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007776
Michael W. Hudson54241132001-12-07 15:38:26 +00007777
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007778fi
7779
Martin v. Löwisebe26702006-10-02 14:55:51 +00007780
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007781# The cast to long int works around a bug in the HP C Compiler
7782# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7783# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7784# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7786$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007787if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007788 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007789else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007790 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007791#ifdef HAVE_SYS_TYPES_H
7792#include <sys/types.h>
7793#endif
7794
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007795"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007796
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007798 if test "$ac_cv_type_off_t" = yes; then
7799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007801as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007802See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007803 else
7804 ac_cv_sizeof_off_t=0
7805 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007807
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007808fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7810$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007811
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007812
7813
Martin v. Löwis11437992002-04-12 09:54:03 +00007814cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007815#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007816_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007817
Michael W. Hudson54241132001-12-07 15:38:26 +00007818
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007819
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7821$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007822if test "$have_long_long" = yes
7823then
7824if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007825 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007826
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007827$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007828
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7830$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7833$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007834fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007835else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7837$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007838fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007839
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007840# The cast to long int works around a bug in the HP C Compiler
7841# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7842# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7843# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7845$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007846if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007847 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007848else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007849 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007850#ifdef HAVE_SYS_TYPES_H
7851#include <sys/types.h>
7852#endif
7853#ifdef HAVE_TIME_H
7854#include <time.h>
7855#endif
7856
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007857"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007858
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007860 if test "$ac_cv_type_time_t" = yes; then
7861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007863as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007864See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007865 else
7866 ac_cv_sizeof_time_t=0
7867 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007869
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007870fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7872$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007873
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007874
7875
Martin v. Löwis11437992002-04-12 09:54:03 +00007876cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007877#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007878_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007879
Michael W. Hudson54241132001-12-07 15:38:26 +00007880
7881
Trent Mick635f6fb2000-08-23 21:33:05 +00007882# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007883ac_save_cc="$CC"
7884if test "$ac_cv_kpthread" = "yes"
7885then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007886elif test "$ac_cv_kthread" = "yes"
7887then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007888elif test "$ac_cv_pthread" = "yes"
7889then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007890fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7892$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007893have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007895/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007896
7897 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007898int
7899main ()
7900{
Guido van Rossum12580492000-09-24 16:47:19 +00007901pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 ;
7903 return 0;
7904}
Matthias Klosec511b472010-05-08 11:01:39 +00007905
Martin v. Löwis11437992002-04-12 09:54:03 +00007906_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007907if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007908 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7912$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007913if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007914 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007915# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7916# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7917# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7919$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007920if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007921 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007922else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007923 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007924#ifdef HAVE_PTHREAD_H
7925#include <pthread.h>
7926#endif
7927
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007928"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007929
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007931 if test "$ac_cv_type_pthread_t" = yes; then
7932 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7933$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007934as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007935See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007936 else
7937 ac_cv_sizeof_pthread_t=0
7938 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007939fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007940
Trent Mick635f6fb2000-08-23 21:33:05 +00007941fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7943$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007944
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007945
7946
Martin v. Löwis11437992002-04-12 09:54:03 +00007947cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007948#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007949_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007950
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007951
Trent Mick635f6fb2000-08-23 21:33:05 +00007952fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007953CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007954
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7956$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007958if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007959 enableval=$enable_toolbox_glue;
7960fi
Jack Jansene578a632001-08-15 01:27:14 +00007961
7962
7963if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007964then
Jack Jansene578a632001-08-15 01:27:14 +00007965 case $ac_sys_system/$ac_sys_release in
7966 Darwin/*)
7967 enable_toolbox_glue="yes";;
7968 *)
7969 enable_toolbox_glue="no";;
7970 esac
7971fi
7972case "$enable_toolbox_glue" in
7973yes)
Jack Jansene578a632001-08-15 01:27:14 +00007974 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007975 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007977$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007978
7979 ;;
7980*)
Jack Jansene578a632001-08-15 01:27:14 +00007981 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007982 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007983 ;;
7984esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7986$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007987
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007988
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007989
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007990case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007991 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007992 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7993 ;;
7994 Darwin/*)
7995 OTHER_LIBTOOL_OPT=""
7996 ;;
7997esac
7998
7999
Ronald Oussoren25967582009-09-06 10:00:26 +00008000
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008001case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008002 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008003 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8004 if test "${enable_universalsdk}"; then
8005 :
8006 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008007 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008008 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008009 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008010 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008011 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008012 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008013 if test ${gcc_version} '<' 4.0
8014 then
8015 LIBTOOL_CRUFT="-lcc_dynamic"
8016 else
8017 LIBTOOL_CRUFT=""
8018 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008019 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008020 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008023/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008024
Ronald Oussoren25967582009-09-06 10:00:26 +00008025 #include <unistd.h>
8026 int main(int argc, char*argv[])
8027 {
8028 if (sizeof(long) == 4) {
8029 return 0;
8030 } else {
8031 return 1;
8032 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008033 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008034
Ronald Oussoren25967582009-09-06 10:00:26 +00008035_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008036if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008037 ac_osx_32bit=yes
8038else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008039 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008040fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8042 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008043fi
8044
8045
Ronald Oussoren25967582009-09-06 10:00:26 +00008046 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008047 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008048 i386)
8049 MACOSX_DEFAULT_ARCH="i386"
8050 ;;
8051 ppc)
8052 MACOSX_DEFAULT_ARCH="ppc"
8053 ;;
8054 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008055 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008056 ;;
8057 esac
8058 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008059 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008060 i386)
8061 MACOSX_DEFAULT_ARCH="x86_64"
8062 ;;
8063 ppc)
8064 MACOSX_DEFAULT_ARCH="ppc64"
8065 ;;
8066 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008067 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008068 ;;
8069 esac
8070
8071 #ARCH_RUN_32BIT="true"
8072 fi
8073
8074 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008075 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008076 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008077esac
8078
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8080$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008081if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008082then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008083 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008085 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008086
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008087$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008088
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8090$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008091 if test $enable_shared = "yes"
8092 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008093 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." "$LINENO" 5
Ronald Oussoren450d5612009-06-08 21:12:41 +00008094 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008095else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8097$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008098fi
8099
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8101$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008102case $ac_sys_system/$ac_sys_release in
8103 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008104
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008106
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8108$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008109 ;;
8110 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8112$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008113 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008114esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008115
Guido van Rossum0a516c91994-09-12 10:58:40 +00008116# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008117
Michael W. Hudson54241132001-12-07 15:38:26 +00008118
8119
8120
8121
Ronald Oussoren75912852010-04-08 08:13:31 +00008122
Guido van Rossum0a516c91994-09-12 10:58:40 +00008123# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008124# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8126$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008127if test -z "$SO"
8128then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008129 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008130 hp*|HP*)
8131 case `uname -m` in
8132 ia64) SO=.so;;
8133 *) SO=.sl;;
8134 esac
8135 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008136 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008137 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008138 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008139else
8140 # this might also be a termcap variable, see #610332
8141 echo
8142 echo '====================================================================='
8143 echo '+ +'
8144 echo '+ WARNING: You have set SO in your environment. +'
8145 echo '+ Do you really mean to change the extension for shared libraries? +'
8146 echo '+ Continuing in 10 seconds to let you to ponder. +'
8147 echo '+ +'
8148 echo '====================================================================='
8149 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8152$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008153
Ronald Oussoren79f90492009-01-02 10:44:46 +00008154
Neal Norwitz58e28882006-05-19 07:00:58 +00008155cat >>confdefs.h <<_ACEOF
8156#define SHLIB_EXT "$SO"
8157_ACEOF
8158
Guido van Rossum0a516c91994-09-12 10:58:40 +00008159# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008160# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008161# (Shared libraries in this instance are shared modules to be loaded into
8162# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8164$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008165if test -z "$LDSHARED"
8166then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008167 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008168 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008169 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008170 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008171 ;;
8172 BeOS*)
8173 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008174 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008175 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008176 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008177 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008178 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008179 if test "$GCC" = "yes" ; then
8180 LDSHARED='$(CC) -shared'
8181 LDCXXSHARED='$(CXX) -shared'
8182 else
8183 LDSHARED='$(CC) -G'
8184 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008185 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008186 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008187 if test "$GCC" = "yes" ; then
8188 LDSHARED='$(CC) -shared'
8189 LDCXXSHARED='$(CXX) -shared'
8190 else
8191 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008192 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008193 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008194 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008195 LDSHARED='$(CC) -bundle'
8196 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008197 if test "$enable_framework" ; then
8198 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008199 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8200 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008201 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008202 else
8203 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008204 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008205 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008206 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008207 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008208 LDSHARED='$(CC) -bundle'
8209 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008210 if test "$enable_framework" ; then
8211 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008212 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8213 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008214 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008215 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008216 # No framework, use the Python app as bundle-loader
8217 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008218 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008219 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008220 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008221 Darwin/*)
8222 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8223 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008224
Ronald Oussoren5640ce22008-06-05 12:58:24 +00008225 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008226 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00008227 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00008228 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008229 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00008230 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8231 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008232 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008233 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008234 LDSHARED='$(CC) -bundle'
8235 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008236 if test "$enable_framework" ; then
8237 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008238 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8239 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008240 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008241 else
8242 # No framework, use the Python app as bundle-loader
8243 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8244 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008245 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008246 fi
8247 fi
8248 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008249 Linux*|GNU*|QNX*)
8250 LDSHARED='$(CC) -shared'
8251 LDCXXSHARED='$(CXX) -shared';;
8252 BSD/OS*/4*)
8253 LDSHARED="gcc -shared"
8254 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008255 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008256 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008257 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008258 LDSHARED='$(CC) -shared'
8259 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008260 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008261 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008262 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008263 OpenBSD*)
8264 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8265 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008266 LDSHARED='$(CC) -shared $(CCSHARED)'
8267 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008268 else
8269 case `uname -r` in
8270 [01].* | 2.[0-7] | 2.[0-7].*)
8271 LDSHARED="ld -Bshareable ${LDFLAGS}"
8272 ;;
8273 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008274 LDSHARED='$(CC) -shared $(CCSHARED)'
8275 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008276 ;;
8277 esac
8278 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008279 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008280 LDSHARED='$(CC) -shared'
8281 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008282 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008283 if test "$GCC" = "yes" ; then
8284 LDSHARED='$(CC) -shared'
8285 LDCXXSHARED='$(CXX) -shared'
8286 else
8287 LDSHARED='$(CC) -G'
8288 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008289 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008290 SCO_SV*)
8291 LDSHARED='$(CC) -Wl,-G,-Bexport'
8292 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8293 CYGWIN*)
8294 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8295 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8296 atheos*)
8297 LDSHARED="gcc -shared"
8298 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008299 *) LDSHARED="ld";;
8300 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008301fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8303$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008304LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008305BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008306# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008307# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8309$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008310if test -z "$CCSHARED"
8311then
Guido van Rossum07397971997-04-29 21:49:50 +00008312 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008313 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008314 then CCSHARED="-fPIC";
8315 elif test `uname -p` = sparc;
8316 then CCSHARED="-xcode=pic32";
8317 else CCSHARED="-Kpic";
8318 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008319 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008320 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008321 else CCSHARED="+z";
8322 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008323 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008324 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008325 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008326 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008327 if test "$GCC" = "yes"
8328 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008329 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008330 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008331 SCO_SV*)
8332 if test "$GCC" = "yes"
8333 then CCSHARED="-fPIC"
8334 else CCSHARED="-Kpic -belf"
8335 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008336 IRIX*/6*) case $CC in
8337 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008338 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008339 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008340 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008341 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008342fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8344$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008345# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008346# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8348$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008349if test -z "$LINKFORSHARED"
8350then
Guido van Rossum07397971997-04-29 21:49:50 +00008351 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008352 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008353 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008354 LINKFORSHARED="-Wl,-E -Wl,+s";;
8355# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008356 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008357 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008358 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008359 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008360 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8361 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008362 # not used by the core itself but which needs to be in the core so
8363 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008364 # -prebind is no longer used, because it actually seems to give a
8365 # slowdown in stead of a speedup, maybe due to the large number of
8366 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008367
8368 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008369 if test "$enable_framework"
8370 then
Jack Jansenda49e192005-01-07 13:08:22 +00008371 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008372 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008373 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008374 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008375 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008376 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008377 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008378 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8379 then
8380 LINKFORSHARED="-Wl,--export-dynamic"
8381 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008382 SunOS/5*) case $CC in
8383 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008384 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008385 then
8386 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008387 fi;;
8388 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008389 CYGWIN*)
8390 if test $enable_shared = "no"
8391 then
8392 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8393 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008394 QNX*)
8395 # -Wl,-E causes the symbols to be added to the dynamic
8396 # symbol table so that they can be found when a module
8397 # is loaded. -N 2048K causes the stack size to be set
8398 # to 2048 kilobytes so that the stack doesn't overflow
8399 # when running test_compile.py.
8400 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008401 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008402fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8404$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008405
Michael W. Hudson54241132001-12-07 15:38:26 +00008406
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008407
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8409$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008410if test ! "$LIBRARY" = "$LDLIBRARY"
8411then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008412 case $ac_sys_system in
8413 CYGWIN*)
8414 # Cygwin needs CCSHARED when building extension DLLs
8415 # but not when building the interpreter DLL.
8416 CFLAGSFORSHARED='';;
8417 *)
8418 CFLAGSFORSHARED='$(CCSHARED)'
8419 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008420fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8422$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008423
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008424# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8425# library (with --enable-shared).
8426# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008427# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8428# if it is not required, since it creates a dependency of the shared library
8429# to LIBS. This, in turn, means that applications linking the shared libpython
8430# don't need to link LIBS explicitly. The default should be only changed
8431# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8434$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008435case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008436 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008437 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008438esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8440$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008441
8442
Guido van Rossum627b2d71993-12-24 10:39:16 +00008443# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8445$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008446if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008447 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008448else
Martin v. Löwis11437992002-04-12 09:54:03 +00008449 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008450LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008453
Martin v. Löwiseba40652007-08-30 20:10:57 +00008454/* Override any GCC internal prototype to avoid an error.
8455 Use char because int might match the return type of a GCC
8456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008457#ifdef __cplusplus
8458extern "C"
8459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008460char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008461int
8462main ()
8463{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008464return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ;
8466 return 0;
8467}
8468_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008472 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008473fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008474rm -f core conftest.err conftest.$ac_objext \
8475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008476LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008477fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8479$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008480if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 cat >>confdefs.h <<_ACEOF
8482#define HAVE_LIBDL 1
8483_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008484
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008485 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008486
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008487fi
8488 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8490$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008491if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008492 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008493else
Martin v. Löwis11437992002-04-12 09:54:03 +00008494 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008495LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008498
Martin v. Löwiseba40652007-08-30 20:10:57 +00008499/* Override any GCC internal prototype to avoid an error.
8500 Use char because int might match the return type of a GCC
8501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008502#ifdef __cplusplus
8503extern "C"
8504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008505char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008506int
8507main ()
8508{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008509return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 ;
8511 return 0;
8512}
8513_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008514if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008516else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008517 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008518fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008519rm -f core conftest.err conftest.$ac_objext \
8520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008521LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008522fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8524$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008525if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 cat >>confdefs.h <<_ACEOF
8527#define HAVE_LIBDLD 1
8528_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008529
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008530 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008531
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008532fi
8533 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008534
Ronald Oussoren79f90492009-01-02 10:44:46 +00008535# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008536if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8538$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008539if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008540 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008541else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008542 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008545
Martin v. Löwiseba40652007-08-30 20:10:57 +00008546/* Override any GCC internal prototype to avoid an error.
8547 Use char because int might match the return type of a GCC
8548 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008549#ifdef __cplusplus
8550extern "C"
8551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008552char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008553int
8554main ()
8555{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008556return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 ;
8558 return 0;
8559}
8560_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008561for ac_lib in '' pthread rt posix4; do
8562 if test -z "$ac_lib"; then
8563 ac_res="none required"
8564 else
8565 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008566 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008567 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008568 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008569 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008570fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008571rm -f core conftest.err conftest.$ac_objext \
8572 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008573 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008574 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008577if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008578
Martin v. Löwiseba40652007-08-30 20:10:57 +00008579else
8580 ac_cv_search_sem_init=no
8581fi
8582rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008583LIBS=$ac_func_search_save_LIBS
8584fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8586$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008587ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008588if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008589 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008590
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008591fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008592 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008593 # posix4 on Solaris 2.6
8594 # pthread (first!) on Linux
8595fi
8596
Martin v. Löwis19d17342003-06-14 21:03:05 +00008597# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8599$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008600if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008601 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008602else
8603 ac_check_lib_save_LIBS=$LIBS
8604LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008606/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008607
Martin v. Löwiseba40652007-08-30 20:10:57 +00008608/* Override any GCC internal prototype to avoid an error.
8609 Use char because int might match the return type of a GCC
8610 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008611#ifdef __cplusplus
8612extern "C"
8613#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008614char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008615int
8616main ()
8617{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008618return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008619 ;
8620 return 0;
8621}
8622_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008624 ac_cv_lib_intl_textdomain=yes
8625else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008626 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008627fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008628rm -f core conftest.err conftest.$ac_objext \
8629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008630LIBS=$ac_check_lib_save_LIBS
8631fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8633$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008634if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008635
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008636$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008637
8638fi
8639
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008640
8641# checks for system dependent C++ extensions support
8642case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008643 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8644$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008646/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008647
Georg Brandl94800df2011-02-25 11:09:02 +00008648 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008649int
8650main ()
8651{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008652loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008653 ;
8654 return 0;
8655}
Matthias Klosec511b472010-05-08 11:01:39 +00008656
Martin v. Löwis11437992002-04-12 09:54:03 +00008657_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008658if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008659
Matthias Klosec511b472010-05-08 11:01:39 +00008660
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008661$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008662
Matthias Klosec511b472010-05-08 11:01:39 +00008663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008664$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008665
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008666else
Matthias Klosec511b472010-05-08 11:01:39 +00008667
8668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008669$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008670
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008671fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008672rm -f core conftest.err conftest.$ac_objext \
8673 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008674 *) ;;
8675esac
8676
Guido van Rossum70c7f481998-03-26 18:44:10 +00008677# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008678# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8680$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008681if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008682 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008683else
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008685LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008688
Martin v. Löwiseba40652007-08-30 20:10:57 +00008689/* Override any GCC internal prototype to avoid an error.
8690 Use char because int might match the return type of a GCC
8691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008692#ifdef __cplusplus
8693extern "C"
8694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008695char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008696int
8697main ()
8698{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008699return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 ;
8701 return 0;
8702}
8703_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008704if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008707 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008708fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008709rm -f core conftest.err conftest.$ac_objext \
8710 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008711LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8714$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008715if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008716 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008717fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008718 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8720$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008721if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008722 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008723else
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008725LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008728
Martin v. Löwiseba40652007-08-30 20:10:57 +00008729/* Override any GCC internal prototype to avoid an error.
8730 Use char because int might match the return type of a GCC
8731 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008732#ifdef __cplusplus
8733extern "C"
8734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008735char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008736int
8737main ()
8738{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008739return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008740 ;
8741 return 0;
8742}
8743_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008744if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008746else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008747 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008748fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008749rm -f core conftest.err conftest.$ac_objext \
8750 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008751LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008752fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8754$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008755if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008756 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008757fi
8758 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008759
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008760case "$ac_sys_system" in
8761BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8763$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008764if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008765 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008766else
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008768LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008771
Martin v. Löwiseba40652007-08-30 20:10:57 +00008772/* Override any GCC internal prototype to avoid an error.
8773 Use char because int might match the return type of a GCC
8774 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008775#ifdef __cplusplus
8776extern "C"
8777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008778char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008779int
8780main ()
8781{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008782return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008783 ;
8784 return 0;
8785}
8786_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008787if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008789else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008790 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008791fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008792rm -f core conftest.err conftest.$ac_objext \
8793 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008794LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008795fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8797$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008798if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008799 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008800fi
8801 # BeOS
8802;;
8803esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008804
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8806$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008807
Martin v. Löwiseba40652007-08-30 20:10:57 +00008808# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008809if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8812$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008813LIBS="$withval $LIBS"
8814
8815else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8817$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008818fi
8819
Guido van Rossum7f43da71994-08-01 12:15:30 +00008820
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008821if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008822 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8823set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8825$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008826if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008827 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008828else
8829 case $PKG_CONFIG in
8830 [\\/]* | ?:[\\/]*)
8831 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8832 ;;
8833 *)
8834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8835for as_dir in $PATH
8836do
8837 IFS=$as_save_IFS
8838 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008839 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008841 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008843 break 2
8844 fi
8845done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008846 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008847IFS=$as_save_IFS
8848
8849 ;;
8850esac
8851fi
8852PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8853if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8855$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8858$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008859fi
8860
8861
8862fi
8863if test -z "$ac_cv_path_PKG_CONFIG"; then
8864 ac_pt_PKG_CONFIG=$PKG_CONFIG
8865 # Extract the first word of "pkg-config", so it can be a program name with args.
8866set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8868$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008869if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008870 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008871else
8872 case $ac_pt_PKG_CONFIG in
8873 [\\/]* | ?:[\\/]*)
8874 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8875 ;;
8876 *)
8877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8878for as_dir in $PATH
8879do
8880 IFS=$as_save_IFS
8881 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008882 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008884 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008886 break 2
8887 fi
8888done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008889 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008890IFS=$as_save_IFS
8891
8892 ;;
8893esac
8894fi
8895ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8896if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8898$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008899else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8901$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008902fi
8903
8904 if test "x$ac_pt_PKG_CONFIG" = x; then
8905 PKG_CONFIG=""
8906 else
8907 case $cross_compiling:$ac_tool_warned in
8908yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008909{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8910$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008911ac_tool_warned=yes ;;
8912esac
8913 PKG_CONFIG=$ac_pt_PKG_CONFIG
8914 fi
8915else
8916 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8917fi
8918
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008919
8920# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8922$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008923
8924# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008925if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008926 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008927else
8928 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008929fi
8930
8931
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8933$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008934
8935# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8937$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008938
8939# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008940if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008941 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008942else
8943 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008944fi
8945
8946
8947if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008948 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8949else
8950 LIBFFI_INCLUDEDIR=""
8951fi
8952
8953
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8955$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008956
Benjamin Peterson867475c2009-04-29 20:36:25 +00008957# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8959$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008960
8961# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008962if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008963 withval=$with_dbmliborder;
8964if test x$with_dbmliborder = xyes
8965then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008966as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008967else
8968 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8969 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8970 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008971 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008972 fi
8973 done
8974fi
8975fi
8976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8978$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008979
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008980# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008981
8982
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8984$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008985
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008987if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988 withval=$with_signal_module;
8989fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008990
8991
8992if test -z "$with_signal_module"
8993then with_signal_module="yes"
8994fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8996$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008997
8998if test "${with_signal_module}" = "yes"; then
8999 USE_SIGNAL_MODULE=""
9000 SIGNAL_OBJS=""
9001else
9002 USE_SIGNAL_MODULE="#"
9003 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9004fi
9005
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009006# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009007
Barry Warsawc0d24d82000-06-29 16:12:00 +00009008USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009009
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9011$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009012
Guido van Rossumec2f0731997-01-22 20:54:01 +00009013
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009015if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009016 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9018$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009019LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009020if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009021 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009022fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009023else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9025$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009026fi
9027
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
9029# Templates for things AC_DEFINEd more than once.
9030# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009031
9032
Martin v. Löwis11437992002-04-12 09:54:03 +00009033
9034
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9036$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009037
Martin v. Löwiseba40652007-08-30 20:10:57 +00009038# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009039if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009040 withval=$with_threads;
9041fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009042
9043
Barry Warsawc0d24d82000-06-29 16:12:00 +00009044# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009045
Martin v. Löwiseba40652007-08-30 20:10:57 +00009046# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009047if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009048 withval=$with_thread; with_threads=$with_thread
9049fi
9050
Barry Warsawc0d24d82000-06-29 16:12:00 +00009051
9052if test -z "$with_threads"
9053then with_threads="yes"
9054fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9056$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009057
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009058
Barry Warsawc0d24d82000-06-29 16:12:00 +00009059if test "$with_threads" = "no"
9060then
9061 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009062elif test "$ac_cv_pthread_is_default" = yes
9063then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009064 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009065
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009066 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009067 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009068
9069 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009070 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009071elif test "$ac_cv_kpthread" = "yes"
9072then
9073 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009074 if test "$ac_cv_cxx_thread" = "yes"; then
9075 CXX="$CXX -Kpthread"
9076 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009077 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009078
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009079 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009080 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009081elif test "$ac_cv_kthread" = "yes"
9082then
9083 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009084 if test "$ac_cv_cxx_thread" = "yes"; then
9085 CXX="$CXX -Kthread"
9086 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009087 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009088
9089 posix_threads=yes
9090 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009091elif test "$ac_cv_pthread" = "yes"
9092then
9093 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009094 if test "$ac_cv_cxx_thread" = "yes"; then
9095 CXX="$CXX -pthread"
9096 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009097 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009098
9099 posix_threads=yes
9100 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009101else
9102 if test ! -z "$with_threads" -a -d "$with_threads"
9103 then LDFLAGS="$LDFLAGS -L$with_threads"
9104 fi
9105 if test ! -z "$withval" -a -d "$withval"
9106 then LDFLAGS="$LDFLAGS -L$withval"
9107 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009108
9109 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009110 # define _POSIX_THREADS in unistd.h. Some apparently don't
9111 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9113$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009115/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009116
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009117#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009118#ifdef _POSIX_THREADS
9119yes
9120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009121
9122_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009124 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009125 unistd_defines_pthreads=yes
9126else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009127 unistd_defines_pthreads=no
9128fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009129rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009130
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9132$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009133
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009134 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009135
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009136 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009137if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009138 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009139
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009140 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009141
Martin v. Löwis11437992002-04-12 09:54:03 +00009142
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009143$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009144
9145 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009146 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009147else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009148
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009149 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009150if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009151 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009152
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009153 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009154
Martin v. Löwis11437992002-04-12 09:54:03 +00009155
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009156$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009157
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009158 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009159else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009160
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9162$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009163
Martin v. Löwiseba40652007-08-30 20:10:57 +00009164# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009165if test "${with_pth+set}" = set; then :
9166 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9167$as_echo "$withval" >&6; }
9168 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009169
9170
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009171$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009172
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009173 LIBS="-lpth $LIBS"
9174 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009175else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9177$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009178
9179 # Just looking for pthread_create in libpthread is not enough:
9180 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9181 # So we really have to include pthread.h, and then link.
9182 _libs=$LIBS
9183 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9185$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009187/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009188
9189#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009190#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009191
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009192void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009193int
9194main ()
9195{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009196
9197pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009198 ;
9199 return 0;
9200}
9201_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009202if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009203
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9205$as_echo "yes" >&6; }
9206 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009207
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009208 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009209 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009210else
Martin v. Löwis11437992002-04-12 09:54:03 +00009211
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009212 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009213 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009214if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009215 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009216
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009217 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009218 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009219else
Guido van Rossumad678af1998-10-02 14:42:15 +00009220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009221 ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009222if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009223 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009224
9225
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009226$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009227
9228 THREADOBJ="Python/thread.o"
9229else
9230
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009231 ac_fn_c_check_header_mongrel "$LINENO" "kernel/OS.h" "ac_cv_header_kernel_OS_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009232if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009233 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009234
9235
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009236$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009237
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009238 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009239else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009240
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9242$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009243if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009244 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009245else
Martin v. Löwis11437992002-04-12 09:54:03 +00009246 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009247LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009250
Martin v. Löwiseba40652007-08-30 20:10:57 +00009251/* Override any GCC internal prototype to avoid an error.
9252 Use char because int might match the return type of a GCC
9253 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009254#ifdef __cplusplus
9255extern "C"
9256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009257char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009258int
9259main ()
9260{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009261return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 ;
9263 return 0;
9264}
9265_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009266if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009267 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009268else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009269 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009270fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009271rm -f core conftest.err conftest.$ac_objext \
9272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009273LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009274fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9276$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009277if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009278 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009279
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009280 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009281 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009282 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009283else
Greg Steinadf63d62000-07-05 10:38:09 +00009284
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9286$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009287if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009288 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009289else
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009291LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009294
Martin v. Löwiseba40652007-08-30 20:10:57 +00009295/* Override any GCC internal prototype to avoid an error.
9296 Use char because int might match the return type of a GCC
9297 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009298#ifdef __cplusplus
9299extern "C"
9300#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009301char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009302int
9303main ()
9304{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009305return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 ;
9307 return 0;
9308}
9309_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009310if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009311 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009313 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009314fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009315rm -f core conftest.err conftest.$ac_objext \
9316 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009317LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009318fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9320$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009321if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009322 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009323
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009324 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009325 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009326 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009327else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009328
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9330$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009331if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009332 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009333else
Martin v. Löwis11437992002-04-12 09:54:03 +00009334 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009335LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009338
Martin v. Löwiseba40652007-08-30 20:10:57 +00009339/* Override any GCC internal prototype to avoid an error.
9340 Use char because int might match the return type of a GCC
9341 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009342#ifdef __cplusplus
9343extern "C"
9344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009345char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009346int
9347main ()
9348{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009349return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 ;
9351 return 0;
9352}
9353_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009354if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009356else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009357 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009358fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009359rm -f core conftest.err conftest.$ac_objext \
9360 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009361LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009362fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9364$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009365if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009366 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009367
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009368 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009369 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009370 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009371else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9374$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009375if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009376 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009377else
Martin v. Löwis11437992002-04-12 09:54:03 +00009378 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009379LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009382
Martin v. Löwiseba40652007-08-30 20:10:57 +00009383/* Override any GCC internal prototype to avoid an error.
9384 Use char because int might match the return type of a GCC
9385 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009386#ifdef __cplusplus
9387extern "C"
9388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009389char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009390int
9391main ()
9392{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009394 ;
9395 return 0;
9396}
9397_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009398if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009399 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009400else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009401 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009402fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009403rm -f core conftest.err conftest.$ac_objext \
9404 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009405LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009406fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9408$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009409if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009410 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009411
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009412 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009413 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009414 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009415else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009416
Martin v. Löwis130fb172001-07-19 11:00:41 +00009417 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009418fi
9419
Guido van Rossum627b2d71993-12-24 10:39:16 +00009420
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009421fi
9422
Guido van Rossum0be3e491997-05-22 20:33:33 +00009423fi
9424
Guido van Rossum49545951997-12-02 19:28:29 +00009425fi
9426
Guido van Rossumb93a8621998-05-07 13:27:32 +00009427fi
9428
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009429
Michael W. Hudson54241132001-12-07 15:38:26 +00009430fi
9431
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009432
9433fi
9434
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009435fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009436rm -f core conftest.err conftest.$ac_objext \
9437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009438fi
9439
Martin v. Löwis11437992002-04-12 09:54:03 +00009440fi
9441
9442
9443fi
9444
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009445
Michael W. Hudson54241132001-12-07 15:38:26 +00009446
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9448$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009449if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009450 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009451else
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009453LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009456
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457/* Override any GCC internal prototype to avoid an error.
9458 Use char because int might match the return type of a GCC
9459 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009460#ifdef __cplusplus
9461extern "C"
9462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009463char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009464int
9465main ()
9466{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009467return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ;
9469 return 0;
9470}
9471_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009472if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009475 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009476fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009477rm -f core conftest.err conftest.$ac_objext \
9478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009479LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009480fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9482$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009483if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009484 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009485
Martin v. Löwis130fb172001-07-19 11:00:41 +00009486 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009487 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009488 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009489fi
9490
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009491
Neal Norwitza978ab02002-11-02 16:58:05 +00009492 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9494$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009495if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009496 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009497else
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009499LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502
Martin v. Löwiseba40652007-08-30 20:10:57 +00009503/* Override any GCC internal prototype to avoid an error.
9504 Use char because int might match the return type of a GCC
9505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009506#ifdef __cplusplus
9507extern "C"
9508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009509char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009510int
9511main ()
9512{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009513return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 ;
9515 return 0;
9516}
9517_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009520else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009521 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009522fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009523rm -f core conftest.err conftest.$ac_objext \
9524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009525LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009526fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9528$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009529if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009530 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009531
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009532 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009533 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009534 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009535fi
9536
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009537 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009538
Martin v. Löwis130fb172001-07-19 11:00:41 +00009539 if test "$USE_THREAD_MODULE" != "#"
9540 then
9541 # If the above checks didn't disable threads, (at least) OSF1
9542 # needs this '-threads' argument during linking.
9543 case $ac_sys_system in
9544 OSF1) LDLAST=-threads;;
9545 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009546 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009547fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009548
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009549if test "$posix_threads" = "yes"; then
9550 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009551
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009552$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009553
9554 fi
9555
9556 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9557 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009558 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009559$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009560
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009561 ;;
9562 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009563$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009564
9565 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009566 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009567$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009568
9569 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009570 esac
9571
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9573$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009574 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009575 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009576else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009577 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009578 ac_cv_pthread_system_supported=no
9579else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009581/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009582
9583 #include <stdio.h>
9584 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009585 void *foo(void *parm) {
9586 return NULL;
9587 }
9588 main() {
9589 pthread_attr_t attr;
9590 pthread_t id;
9591 if (pthread_attr_init(&attr)) exit(-1);
9592 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9593 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9594 exit(0);
9595 }
9596_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009597if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009598 ac_cv_pthread_system_supported=yes
9599else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009600 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009601fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9603 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009604fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009605
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606
Guido van Rossum627b2d71993-12-24 10:39:16 +00009607fi
9608
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9610$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009611 if test "$ac_cv_pthread_system_supported" = "yes"; then
9612
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009613$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009614
9615 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616 for ac_func in pthread_sigmask
9617do :
9618 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009619if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009620 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009621#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009622_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009623 case $ac_sys_system in
9624 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009625
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009626$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009627
9628 ;;
9629 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009630fi
9631done
9632
Christian Heimes0d604cf2013-08-21 13:26:05 +02009633 for ac_func in pthread_atfork
9634do :
9635 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9636if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9637 cat >>confdefs.h <<_ACEOF
9638#define HAVE_PTHREAD_ATFORK 1
9639_ACEOF
9640
9641fi
9642done
9643
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009644fi
9645
9646
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009647# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009648
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9650$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009651# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009652if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009653 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009654 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9656$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009657 ipv6=no
9658 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009659 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9660$as_echo "yes" >&6; }
9661 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009662
9663 ipv6=yes
9664 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009665 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009666else
Martin v. Löwis11437992002-04-12 09:54:03 +00009667
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009670 /* AF_INET6 available check */
9671#include <sys/types.h>
9672#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009673int
9674main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009675{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009676int domain = AF_INET6;
9677 ;
9678 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009679}
Martin v. Löwis11437992002-04-12 09:54:03 +00009680_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009681if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009682
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9684$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009685 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009686
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009687else
Matthias Klosec511b472010-05-08 11:01:39 +00009688
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9690$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009691 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009692
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009693fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009695
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009696if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9698$as_echo_n "checking if RFC2553 API is available... " >&6; }
9699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009700/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009701
9702 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009703#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009704int
9705main ()
9706{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009707struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009708 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ;
9710 return 0;
9711}
Matthias Klosec511b472010-05-08 11:01:39 +00009712
Martin v. Löwis11437992002-04-12 09:54:03 +00009713_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009714if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009715
9716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009717$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009718 ipv6=yes
9719
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009720else
Matthias Klosec511b472010-05-08 11:01:39 +00009721
9722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009723$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009724 ipv6=no
9725
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009728fi
9729
9730if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009731 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009732
9733fi
9734
Martin v. Löwiseba40652007-08-30 20:10:57 +00009735fi
9736
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009737
9738ipv6type=unknown
9739ipv6lib=none
9740ipv6trylibc=no
9741
9742if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9744$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009745 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9746 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009747 case $i in
9748 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009750/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009751
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009752#include <netinet/in.h>
9753#ifdef IPV6_INRIA_VERSION
9754yes
9755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009756_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009758 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009759 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009760fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009761rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009762
9763 ;;
9764 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009766/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009767
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009768#include <netinet/in.h>
9769#ifdef __KAME__
9770yes
9771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009772_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009773if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009774 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009775 ipv6type=$i;
9776 ipv6lib=inet6
9777 ipv6libdir=/usr/local/v6/lib
9778 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009779fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009780rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009781
9782 ;;
9783 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009785/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009786
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009787#include <features.h>
9788#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9789yes
9790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009791_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009793 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009794 ipv6type=$i;
9795 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009796fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009797rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009798
9799 ;;
9800 linux-inet6)
9801 if test -d /usr/inet6; then
9802 ipv6type=$i
9803 ipv6lib=inet6
9804 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009805 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009806 fi
9807 ;;
9808 solaris)
9809 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009810 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009811 ipv6type=$i
9812 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009813 fi
9814 fi
9815 ;;
9816 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009818/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009819
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009820#include <sys/param.h>
9821#ifdef _TOSHIBA_INET6
9822yes
9823#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009824_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009826 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009827 ipv6type=$i;
9828 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009829 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009830fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009831rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009832
9833 ;;
9834 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009837
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009838#include </usr/local/v6/include/sys/v6config.h>
9839#ifdef __V6D__
9840yes
9841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009842_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009844 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009845 ipv6type=$i;
9846 ipv6lib=v6;
9847 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009848 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009849fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009850rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009851
9852 ;;
9853 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009855/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009856
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009857#include <sys/param.h>
9858#ifdef _ZETA_MINAMI_INET6
9859yes
9860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009861_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009862if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009863 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009864 ipv6type=$i;
9865 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009866 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009867fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009868rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009869
9870 ;;
9871 esac
9872 if test "$ipv6type" != "unknown"; then
9873 break
9874 fi
9875 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9877$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009878fi
9879
9880if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9881 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9882 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9883 echo "using lib$ipv6lib"
9884 else
9885 if test $ipv6trylibc = "yes"; then
9886 echo "using libc"
9887 else
9888 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9889 echo "You need to fetch lib$ipv6lib.a from appropriate"
9890 echo 'ipv6 kit and compile beforehand.'
9891 exit 1
9892 fi
9893 fi
9894fi
9895
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9897$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009899/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009900
9901 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009902int
9903main ()
9904{
9905FSIORefNum fRef = 0
9906 ;
9907 return 0;
9908}
Mark Dickinson0712b562010-05-08 19:13:21 +00009909
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009910_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009911if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009912
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009913
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009914$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009915
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9917$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009918
Mark Dickinson0712b562010-05-08 19:13:21 +00009919else
9920
9921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922$as_echo "no" >&6; }
9923
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009924fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9926
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009927# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9929$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009930
Martin v. Löwiseba40652007-08-30 20:10:57 +00009931# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009932if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933 withval=$with_doc_strings;
9934fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009935
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009936
9937if test -z "$with_doc_strings"
9938then with_doc_strings="yes"
9939fi
9940if test "$with_doc_strings" != "no"
9941then
9942
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009943$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009944
9945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9947$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009948
Neil Schemenauera35c6882001-02-27 04:45:05 +00009949# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9951$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009952
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009954if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009955 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009956if test "$withval" != no
9957then
9958
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009959$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009960
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9962$as_echo "yes" >&6; }
9963else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9964$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009965fi
9966else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9968$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009969fi
9970
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009971
9972# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9974$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009975
Martin v. Löwiseba40652007-08-30 20:10:57 +00009976# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009977if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009978 withval=$with_pymalloc;
9979fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009980
Neil Schemenauera35c6882001-02-27 04:45:05 +00009981
Neil Schemenauer16c22972002-03-22 15:34:49 +00009982if test -z "$with_pymalloc"
9983then with_pymalloc="yes"
9984fi
9985if test "$with_pymalloc" != "no"
9986then
Martin v. Löwis11437992002-04-12 09:54:03 +00009987
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009988$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009989
9990fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9992$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009993
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009994# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9996$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009997
9998# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009999if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010000 withval=$with_valgrind;
10001else
10002 with_valgrind=no
10003fi
10004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10006$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010007if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010008 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010009if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010010
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010011$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010012
10013else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010014 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010015
10016fi
10017
10018
10019fi
10020
Barry Warsawef82cd72000-06-30 16:21:01 +000010021# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10023$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010024
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010026if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010027 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010028if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010029then
10030
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010031$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010032
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10034$as_echo "yes" >&6; }
10035else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10036$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010037fi
10038else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10040$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010041fi
10042
Barry Warsawef82cd72000-06-30 16:21:01 +000010043
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010044# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010045
Guido van Rossum98935bf2001-09-05 19:13:16 +000010046DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010047
Guido van Rossume97ee181999-12-20 21:27:22 +000010048# the dlopen() function means we might want to use dynload_shlib.o. some
10049# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010050for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010051do :
10052 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010053if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010054 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010056_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010057
Guido van Rossume97ee181999-12-20 21:27:22 +000010058fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010059done
Guido van Rossume97ee181999-12-20 21:27:22 +000010060
Michael W. Hudson54241132001-12-07 15:38:26 +000010061
Guido van Rossume97ee181999-12-20 21:27:22 +000010062# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10063# loading of modules.
10064
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10066$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010067if test -z "$DYNLOADFILE"
10068then
10069 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010070 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10071 if test "$ac_cv_func_dlopen" = yes
10072 then DYNLOADFILE="dynload_shlib.o"
10073 else DYNLOADFILE="dynload_aix.o"
10074 fi
10075 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010076 BeOS*) DYNLOADFILE="dynload_beos.o";;
10077 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010078 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10079 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010080 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010081 *)
10082 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10083 # out any dynamic loading
10084 if test "$ac_cv_func_dlopen" = yes
10085 then DYNLOADFILE="dynload_shlib.o"
10086 else DYNLOADFILE="dynload_stub.o"
10087 fi
10088 ;;
10089 esac
10090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10092$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010093if test "$DYNLOADFILE" != "dynload_stub.o"
10094then
Martin v. Löwis11437992002-04-12 09:54:03 +000010095
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010096$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010097
10098fi
10099
Neil Schemenauer4e425612001-06-19 15:44:15 +000010100# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10101
Michael W. Hudson54241132001-12-07 15:38:26 +000010102
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10104$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010105if test -z "$MACHDEP_OBJS"
10106then
Jack Jansene578a632001-08-15 01:27:14 +000010107 MACHDEP_OBJS=$extra_machdep_objs
10108else
10109 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010110fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10112$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010113
Guido van Rossum627b2d71993-12-24 10:39:16 +000010114# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010115for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10116 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000010117 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010118 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000010119 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010120 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010121 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010122 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10123 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010124 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010125 setlocale setregid setreuid setresuid setresgid \
10126 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010127 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010128 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010129 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010130do :
10131 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10132ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010133if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010135#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010136_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010137
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010138fi
10139done
10140
Michael W. Hudson54241132001-12-07 15:38:26 +000010141
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010142# For some functions, having a definition is not sufficient, since
10143# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10145$as_echo_n "checking for chroot... " >&6; }
10146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010147/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010148#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010149int
10150main ()
10151{
10152void *x=chroot
10153 ;
10154 return 0;
10155}
10156_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010157if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010158
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010159$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010160
Matthias Klosec511b472010-05-08 11:01:39 +000010161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010162$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010163else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10165$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010166
10167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10170$as_echo_n "checking for link... " >&6; }
10171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010172/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010173#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010174int
10175main ()
10176{
10177void *x=link
10178 ;
10179 return 0;
10180}
10181_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010182if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010183
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010184$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010185
Matthias Klosec511b472010-05-08 11:01:39 +000010186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010187$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10190$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010191
10192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10195$as_echo_n "checking for symlink... " >&6; }
10196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010197/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010198#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010199int
10200main ()
10201{
10202void *x=symlink
10203 ;
10204 return 0;
10205}
10206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010207if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010209$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010210
Matthias Klosec511b472010-05-08 11:01:39 +000010211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010212$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10215$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010216
10217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10220$as_echo_n "checking for fchdir... " >&6; }
10221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010222/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010223#include <unistd.h>
10224int
10225main ()
10226{
10227void *x=fchdir
10228 ;
10229 return 0;
10230}
10231_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010232if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010234$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010235
Matthias Klosec511b472010-05-08 11:01:39 +000010236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010237$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010238else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10240$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010241
10242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10245$as_echo_n "checking for fsync... " >&6; }
10246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010247/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010248#include <unistd.h>
10249int
10250main ()
10251{
10252void *x=fsync
10253 ;
10254 return 0;
10255}
10256_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010257if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010258
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010259$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010260
Matthias Klosec511b472010-05-08 11:01:39 +000010261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010262$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10265$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010266
10267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10270$as_echo_n "checking for fdatasync... " >&6; }
10271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010272/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010273#include <unistd.h>
10274int
10275main ()
10276{
10277void *x=fdatasync
10278 ;
10279 return 0;
10280}
10281_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010282if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010283
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010284$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010285
Matthias Klosec511b472010-05-08 11:01:39 +000010286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010287$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010288else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10290$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010291
10292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10295$as_echo_n "checking for epoll... " >&6; }
10296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010297/* end confdefs.h. */
10298#include <sys/epoll.h>
10299int
10300main ()
10301{
10302void *x=epoll_create
10303 ;
10304 return 0;
10305}
10306_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010309$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010310
Matthias Klosec511b472010-05-08 11:01:39 +000010311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010312$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10315$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010316
10317fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10320$as_echo_n "checking for kqueue... " >&6; }
10321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010322/* end confdefs.h. */
10323
10324#include <sys/types.h>
10325#include <sys/event.h>
10326
10327int
10328main ()
10329{
10330int x=kqueue()
10331 ;
10332 return 0;
10333}
10334_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010335if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010337$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010338
Matthias Klosec511b472010-05-08 11:01:39 +000010339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010340$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10343$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010344
10345fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010347# On some systems (eg. FreeBSD 5), we would find a definition of the
10348# functions ctermid_r, setgroups in the library, but no prototype
10349# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10350# address to avoid compiler warnings and potential miscompilations
10351# because of the missing prototypes.
10352
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10354$as_echo_n "checking for ctermid_r... " >&6; }
10355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010356/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010357
Martin v. Löwisd5843682002-11-21 20:41:28 +000010358#include <stdio.h>
10359
Martin v. Löwisd5843682002-11-21 20:41:28 +000010360int
10361main ()
10362{
10363void* p = ctermid_r
10364 ;
10365 return 0;
10366}
10367_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010369
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010370$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010371
Matthias Klosec511b472010-05-08 11:01:39 +000010372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010373$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010374else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10376$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010377
10378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10380
Antoine Pitroub170f172010-09-10 18:47:36 +000010381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10382$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010383if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010384 $as_echo_n "(cached) " >&6
10385else
10386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010387/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010388#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010389int
10390main ()
10391{
10392void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010393
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010394 ;
10395 return 0;
10396}
10397_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010398if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010399 ac_cv_flock_decl=yes
10400else
10401 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010402
10403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010405
Antoine Pitroub170f172010-09-10 18:47:36 +000010406fi
10407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10408$as_echo "$ac_cv_flock_decl" >&6; }
10409if test "x${ac_cv_flock_decl}" = xyes; then
10410 for ac_func in flock
10411do :
10412 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010413if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010414 cat >>confdefs.h <<_ACEOF
10415#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010416_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010417
Antoine Pitrou85729812010-09-07 14:55:24 +000010418else
Antoine Pitroub170f172010-09-10 18:47:36 +000010419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010420$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010421if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010422 $as_echo_n "(cached) " >&6
10423else
10424 ac_check_lib_save_LIBS=$LIBS
10425LIBS="-lbsd $LIBS"
10426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10427/* end confdefs.h. */
10428
10429/* Override any GCC internal prototype to avoid an error.
10430 Use char because int might match the return type of a GCC
10431 builtin and then its argument prototype would still apply. */
10432#ifdef __cplusplus
10433extern "C"
10434#endif
10435char flock ();
10436int
10437main ()
10438{
10439return flock ();
10440 ;
10441 return 0;
10442}
10443_ACEOF
10444if ac_fn_c_try_link "$LINENO"; then :
10445 ac_cv_lib_bsd_flock=yes
10446else
10447 ac_cv_lib_bsd_flock=no
10448fi
10449rm -f core conftest.err conftest.$ac_objext \
10450 conftest$ac_exeext conftest.$ac_ext
10451LIBS=$ac_check_lib_save_LIBS
10452fi
10453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10454$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010455if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010456 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010457
10458
10459$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10460
10461
10462fi
10463
10464
10465fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010466done
10467
Antoine Pitrou85729812010-09-07 14:55:24 +000010468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010469
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10471$as_echo_n "checking for getpagesize... " >&6; }
10472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010473/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010474
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010475#include <unistd.h>
10476
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010477int
10478main ()
10479{
10480void* p = getpagesize
10481 ;
10482 return 0;
10483}
10484_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010486
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010487$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010488
Matthias Klosec511b472010-05-08 11:01:39 +000010489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010490$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010494
10495fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010497
Charles-François Natali93a11752011-11-27 13:01:35 +010010498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10499$as_echo_n "checking for broken unsetenv... " >&6; }
10500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10501/* end confdefs.h. */
10502
10503#include <stdlib.h>
10504
10505int
10506main ()
10507{
10508int res = unsetenv("DUMMY")
10509 ;
10510 return 0;
10511}
10512_ACEOF
10513if ac_fn_c_try_compile "$LINENO"; then :
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10515$as_echo "no" >&6; }
10516else
10517
10518$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10519
10520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10521$as_echo "yes" >&6; }
10522
10523fi
10524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10525
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010526for ac_prog in true
10527do
10528 # Extract the first word of "$ac_prog", so it can be a program name with args.
10529set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10531$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010532if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010533 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010534else
10535 if test -n "$TRUE"; then
10536 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10537else
10538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10539for as_dir in $PATH
10540do
10541 IFS=$as_save_IFS
10542 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010543 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010545 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010546 $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 +000010547 break 2
10548 fi
10549done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010550 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010551IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010552
10553fi
10554fi
10555TRUE=$ac_cv_prog_TRUE
10556if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10558$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010559else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10561$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010562fi
10563
Martin v. Löwiseba40652007-08-30 20:10:57 +000010564
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010565 test -n "$TRUE" && break
10566done
10567test -n "$TRUE" || TRUE="/bin/true"
10568
10569
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10571$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010572if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010573 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010574else
10575 ac_check_lib_save_LIBS=$LIBS
10576LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010578/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010579
Martin v. Löwiseba40652007-08-30 20:10:57 +000010580/* Override any GCC internal prototype to avoid an error.
10581 Use char because int might match the return type of a GCC
10582 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010583#ifdef __cplusplus
10584extern "C"
10585#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010586char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010587int
10588main ()
10589{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010590return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010591 ;
10592 return 0;
10593}
10594_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010595if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010596 ac_cv_lib_c_inet_aton=yes
10597else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010598 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010599fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010600rm -f core conftest.err conftest.$ac_objext \
10601 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010602LIBS=$ac_check_lib_save_LIBS
10603fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10605$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010606if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010608else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10610$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010611if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010612 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010613else
10614 ac_check_lib_save_LIBS=$LIBS
10615LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010617/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010618
Martin v. Löwiseba40652007-08-30 20:10:57 +000010619/* Override any GCC internal prototype to avoid an error.
10620 Use char because int might match the return type of a GCC
10621 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010622#ifdef __cplusplus
10623extern "C"
10624#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010625char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010626int
10627main ()
10628{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010629return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010630 ;
10631 return 0;
10632}
10633_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010634if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010635 ac_cv_lib_resolv_inet_aton=yes
10636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010637 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010638fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010639rm -f core conftest.err conftest.$ac_objext \
10640 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010641LIBS=$ac_check_lib_save_LIBS
10642fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10644$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010645if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010646 cat >>confdefs.h <<_ACEOF
10647#define HAVE_LIBRESOLV 1
10648_ACEOF
10649
10650 LIBS="-lresolv $LIBS"
10651
10652fi
10653
10654
10655fi
10656
10657
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010658# On Tru64, chflags seems to be present, but calling it will
10659# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10661$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010662if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010663 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010664else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010665 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010666 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010667else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010669/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010670
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010671#include <sys/stat.h>
10672#include <unistd.h>
10673int main(int argc, char*argv[])
10674{
10675 if(chflags(argv[0], 0) != 0)
10676 return 1;
10677 return 0;
10678}
Ned Deily43e10542011-06-27 23:41:53 -070010679
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010680_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010681if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010682 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010683else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010684 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010685fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010686rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10687 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010688fi
10689
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010690
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010691fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10693$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010694if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010695 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010696if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010697 ac_cv_have_chflags="yes"
10698else
10699 ac_cv_have_chflags="no"
10700fi
10701
10702fi
10703if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010704
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010705$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010706
10707fi
10708
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10710$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010711if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010712 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010714 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010715 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010716else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010718/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010719
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010720#include <sys/stat.h>
10721#include <unistd.h>
10722int main(int argc, char*argv[])
10723{
10724 if(lchflags(argv[0], 0) != 0)
10725 return 1;
10726 return 0;
10727}
Ned Deily43e10542011-06-27 23:41:53 -070010728
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010729_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010730if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010731 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010732else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010733 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010734fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10736 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010737fi
10738
10739
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010740fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10742$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010743if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010744 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010745if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010746 ac_cv_have_lchflags="yes"
10747else
10748 ac_cv_have_lchflags="no"
10749fi
10750
10751fi
10752if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010754$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010755
10756fi
10757
Ronald Oussorenf8752642006-07-06 10:13:35 +000010758case $ac_sys_system/$ac_sys_release in
10759Darwin/*)
10760 _CUR_CFLAGS="${CFLAGS}"
10761 _CUR_LDFLAGS="${LDFLAGS}"
10762 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10763 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10764 ;;
10765esac
10766
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10768$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010769if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010770 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010771else
10772 ac_check_lib_save_LIBS=$LIBS
10773LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010775/* end confdefs.h. */
10776
Martin v. Löwiseba40652007-08-30 20:10:57 +000010777/* Override any GCC internal prototype to avoid an error.
10778 Use char because int might match the return type of a GCC
10779 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010780#ifdef __cplusplus
10781extern "C"
10782#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010783char inflateCopy ();
10784int
10785main ()
10786{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010787return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010788 ;
10789 return 0;
10790}
10791_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010792if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010793 ac_cv_lib_z_inflateCopy=yes
10794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010795 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010796fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010797rm -f core conftest.err conftest.$ac_objext \
10798 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010799LIBS=$ac_check_lib_save_LIBS
10800fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10802$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010803if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010804
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010805$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010806
10807fi
10808
10809
Ronald Oussorenf8752642006-07-06 10:13:35 +000010810case $ac_sys_system/$ac_sys_release in
10811Darwin/*)
10812 CFLAGS="${_CUR_CFLAGS}"
10813 LDFLAGS="${_CUR_LDFLAGS}"
10814 ;;
10815esac
10816
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10818$as_echo_n "checking for hstrerror... " >&6; }
10819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010820/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010821
Martin v. Löwise9416172003-05-03 10:12:45 +000010822#include <netdb.h>
10823
Martin v. Löwise9416172003-05-03 10:12:45 +000010824int
10825main ()
10826{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010827void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010828 ;
10829 return 0;
10830}
10831_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010832if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010833
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010834$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010835
Matthias Klosec511b472010-05-08 11:01:39 +000010836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010837$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010838else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10840$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010841
10842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010843rm -f core conftest.err conftest.$ac_objext \
10844 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010845
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10847$as_echo_n "checking for inet_aton... " >&6; }
10848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010849/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010850
Martin v. Löwis86d66262006-02-17 08:40:11 +000010851#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010852#include <sys/socket.h>
10853#include <netinet/in.h>
10854#include <arpa/inet.h>
10855
Martin v. Löwise9416172003-05-03 10:12:45 +000010856int
10857main ()
10858{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010859void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010860 ;
10861 return 0;
10862}
10863_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010864if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010865
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010866$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010867
Matthias Klosec511b472010-05-08 11:01:39 +000010868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010869$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10872$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010873
10874fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010875rm -f core conftest.err conftest.$ac_objext \
10876 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10879$as_echo_n "checking for inet_pton... " >&6; }
10880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010881/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010882
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010883#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010884#include <sys/socket.h>
10885#include <netinet/in.h>
10886#include <arpa/inet.h>
10887
Martin v. Löwise9416172003-05-03 10:12:45 +000010888int
10889main ()
10890{
10891void* p = inet_pton
10892 ;
10893 return 0;
10894}
10895_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010896if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010897
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010898$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010899
Matthias Klosec511b472010-05-08 11:01:39 +000010900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010901$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010902else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10904$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010905
10906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010908
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010909# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10911$as_echo_n "checking for setgroups... " >&6; }
10912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010913/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010914
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010915#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010916#ifdef HAVE_GRP_H
10917#include <grp.h>
10918#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010919
Martin v. Löwisd5843682002-11-21 20:41:28 +000010920int
10921main ()
10922{
10923void* p = setgroups
10924 ;
10925 return 0;
10926}
10927_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010928if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010929
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010930$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010931
Matthias Klosec511b472010-05-08 11:01:39 +000010932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010933$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10936$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010937
10938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010940
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010941# check for openpty and forkpty
10942
10943for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010944do :
10945 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010946if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010947 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010949_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010950
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010951else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10953$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010954if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010955 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010956else
Martin v. Löwis11437992002-04-12 09:54:03 +000010957 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010958LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010961
Martin v. Löwiseba40652007-08-30 20:10:57 +000010962/* Override any GCC internal prototype to avoid an error.
10963 Use char because int might match the return type of a GCC
10964 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010965#ifdef __cplusplus
10966extern "C"
10967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010968char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010969int
10970main ()
10971{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010972return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 ;
10974 return 0;
10975}
10976_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010977if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010980 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010981fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010982rm -f core conftest.err conftest.$ac_objext \
10983 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010984LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010985fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10987$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010988if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010989 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010990 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10993$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010994if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010995 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010996else
10997 ac_check_lib_save_LIBS=$LIBS
10998LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011000/* end confdefs.h. */
11001
Martin v. Löwiseba40652007-08-30 20:10:57 +000011002/* Override any GCC internal prototype to avoid an error.
11003 Use char because int might match the return type of a GCC
11004 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011005#ifdef __cplusplus
11006extern "C"
11007#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011008char openpty ();
11009int
11010main ()
11011{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011012return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011013 ;
11014 return 0;
11015}
11016_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011017if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011018 ac_cv_lib_bsd_openpty=yes
11019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011020 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011021fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011022rm -f core conftest.err conftest.$ac_objext \
11023 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011024LIBS=$ac_check_lib_save_LIBS
11025fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11027$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011028if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011029 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011030 LIBS="$LIBS -lbsd"
11031fi
11032
11033
11034fi
11035
Fred Drake8cef4cf2000-06-28 16:40:38 +000011036
11037fi
11038done
11039
11040for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011041do :
11042 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011043if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011044 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011045#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011046_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011047
Fred Drake8cef4cf2000-06-28 16:40:38 +000011048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11050$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011051if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011052 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011053else
Martin v. Löwis11437992002-04-12 09:54:03 +000011054 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011055LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011058
Martin v. Löwiseba40652007-08-30 20:10:57 +000011059/* Override any GCC internal prototype to avoid an error.
11060 Use char because int might match the return type of a GCC
11061 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011062#ifdef __cplusplus
11063extern "C"
11064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011065char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011066int
11067main ()
11068{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011069return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011070 ;
11071 return 0;
11072}
11073_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011074if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011076else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011078fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011079rm -f core conftest.err conftest.$ac_objext \
11080 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011081LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011082fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11084$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011085if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011086 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011087 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011088else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11090$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011091if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011092 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011093else
11094 ac_check_lib_save_LIBS=$LIBS
11095LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011097/* end confdefs.h. */
11098
Martin v. Löwiseba40652007-08-30 20:10:57 +000011099/* Override any GCC internal prototype to avoid an error.
11100 Use char because int might match the return type of a GCC
11101 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011102#ifdef __cplusplus
11103extern "C"
11104#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011105char forkpty ();
11106int
11107main ()
11108{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011109return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011110 ;
11111 return 0;
11112}
11113_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011114if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011115 ac_cv_lib_bsd_forkpty=yes
11116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011117 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011118fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011119rm -f core conftest.err conftest.$ac_objext \
11120 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011121LIBS=$ac_check_lib_save_LIBS
11122fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11124$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011125if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011126 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011127 LIBS="$LIBS -lbsd"
11128fi
11129
11130
11131fi
11132
Fred Drake8cef4cf2000-06-28 16:40:38 +000011133
11134fi
11135done
11136
Jack Jansendd19cf82001-12-06 22:36:17 +000011137
Brett Cannonaa5778d2008-03-18 04:09:00 +000011138# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011139for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011140do :
11141 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011142if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011143 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011144#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011145_ACEOF
11146
11147fi
11148done
11149
11150
Michael W. Hudson54241132001-12-07 15:38:26 +000011151# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011152for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011153do :
11154 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11155ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011156if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011158#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011159_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011160
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011162done
11163
Michael W. Hudson54241132001-12-07 15:38:26 +000011164
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011165ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011166if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011167 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011168
Martin v. Löwis1142de32002-03-29 16:28:31 +000011169else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011170 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011171 *" dup2.$ac_objext "* ) ;;
11172 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011173 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011174esac
11175
Martin v. Löwis1142de32002-03-29 16:28:31 +000011176fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011177
11178ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011179if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011180 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11181
11182else
11183 case " $LIBOBJS " in
11184 *" getcwd.$ac_objext "* ) ;;
11185 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11186 ;;
11187esac
11188
11189fi
11190
11191ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011192if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011193 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11194
11195else
11196 case " $LIBOBJS " in
11197 *" strdup.$ac_objext "* ) ;;
11198 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11199 ;;
11200esac
11201
11202fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011203
11204
11205for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206do :
11207 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011208if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011209 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011210#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011211_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011213/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011214#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011215int
11216main ()
11217{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011218getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011219 ;
11220 return 0;
11221}
11222_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011223if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011224
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011225$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011226
Guido van Rossum627b2d71993-12-24 10:39:16 +000011227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011229
Guido van Rossum627b2d71993-12-24 10:39:16 +000011230fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011231done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011232
Jack Jansen150753c2003-03-29 22:07:47 +000011233for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011234do :
11235 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011236if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011237 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011238#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011239_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011241/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011242#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011243int
11244main ()
11245{
11246setpgrp(0,0);
11247 ;
11248 return 0;
11249}
11250_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011251if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011252
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011253$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011254
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011257
11258fi
11259done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011260
Thomas Wouters3a584202000-08-05 23:28:51 +000011261for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011262do :
11263 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011264if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011266#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011267_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011269/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011270#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011271int
11272main ()
11273{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011274gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011275 ;
11276 return 0;
11277}
11278_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011279if ac_fn_c_try_compile "$LINENO"; then :
11280
Guido van Rossum627b2d71993-12-24 10:39:16 +000011281else
Skip Montanaro6dead952003-09-25 14:50:04 +000011282
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011283$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011284
Martin v. Löwis11437992002-04-12 09:54:03 +000011285
Guido van Rossum627b2d71993-12-24 10:39:16 +000011286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011288
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011289fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011290done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011291
Michael W. Hudson54241132001-12-07 15:38:26 +000011292
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11294$as_echo_n "checking for major... " >&6; }
11295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011296/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011297
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011298#if defined(MAJOR_IN_MKDEV)
11299#include <sys/mkdev.h>
11300#elif defined(MAJOR_IN_SYSMACROS)
11301#include <sys/sysmacros.h>
11302#else
11303#include <sys/types.h>
11304#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011305
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011306int
11307main ()
11308{
11309
11310 makedev(major(0),minor(0));
11311
11312 ;
11313 return 0;
11314}
11315_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011316if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011317
11318
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011319$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011320
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11322$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011323
11324else
Skip Montanaro6dead952003-09-25 14:50:04 +000011325
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11327$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011328
11329fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011330rm -f core conftest.err conftest.$ac_objext \
11331 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011332
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011333# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011334# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11336$as_echo_n "checking for getaddrinfo... " >&6; }
11337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011338/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011339
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011340#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011341#include <sys/socket.h>
11342#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011343#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011344
Martin v. Löwis11437992002-04-12 09:54:03 +000011345int
11346main ()
11347{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011348getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011349 ;
11350 return 0;
11351}
11352_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011353if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011354 have_getaddrinfo=yes
11355else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011356 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011357fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011358rm -f core conftest.err conftest.$ac_objext \
11359 conftest$ac_exeext conftest.$ac_ext
11360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11361$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011362if test $have_getaddrinfo = yes
11363then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11365$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011366 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011367 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011368else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011369 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011370
11371if test "${enable_ipv6+set}" = set; then
11372 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11373else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011374 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011375fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011376else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011378/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011379
Stefan Krah0afe4e42012-11-22 23:56:51 +010011380#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011381#include <sys/types.h>
11382#include <netdb.h>
11383#include <string.h>
11384#include <sys/socket.h>
11385#include <netinet/in.h>
11386
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011387int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011388{
11389 int passive, gaierr, inet4 = 0, inet6 = 0;
11390 struct addrinfo hints, *ai, *aitop;
11391 char straddr[INET6_ADDRSTRLEN], strport[16];
11392
11393 for (passive = 0; passive <= 1; passive++) {
11394 memset(&hints, 0, sizeof(hints));
11395 hints.ai_family = AF_UNSPEC;
11396 hints.ai_flags = passive ? AI_PASSIVE : 0;
11397 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011398 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011399 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11400 (void)gai_strerror(gaierr);
11401 goto bad;
11402 }
11403 for (ai = aitop; ai; ai = ai->ai_next) {
11404 if (ai->ai_addr == NULL ||
11405 ai->ai_addrlen == 0 ||
11406 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11407 straddr, sizeof(straddr), strport, sizeof(strport),
11408 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11409 goto bad;
11410 }
11411 switch (ai->ai_family) {
11412 case AF_INET:
11413 if (strcmp(strport, "54321") != 0) {
11414 goto bad;
11415 }
11416 if (passive) {
11417 if (strcmp(straddr, "0.0.0.0") != 0) {
11418 goto bad;
11419 }
11420 } else {
11421 if (strcmp(straddr, "127.0.0.1") != 0) {
11422 goto bad;
11423 }
11424 }
11425 inet4++;
11426 break;
11427 case AF_INET6:
11428 if (strcmp(strport, "54321") != 0) {
11429 goto bad;
11430 }
11431 if (passive) {
11432 if (strcmp(straddr, "::") != 0) {
11433 goto bad;
11434 }
11435 } else {
11436 if (strcmp(straddr, "::1") != 0) {
11437 goto bad;
11438 }
11439 }
11440 inet6++;
11441 break;
11442 case AF_UNSPEC:
11443 goto bad;
11444 break;
11445 default:
11446 /* another family support? */
11447 break;
11448 }
11449 }
11450 }
11451
11452 if (!(inet4 == 0 || inet4 == 2))
11453 goto bad;
11454 if (!(inet6 == 0 || inet6 == 2))
11455 goto bad;
11456
11457 if (aitop)
11458 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011459 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011460
11461 bad:
11462 if (aitop)
11463 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011464 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011465}
11466
Martin v. Löwis11437992002-04-12 09:54:03 +000011467_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011468if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011469 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011471 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011472fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011473rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11474 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011476
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011477fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011478
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011480
Benjamin Peterson75fed812010-11-01 01:47:19 +000011481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11482$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11483
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011484if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011485then
11486 if test $ipv6 = yes
11487 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011488 echo 'Fatal: You must get working getaddrinfo() function.'
11489 echo ' or you can specify "--disable-ipv6"'.
11490 exit 1
11491 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011492else
Martin v. Löwis11437992002-04-12 09:54:03 +000011493
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011494$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011495
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011496fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011497
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011498for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011499do :
11500 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011501if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011503#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011504_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011505
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011506fi
11507done
11508
Michael W. Hudson54241132001-12-07 15:38:26 +000011509
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011510# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11512$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011513if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011514 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011517/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011518#include <sys/types.h>
11519#include <sys/time.h>
11520#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011521
Martin v. Löwis11437992002-04-12 09:54:03 +000011522int
11523main ()
11524{
11525if ((struct tm *) 0)
11526return 0;
11527 ;
11528 return 0;
11529}
11530_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011531if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011532 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011533else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011534 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011537fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11539$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011540if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011541
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011542$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011543
11544fi
11545
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11547$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011548if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011549 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011550else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011552/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011553#include <sys/types.h>
11554#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011555
Martin v. Löwis11437992002-04-12 09:54:03 +000011556int
11557main ()
11558{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011559struct tm tm;
11560 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011561 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 ;
11563 return 0;
11564}
11565_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011566if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011567 ac_cv_struct_tm=time.h
11568else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011569 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011572fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11574$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011575if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011576
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011577$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011578
11579fi
11580
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011581ac_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 +000011582#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011583
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011584"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011585if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011586
11587cat >>confdefs.h <<_ACEOF
11588#define HAVE_STRUCT_TM_TM_ZONE 1
11589_ACEOF
11590
11591
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011592fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011593
Martin v. Löwis11437992002-04-12 09:54:03 +000011594if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011597
11598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011599 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11600"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011601if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011602 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011603else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011604 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011605fi
11606
Martin v. Löwiseba40652007-08-30 20:10:57 +000011607cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011608#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011609_ACEOF
11610
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11612$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011613if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011614 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011617/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011618#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011619#if !HAVE_DECL_TZNAME
11620extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011622
Martin v. Löwis11437992002-04-12 09:54:03 +000011623int
11624main ()
11625{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011626return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011627 ;
11628 return 0;
11629}
11630_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011631if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011632 ac_cv_var_tzname=yes
11633else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011634 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011635fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011636rm -f core conftest.err conftest.$ac_objext \
11637 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011638fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11640$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011641 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011642
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011643$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011644
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011645 fi
11646fi
11647
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011648ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011649if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011650
11651cat >>confdefs.h <<_ACEOF
11652#define HAVE_STRUCT_STAT_ST_RDEV 1
11653_ACEOF
11654
11655
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011656fi
11657
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011658ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011659if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011660
Martin v. Löwis11437992002-04-12 09:54:03 +000011661cat >>confdefs.h <<_ACEOF
11662#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11663_ACEOF
11664
11665
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011666fi
11667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011668ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011669if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011670
11671cat >>confdefs.h <<_ACEOF
11672#define HAVE_STRUCT_STAT_ST_FLAGS 1
11673_ACEOF
11674
11675
11676fi
11677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011678ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011679if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011680
11681cat >>confdefs.h <<_ACEOF
11682#define HAVE_STRUCT_STAT_ST_GEN 1
11683_ACEOF
11684
11685
11686fi
11687
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011688ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011689if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011690
11691cat >>confdefs.h <<_ACEOF
11692#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11693_ACEOF
11694
11695
11696fi
11697
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011698ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011699if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011700
Martin v. Löwis11437992002-04-12 09:54:03 +000011701cat >>confdefs.h <<_ACEOF
11702#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11703_ACEOF
11704
11705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011706$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011707
11708else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011709 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011710 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011711 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11712 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011713esac
11714
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011715fi
11716
Michael W. Hudson54241132001-12-07 15:38:26 +000011717
Martin v. Löwis11437992002-04-12 09:54:03 +000011718
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11720$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011721if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011722 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011723else
Matthias Klosec511b472010-05-08 11:01:39 +000011724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011726/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011727#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011728int
11729main ()
11730{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011731return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011732 ;
11733 return 0;
11734}
11735_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011736if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011737 ac_cv_header_time_altzone=yes
11738else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011739 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011742
Martin v. Löwiseba40652007-08-30 20:10:57 +000011743fi
11744
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11746$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011747if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011748
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011749$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011750
11751fi
11752
Guido van Rossumda88dad1995-01-26 00:46:29 +000011753was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11755$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011757/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011758
11759#include <sys/types.h>
11760#include <sys/select.h>
11761#include <sys/time.h>
11762
Martin v. Löwis11437992002-04-12 09:54:03 +000011763int
11764main ()
11765{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011766;
Martin v. Löwis11437992002-04-12 09:54:03 +000011767 ;
11768 return 0;
11769}
11770_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011771if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011772
11773
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011774$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011775
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011776 was_it_defined=yes
11777
Martin v. Löwiseba40652007-08-30 20:10:57 +000011778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11781$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011782
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11784$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011785if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011786 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011789/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011790#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011791int
11792main ()
11793{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011794struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011795 ;
11796 return 0;
11797}
11798_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011799if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011800 ac_cv_struct_addrinfo=yes
11801else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011802 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11805fi
11806
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11808$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011809if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011810
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011811$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011812
11813fi
11814
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11816$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011817if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011818 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011821/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011822
11823# include <sys/types.h>
11824# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011825int
11826main ()
11827{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011828struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011829 ;
11830 return 0;
11831}
11832_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011833if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011834 ac_cv_struct_sockaddr_storage=yes
11835else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011836 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11839fi
11840
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11842$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011843if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011844
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011845$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011846
11847fi
11848
Guido van Rossum627b2d71993-12-24 10:39:16 +000011849# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011850
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11852$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011853if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011854 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011858$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011859int
11860main ()
11861{
11862static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011863test_array [0] = 0;
11864return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011865
11866 ;
11867 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011868}
Martin v. Löwis11437992002-04-12 09:54:03 +000011869_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011870if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011871 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011872else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011873 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011876fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11878$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011879if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011880 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011881
11882fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011883
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11885$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011886if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011887 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011888else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011890/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011891
Martin v. Löwis11437992002-04-12 09:54:03 +000011892int
11893main ()
11894{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011895
Martin v. Löwis11437992002-04-12 09:54:03 +000011896#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011897 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011898 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011899 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011900 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011901 char const *const *pcpcc;
11902 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011903 /* NEC SVR4.0.2 mips cc rejects this. */
11904 struct point {int x, y;};
11905 static struct point const zero = {0,0};
11906 /* AIX XL C 1.02.0.0 rejects this.
11907 It does not let you subtract one const X* pointer from another in
11908 an arm of an if-expression whose if-part is not a constant
11909 expression */
11910 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011911 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011912 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011913 ++pcpcc;
11914 ppc = (char**) pcpcc;
11915 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011916 { /* SCO 3.2v4 cc rejects this sort of thing. */
11917 char tx;
11918 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011919 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011920
Martin v. Löwis11437992002-04-12 09:54:03 +000011921 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011922 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011923 }
11924 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11925 int x[] = {25, 17};
11926 const int *foo = &x[0];
11927 ++foo;
11928 }
11929 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11930 typedef const int *iptr;
11931 iptr p = 0;
11932 ++p;
11933 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011934 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011936 struct s { int j; const int *ap[3]; } bx;
11937 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011938 }
11939 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11940 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011941 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011942 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011943 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011944#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011945
Martin v. Löwis11437992002-04-12 09:54:03 +000011946 ;
11947 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011948}
Martin v. Löwis11437992002-04-12 09:54:03 +000011949_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011950if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011951 ac_cv_c_const=yes
11952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011953 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011956fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11958$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011959if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011961$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011962
11963fi
11964
Michael W. Hudson54241132001-12-07 15:38:26 +000011965
Guido van Rossumda88dad1995-01-26 00:46:29 +000011966works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11968$as_echo_n "checking for working volatile... " >&6; }
11969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011970/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011971
Martin v. Löwis11437992002-04-12 09:54:03 +000011972int
11973main ()
11974{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011975volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011976 ;
11977 return 0;
11978}
11979_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011980if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011981 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011982else
Skip Montanaro6dead952003-09-25 14:50:04 +000011983
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011984$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011985
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011986
Guido van Rossum627b2d71993-12-24 10:39:16 +000011987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11990$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011991
Guido van Rossumda88dad1995-01-26 00:46:29 +000011992works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11994$as_echo_n "checking for working signed char... " >&6; }
11995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011996/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011997
Martin v. Löwis11437992002-04-12 09:54:03 +000011998int
11999main ()
12000{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012001signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012002 ;
12003 return 0;
12004}
12005_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012006if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012007 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012008else
Skip Montanaro6dead952003-09-25 14:50:04 +000012009
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012010$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012011
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012012
Guido van Rossum7f43da71994-08-01 12:15:30 +000012013fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12016$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012017
Guido van Rossumda88dad1995-01-26 00:46:29 +000012018have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12020$as_echo_n "checking for prototypes... " >&6; }
12021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012022/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012023int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012024int
12025main ()
12026{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012027return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012028 ;
12029 return 0;
12030}
12031_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012032if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012034$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012035
Matthias Klosec511b472010-05-08 11:01:39 +000012036 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12040$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012041
Guido van Rossumda88dad1995-01-26 00:46:29 +000012042works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12044$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012046/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012047
12048#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012049int foo(int x, ...) {
12050 va_list va;
12051 va_start(va, x);
12052 va_arg(va, int);
12053 va_arg(va, char *);
12054 va_arg(va, double);
12055 return 0;
12056}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012057
Martin v. Löwis11437992002-04-12 09:54:03 +000012058int
12059main ()
12060{
Guido van Rossum90eea071996-08-30 20:58:57 +000012061return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012062 ;
12063 return 0;
12064}
12065_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012066if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012067
12068
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012069$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012070
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012071 works=yes
12072
Guido van Rossum627b2d71993-12-24 10:39:16 +000012073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12076$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012077
Martin v. Löwisd6320502004-08-12 13:45:08 +000012078# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12080$as_echo_n "checking for socketpair... " >&6; }
12081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012082/* end confdefs.h. */
12083
12084#include <sys/types.h>
12085#include <sys/socket.h>
12086
12087int
12088main ()
12089{
12090void *x=socketpair
12091 ;
12092 return 0;
12093}
12094_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012095if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012096
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012097$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012098
Matthias Klosec511b472010-05-08 11:01:39 +000012099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012100$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012101else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12103$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012104
12105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012107
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012108# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12110$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012112/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012113#include <sys/types.h>
12114#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012115int
12116main ()
12117{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012118struct sockaddr x;
12119x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 ;
12121 return 0;
12122}
12123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012124if ac_fn_c_try_compile "$LINENO"; then :
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12126$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012127
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012128$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012129
12130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12132$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012133
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012136
Guido van Rossumda88dad1995-01-26 00:46:29 +000012137va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12139$as_echo_n "checking whether va_list is an array... " >&6; }
12140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012141/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012142
12143#ifdef HAVE_STDARG_PROTOTYPES
12144#include <stdarg.h>
12145#else
12146#include <varargs.h>
12147#endif
12148
Martin v. Löwis11437992002-04-12 09:54:03 +000012149int
12150main ()
12151{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012152va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 ;
12154 return 0;
12155}
12156_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157if ac_fn_c_try_compile "$LINENO"; then :
12158
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012159else
Skip Montanaro6dead952003-09-25 14:50:04 +000012160
Martin v. Löwis11437992002-04-12 09:54:03 +000012161
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012162$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012163
Guido van Rossumda88dad1995-01-26 00:46:29 +000012164 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012165
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12169$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012170
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012171# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012172
12173
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012174ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012175if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012177 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012178
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12180$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012181 OLD_CFLAGS=$CFLAGS
12182 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012184/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012185
12186# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012187
Martin v. Löwis11437992002-04-12 09:54:03 +000012188int
12189main ()
12190{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012191
12192 char *name;
12193 struct hostent *he, *res;
12194 char buffer[2048];
12195 int buflen = 2048;
12196 int h_errnop;
12197
12198 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012199
12200 ;
12201 return 0;
12202}
12203_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012204if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012205
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012206 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012207
Martin v. Löwis11437992002-04-12 09:54:03 +000012208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012209$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12212$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012213
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012214else
Skip Montanaro6dead952003-09-25 14:50:04 +000012215
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12217$as_echo "no" >&6; }
12218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12219$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012221/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012222
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012223# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012224
Martin v. Löwis11437992002-04-12 09:54:03 +000012225int
12226main ()
12227{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012228
12229 char *name;
12230 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012231 char buffer[2048];
12232 int buflen = 2048;
12233 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012234
Matthias Klosec511b472010-05-08 11:01:39 +000012235 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012236
12237 ;
12238 return 0;
12239}
12240_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012241if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012242
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012243 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012244
Martin v. Löwis11437992002-04-12 09:54:03 +000012245
Matthias Klosec511b472010-05-08 11:01:39 +000012246$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12249$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012250
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012251else
Skip Montanaro6dead952003-09-25 14:50:04 +000012252
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12254$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12256$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12258/* end confdefs.h. */
12259
12260# include <netdb.h>
12261
12262int
12263main ()
12264{
12265
12266 char *name;
12267 struct hostent *he;
12268 struct hostent_data data;
12269
12270 (void) gethostbyname_r(name, he, &data);
12271
12272 ;
12273 return 0;
12274}
12275_ACEOF
12276if ac_fn_c_try_compile "$LINENO"; then :
12277
12278 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12279
12280
12281$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12282
12283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12284$as_echo "yes" >&6; }
12285
12286else
12287
12288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12289$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012290
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012293
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012296
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012299 CFLAGS=$OLD_CFLAGS
12300
12301else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012302
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012303 for ac_func in gethostbyname
12304do :
12305 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012306if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012307 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012308#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012309_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012310
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012311fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012312done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012313
Michael W. Hudson54241132001-12-07 15:38:26 +000012314
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012315fi
12316
Michael W. Hudson54241132001-12-07 15:38:26 +000012317
12318
12319
12320
12321
12322
Guido van Rossum627b2d71993-12-24 10:39:16 +000012323# checks for system services
12324# (none yet)
12325
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012326# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012327ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012328if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012329
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012330else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12332$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012333if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012334 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012335else
Martin v. Löwis11437992002-04-12 09:54:03 +000012336 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012337LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012340
Martin v. Löwiseba40652007-08-30 20:10:57 +000012341/* Override any GCC internal prototype to avoid an error.
12342 Use char because int might match the return type of a GCC
12343 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012344#ifdef __cplusplus
12345extern "C"
12346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012347char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012348int
12349main ()
12350{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012351return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012352 ;
12353 return 0;
12354}
12355_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012356if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012357 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012358else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012359 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012360fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012361rm -f core conftest.err conftest.$ac_objext \
12362 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012363LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012364fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12366$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012367if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 cat >>confdefs.h <<_ACEOF
12369#define HAVE_LIBIEEE 1
12370_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012371
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012372 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012373
Guido van Rossum627b2d71993-12-24 10:39:16 +000012374fi
12375
Michael W. Hudson54241132001-12-07 15:38:26 +000012376
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012377fi
12378
Michael W. Hudson54241132001-12-07 15:38:26 +000012379
Guido van Rossum7f253911997-05-09 02:42:48 +000012380# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12382$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012383
Martin v. Löwiseba40652007-08-30 20:10:57 +000012384# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012385if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012386 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012387if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012388then
12389
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012390$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012391
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12393$as_echo "yes" >&6; }
12394else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12395$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012396fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12399$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012400fi
12401
Guido van Rossum7f253911997-05-09 02:42:48 +000012402
Guido van Rossum7f43da71994-08-01 12:15:30 +000012403# check for --with-libm=...
12404
Guido van Rossum563e7081996-09-10 18:20:48 +000012405case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012406Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012407BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012408*) LIBM=-lm
12409esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12411$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012412
Martin v. Löwiseba40652007-08-30 20:10:57 +000012413# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012414if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012415 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012416if test "$withval" = no
12417then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12419$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012420elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012421then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12423$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012424else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012425fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012426else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12428$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012429fi
12430
Guido van Rossum7f43da71994-08-01 12:15:30 +000012431
12432# check for --with-libc=...
12433
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12435$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012436
Martin v. Löwiseba40652007-08-30 20:10:57 +000012437# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012438if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012439 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012440if test "$withval" = no
12441then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12443$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012444elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012445then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12447$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012448else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012449fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012450else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12452$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012453fi
12454
Guido van Rossum7f43da71994-08-01 12:15:30 +000012455
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012456# **************************************************
12457# * Check for various properties of floating point *
12458# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012459
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12461$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012462if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012463 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012464else
12465
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012466if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012467 ac_cv_little_endian_double=no
12468else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012470/* end confdefs.h. */
12471
12472#include <string.h>
12473int main() {
12474 double x = 9006104071832581.0;
12475 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12476 return 0;
12477 else
12478 return 1;
12479}
12480
12481_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012482if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012483 ac_cv_little_endian_double=yes
12484else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012485 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012486fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012487rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12488 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012489fi
12490
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012491fi
12492
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12494$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012495if test "$ac_cv_little_endian_double" = yes
12496then
12497
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012498$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012499
12500fi
12501
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12503$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012504if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012505 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012506else
12507
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012508if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012509 ac_cv_big_endian_double=no
12510else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012512/* end confdefs.h. */
12513
12514#include <string.h>
12515int main() {
12516 double x = 9006104071832581.0;
12517 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12518 return 0;
12519 else
12520 return 1;
12521}
12522
12523_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012524if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012525 ac_cv_big_endian_double=yes
12526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012527 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012528fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12530 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012531fi
12532
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012533fi
12534
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12536$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012537if test "$ac_cv_big_endian_double" = yes
12538then
12539
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012540$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012541
12542fi
12543
12544# Some ARM platforms use a mixed-endian representation for doubles.
12545# While Python doesn't currently have full support for these platforms
12546# (see e.g., issue 1762561), we can at least make sure that float <-> string
12547# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12549$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012550if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012551 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012552else
12553
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012554if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012555 ac_cv_mixed_endian_double=no
12556else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012558/* end confdefs.h. */
12559
12560#include <string.h>
12561int main() {
12562 double x = 9006104071832581.0;
12563 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12564 return 0;
12565 else
12566 return 1;
12567}
12568
12569_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012570if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012571 ac_cv_mixed_endian_double=yes
12572else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012573 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012574fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12576 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012577fi
12578
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012579fi
12580
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12582$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012583if test "$ac_cv_mixed_endian_double" = yes
12584then
12585
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012586$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012587
12588fi
12589
12590# The short float repr introduced in Python 3.1 requires the
12591# correctly-rounded string <-> double conversion functions from
12592# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12593# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012594# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012595# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012596
12597# This inline assembler syntax may also work for suncc and icc,
12598# so we try it on all platforms.
12599
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12601$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012603/* end confdefs.h. */
12604
12605int
12606main ()
12607{
12608
Mark Dickinsona548dee2009-11-15 13:12:43 +000012609 unsigned short cw;
12610 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12611 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012612
12613 ;
12614 return 0;
12615}
12616_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012617if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012618 have_gcc_asm_for_x87=yes
12619else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012620 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012621fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12624$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012625if test "$have_gcc_asm_for_x87" = yes
12626then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012627
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012628$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012629
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012630fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012631
Mark Dickinson04b27232009-01-04 12:29:36 +000012632# Detect whether system arithmetic is subject to x87-style double
12633# rounding issues. The result of this test has little meaning on non
12634# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12635# mode is round-to-nearest and double rounding issues are present, and
12636# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12638$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012639# $BASECFLAGS may affect the result
12640ac_save_cc="$CC"
12641CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012642if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012643 ac_cv_x87_double_rounding=no
12644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012646/* end confdefs.h. */
12647
12648#include <stdlib.h>
12649#include <math.h>
12650int main() {
12651 volatile double x, y, z;
12652 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12653 x = 0.99999999999999989; /* 1-2**-53 */
12654 y = 1./x;
12655 if (y != 1.)
12656 exit(0);
12657 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12658 x = 1e16;
12659 y = 2.99999;
12660 z = x + y;
12661 if (z != 1e16+4.)
12662 exit(0);
12663 /* both tests show evidence of double rounding */
12664 exit(1);
12665}
12666
12667_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012668if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012669 ac_cv_x87_double_rounding=no
12670else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012671 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012672fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12674 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012675fi
12676
Mark Dickinson99abd142009-10-24 13:44:16 +000012677CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12679$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012680if test "$ac_cv_x87_double_rounding" = yes
12681then
12682
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012683$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012684
12685fi
12686
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012687# ************************************
12688# * Check for mathematical functions *
12689# ************************************
12690
12691LIBS_SAVE=$LIBS
12692LIBS="$LIBS $LIBM"
12693
Mark Dickinson265d7382008-04-21 22:32:24 +000012694# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12695# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12697$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012698if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012699 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012700else
12701
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012702if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012703 ac_cv_tanh_preserves_zero_sign=no
12704else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012706/* end confdefs.h. */
12707
12708#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012709#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012710int main() {
12711 /* return 0 if either negative zeros don't exist
12712 on this platform or if negative zeros exist
12713 and tanh(-0.) == -0. */
12714 if (atan2(0., -1.) == atan2(-0., -1.) ||
12715 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12716 else exit(1);
12717}
12718
12719_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012720if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012721 ac_cv_tanh_preserves_zero_sign=yes
12722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012723 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012724fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12726 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012727fi
12728
Mark Dickinson265d7382008-04-21 22:32:24 +000012729fi
12730
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12732$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012733if test "$ac_cv_tanh_preserves_zero_sign" = yes
12734then
12735
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012736$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012737
12738fi
12739
Mark Dickinson65898e02009-09-05 10:27:00 +000012740for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012741do :
12742 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12743ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012744if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012745 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012746#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012747_ACEOF
12748
12749fi
12750done
12751
Mark Dickinson65898e02009-09-05 10:27:00 +000012752for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012753do :
12754 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12755ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012756if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012757 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012758#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012759_ACEOF
12760
12761fi
12762done
12763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012764ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12765"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012766if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012767 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012769 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012770fi
12771
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012772cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012773#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012774_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012775ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12776"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012777if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012778 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012779else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012780 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012781fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012782
12783cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012784#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012785_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012786ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12787"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012788if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012789 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012790else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012791 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012792fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012793
12794cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012795#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012796_ACEOF
12797
12798
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012799LIBS=$LIBS_SAVE
12800
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012801# For multiprocessing module, check that sem_open
12802# actually works. For FreeBSD versions <= 7.2,
12803# the kernel module that provides POSIX semaphores
12804# isn't loaded by default, so an attempt to call
12805# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12807$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012808if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012809 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012811 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012812 ac_cv_posix_semaphores_enabled=yes
12813else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012815/* end confdefs.h. */
12816
12817#include <unistd.h>
12818#include <fcntl.h>
12819#include <stdio.h>
12820#include <semaphore.h>
12821#include <sys/stat.h>
12822
12823int main(void) {
12824 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12825 if (a == SEM_FAILED) {
12826 perror("sem_open");
12827 return 1;
12828 }
12829 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012830 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012831 return 0;
12832}
12833
12834_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012835if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012836 ac_cv_posix_semaphores_enabled=yes
12837else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012838 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12841 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012842fi
12843
12844
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012845fi
12846
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12848$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012849if test $ac_cv_posix_semaphores_enabled = no
12850then
12851
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012852$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012853
12854fi
12855
12856# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12858$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012859if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012860 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012862 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012863 ac_cv_broken_sem_getvalue=yes
12864else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012866/* end confdefs.h. */
12867
12868#include <unistd.h>
12869#include <fcntl.h>
12870#include <stdio.h>
12871#include <semaphore.h>
12872#include <sys/stat.h>
12873
12874int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012875 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012876 int count;
12877 int res;
12878 if(a==SEM_FAILED){
12879 perror("sem_open");
12880 return 1;
12881
12882 }
12883 res = sem_getvalue(a, &count);
12884 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012885 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012886 return res==-1 ? 1 : 0;
12887}
12888
12889_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012890if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012891 ac_cv_broken_sem_getvalue=no
12892else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012893 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012894fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12896 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012897fi
12898
12899
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012900fi
12901
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12903$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012904if test $ac_cv_broken_sem_getvalue = yes
12905then
12906
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012907$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012908
12909fi
12910
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012911# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12913$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012914# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012915if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012916 enableval=$enable_big_digits; case $enable_big_digits in
12917yes)
12918 enable_big_digits=30 ;;
12919no)
12920 enable_big_digits=15 ;;
1292115|30)
12922 ;;
12923*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012924 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012925esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12927$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012928
12929cat >>confdefs.h <<_ACEOF
12930#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12931_ACEOF
12932
12933
12934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12936$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012937fi
12938
12939
Guido van Rossumef2255b2000-03-10 22:30:29 +000012940# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012941ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012942if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012943
12944
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012945$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012946
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012947 wchar_h="yes"
12948
Guido van Rossumef2255b2000-03-10 22:30:29 +000012949else
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012951
12952fi
12953
Michael W. Hudson54241132001-12-07 15:38:26 +000012954
Martin v. Löwis11437992002-04-12 09:54:03 +000012955
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012956# determine wchar_t size
12957if test "$wchar_h" = yes
12958then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012959 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012960# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12961# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12962# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12964$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012965if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012966 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012967else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012968 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12969"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012970
Martin v. Löwis11437992002-04-12 09:54:03 +000012971else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012972 if test "$ac_cv_type_wchar_t" = yes; then
12973 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12974$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012975as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012976See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012977 else
12978 ac_cv_sizeof_wchar_t=0
12979 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012980fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012981
Martin v. Löwis11437992002-04-12 09:54:03 +000012982fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12984$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012985
12986
12987
Martin v. Löwis11437992002-04-12 09:54:03 +000012988cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012989#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012990_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012991
Michael W. Hudson54241132001-12-07 15:38:26 +000012992
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012993fi
12994
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12996$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012997have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012999/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013000
13001#include <tcl.h>
13002#if TCL_UTF_MAX != 6
13003# error "NOT UCS4_TCL"
13004#endif
13005int
13006main ()
13007{
13008
13009 ;
13010 return 0;
13011}
13012_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013013if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013014
13015
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013016$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013017
13018 have_ucs4_tcl=yes
13019
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13023$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013024
Skip Montanaro6dead952003-09-25 14:50:04 +000013025# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013026if test "$wchar_h" = yes
13027then
13028 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13030$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013031 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013032 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013033else
13034
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013035 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013036 ac_cv_wchar_t_signed=yes
13037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013039/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013040
13041 #include <wchar.h>
13042 int main()
13043 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013044 /* Success: exit code 0 */
13045 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013046 }
13047
13048_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013049if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013050 ac_cv_wchar_t_signed=yes
13051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013052 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013053fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013056fi
13057
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013058fi
13059
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13061$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013062fi
13063
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13065$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013066# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013067if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013068 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013069else
13070 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013071fi
13072
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013073
13074if test $enable_unicode = yes
13075then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013076 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013077 case "$have_ucs4_tcl" in
13078 yes) enable_unicode="ucs4"
13079 ;;
13080 *) enable_unicode="ucs2"
13081 ;;
13082 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013083fi
13084
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013085
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013086case "$enable_unicode" in
13087ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013088 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013089
13090 ;;
13091ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013092 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013093
13094 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013095no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013096*) as_fn_error $? "invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." "$LINENO" 5 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013097esac
13098
Michael W. Hudson54241132001-12-07 15:38:26 +000013099
Martin v. Löwis11437992002-04-12 09:54:03 +000013100
13101
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013102if test "$enable_unicode" = "no"
13103then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013104 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13106$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013107else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013108 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013110$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013111
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013112
13113 # wchar_t is only usable if it maps to an unsigned type
13114 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013115 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013116 then
13117 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013119$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013120
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013121 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013122
13123 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13124 then
13125 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013126 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013127
13128 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13129 then
13130 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013131 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013132
13133 else
13134 PY_UNICODE_TYPE="no type found"
13135 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13137$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013138fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013139
13140# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13142$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013143if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013144 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013145else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013146 ac_cv_c_bigendian=unknown
13147 # See if we're dealing with a universal compiler.
13148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13149/* end confdefs.h. */
13150#ifndef __APPLE_CC__
13151 not a universal capable compiler
13152 #endif
13153 typedef int dummy;
13154
Skip Montanaro6dead952003-09-25 14:50:04 +000013155_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013156if ac_fn_c_try_compile "$LINENO"; then :
13157
13158 # Check for potential -arch flags. It is not universal unless
13159 # there are at least two -arch flags with different values.
13160 ac_arch=
13161 ac_prev=
13162 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13163 if test -n "$ac_prev"; then
13164 case $ac_word in
13165 i?86 | x86_64 | ppc | ppc64)
13166 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13167 ac_arch=$ac_word
13168 else
13169 ac_cv_c_bigendian=universal
13170 break
13171 fi
13172 ;;
13173 esac
13174 ac_prev=
13175 elif test "x$ac_word" = "x-arch"; then
13176 ac_prev=arch
13177 fi
13178 done
13179fi
13180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13181 if test $ac_cv_c_bigendian = unknown; then
13182 # See if sys/param.h defines the BYTE_ORDER macro.
13183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013184/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013185#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013187
Martin v. Löwis11437992002-04-12 09:54:03 +000013188int
13189main ()
13190{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013191#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13192 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13193 && LITTLE_ENDIAN)
13194 bogus endian macros
13195 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013196
13197 ;
13198 return 0;
13199}
13200_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013201if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013202 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013204/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013205#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013206 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013207
Martin v. Löwis11437992002-04-12 09:54:03 +000013208int
13209main ()
13210{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013211#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013212 not big endian
13213 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013214
13215 ;
13216 return 0;
13217}
13218_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013219if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013220 ac_cv_c_bigendian=yes
13221else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013222 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013225fi
13226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13227 fi
13228 if test $ac_cv_c_bigendian = unknown; then
13229 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013231/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013232#include <limits.h>
13233
Martin v. Löwis11437992002-04-12 09:54:03 +000013234int
13235main ()
13236{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013237#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13238 bogus endian macros
13239 #endif
13240
Martin v. Löwis11437992002-04-12 09:54:03 +000013241 ;
13242 return 0;
13243}
13244_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013245if ac_fn_c_try_compile "$LINENO"; then :
13246 # It does; now see whether it defined to _BIG_ENDIAN or not.
13247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13248/* end confdefs.h. */
13249#include <limits.h>
13250
13251int
13252main ()
13253{
13254#ifndef _BIG_ENDIAN
13255 not big endian
13256 #endif
13257
13258 ;
13259 return 0;
13260}
13261_ACEOF
13262if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013263 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013264else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013265 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013266fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13268fi
13269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13270 fi
13271 if test $ac_cv_c_bigendian = unknown; then
13272 # Compile a test program.
13273 if test "$cross_compiling" = yes; then :
13274 # Try to guess by grepping values from an object file.
13275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13276/* end confdefs.h. */
13277short int ascii_mm[] =
13278 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13279 short int ascii_ii[] =
13280 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13281 int use_ascii (int i) {
13282 return ascii_mm[i] + ascii_ii[i];
13283 }
13284 short int ebcdic_ii[] =
13285 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13286 short int ebcdic_mm[] =
13287 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13288 int use_ebcdic (int i) {
13289 return ebcdic_mm[i] + ebcdic_ii[i];
13290 }
13291 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013292
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013293int
13294main ()
13295{
13296return use_ascii (foo) == use_ebcdic (foo);
13297 ;
13298 return 0;
13299}
13300_ACEOF
13301if ac_fn_c_try_compile "$LINENO"; then :
13302 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13303 ac_cv_c_bigendian=yes
13304 fi
13305 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13306 if test "$ac_cv_c_bigendian" = unknown; then
13307 ac_cv_c_bigendian=no
13308 else
13309 # finding both strings is unlikely to happen, but who knows?
13310 ac_cv_c_bigendian=unknown
13311 fi
13312 fi
13313fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013315else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013317/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013318$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013319int
13320main ()
13321{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013322
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013323 /* Are we little or big endian? From Harbison&Steele. */
13324 union
13325 {
13326 long int l;
13327 char c[sizeof (long int)];
13328 } u;
13329 u.l = 1;
13330 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013331
13332 ;
13333 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013334}
Martin v. Löwis11437992002-04-12 09:54:03 +000013335_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013336if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013337 ac_cv_c_bigendian=no
13338else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013339 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013340fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013341rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13342 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013344
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013345 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013346fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13348$as_echo "$ac_cv_c_bigendian" >&6; }
13349 case $ac_cv_c_bigendian in #(
13350 yes)
13351 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13352;; #(
13353 no)
13354 ;; #(
13355 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013356
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013357$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013359 ;; #(
13360 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013361 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013362 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013363 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013364
Michael W. Hudson54241132001-12-07 15:38:26 +000013365
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013366# Check whether right shifting a negative integer extends the sign bit
13367# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13369$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013370if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013371 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013372else
Martin v. Löwis11437992002-04-12 09:54:03 +000013373
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013374if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013375 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013376else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013378/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013379
13380int main()
13381{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013382 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013383}
13384
Martin v. Löwis11437992002-04-12 09:54:03 +000013385_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013386if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013387 ac_cv_rshift_extends_sign=yes
13388else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013389 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013390fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13392 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013393fi
13394
Martin v. Löwiseba40652007-08-30 20:10:57 +000013395fi
13396
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13398$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013399if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013400then
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013402$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013403
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013404fi
13405
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013406# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13408$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013409if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013410 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013411else
Martin v. Löwis11437992002-04-12 09:54:03 +000013412
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013414/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013415#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013416int
13417main ()
13418{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013419
13420 FILE *f = fopen("/dev/null", "r");
13421 flockfile(f);
13422 getc_unlocked(f);
13423 funlockfile(f);
13424
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 ;
13426 return 0;
13427}
13428_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013429if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013430 ac_cv_have_getc_unlocked=yes
13431else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013432 ac_cv_have_getc_unlocked=no
13433fi
13434rm -f core conftest.err conftest.$ac_objext \
13435 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13439$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013440if test "$ac_cv_have_getc_unlocked" = yes
13441then
Martin v. Löwis11437992002-04-12 09:54:03 +000013442
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013443$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013444
13445fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013446
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013447# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013448# save the value of LIBS so we don't actually link Python with readline
13449LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013450
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013451# On some systems we need to link readline to a termcap compatible
13452# library. NOTE: Keep the precedence of listed libraries synchronised
13453# with setup.py.
13454py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13456$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013457for py_libtermcap in "" ncursesw ncurses curses termcap; do
13458 if test -z "$py_libtermcap"; then
13459 READLINE_LIBS="-lreadline"
13460 else
13461 READLINE_LIBS="-lreadline -l$py_libtermcap"
13462 fi
13463 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013465/* end confdefs.h. */
13466
Martin v. Löwiseba40652007-08-30 20:10:57 +000013467/* Override any GCC internal prototype to avoid an error.
13468 Use char because int might match the return type of a GCC
13469 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013470#ifdef __cplusplus
13471extern "C"
13472#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013473char readline ();
13474int
13475main ()
13476{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013477return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013478 ;
13479 return 0;
13480}
13481_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013482if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013483 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013484fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013485rm -f core conftest.err conftest.$ac_objext \
13486 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013487 if test $py_cv_lib_readline = yes; then
13488 break
13489 fi
13490done
13491# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13492#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013493if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13495$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013496else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13498$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013499
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013500$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013501
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013502fi
13503
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013504# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13506$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013507if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013508 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013509else
13510 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013511LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013513/* end confdefs.h. */
13514
Martin v. Löwiseba40652007-08-30 20:10:57 +000013515/* Override any GCC internal prototype to avoid an error.
13516 Use char because int might match the return type of a GCC
13517 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013518#ifdef __cplusplus
13519extern "C"
13520#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013521char rl_callback_handler_install ();
13522int
13523main ()
13524{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013525return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013526 ;
13527 return 0;
13528}
13529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013530if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013531 ac_cv_lib_readline_rl_callback_handler_install=yes
13532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013533 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013534fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013535rm -f core conftest.err conftest.$ac_objext \
13536 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013537LIBS=$ac_check_lib_save_LIBS
13538fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13540$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013541if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013542
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013543$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013544
13545fi
13546
13547
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013548# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013550/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013551#include <readline/readline.h>
13552_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013553if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013554 have_readline=yes
13555else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013556 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013557
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013558fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013559rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013560if test $have_readline = yes
13561then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013563/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013564#include <readline/readline.h>
13565
13566_ACEOF
13567if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013568 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013569
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013570$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013571
13572fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013573rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013576/* end confdefs.h. */
13577#include <readline/readline.h>
13578
13579_ACEOF
13580if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013581 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013583$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013584
13585fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013586rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013587
13588fi
13589
Martin v. Löwis0daad592001-09-30 21:09:59 +000013590# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13592$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013593if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013594 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013595else
Martin v. Löwis11437992002-04-12 09:54:03 +000013596 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013597LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013600
Martin v. Löwiseba40652007-08-30 20:10:57 +000013601/* Override any GCC internal prototype to avoid an error.
13602 Use char because int might match the return type of a GCC
13603 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013604#ifdef __cplusplus
13605extern "C"
13606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013607char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013608int
13609main ()
13610{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013611return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013612 ;
13613 return 0;
13614}
13615_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013616if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013617 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013619 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013620fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013621rm -f core conftest.err conftest.$ac_objext \
13622 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013623LIBS=$ac_check_lib_save_LIBS
13624fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13626$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013627if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013628
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013629$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013630
Martin v. Löwis0daad592001-09-30 21:09:59 +000013631fi
13632
Michael W. Hudson54241132001-12-07 15:38:26 +000013633
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013634# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13636$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013637if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013638 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013639else
13640 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013641LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013643/* end confdefs.h. */
13644
13645/* Override any GCC internal prototype to avoid an error.
13646 Use char because int might match the return type of a GCC
13647 builtin and then its argument prototype would still apply. */
13648#ifdef __cplusplus
13649extern "C"
13650#endif
13651char rl_completion_display_matches_hook ();
13652int
13653main ()
13654{
13655return rl_completion_display_matches_hook ();
13656 ;
13657 return 0;
13658}
13659_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013660if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013661 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13662else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013663 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013664fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013665rm -f core conftest.err conftest.$ac_objext \
13666 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013667LIBS=$ac_check_lib_save_LIBS
13668fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13670$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013671if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013672
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013673$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013674
13675fi
13676
13677
Martin v. Löwis0daad592001-09-30 21:09:59 +000013678# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13680$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013681if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013682 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013683else
Martin v. Löwis11437992002-04-12 09:54:03 +000013684 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013685LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013688
Martin v. Löwiseba40652007-08-30 20:10:57 +000013689/* Override any GCC internal prototype to avoid an error.
13690 Use char because int might match the return type of a GCC
13691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013692#ifdef __cplusplus
13693extern "C"
13694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013695char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013696int
13697main ()
13698{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013699return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 ;
13701 return 0;
13702}
13703_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013704if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013705 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013707 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013708fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013709rm -f core conftest.err conftest.$ac_objext \
13710 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013711LIBS=$ac_check_lib_save_LIBS
13712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13714$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013715if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013716
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013717$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013718
Guido van Rossum353ae582001-07-10 16:45:32 +000013719fi
13720
Jack Jansendd19cf82001-12-06 22:36:17 +000013721
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013722# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013724/* end confdefs.h. */
13725#include <readline/readline.h>
13726_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013727if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013728 have_readline=yes
13729else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013730 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013731
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013732fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013733rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013734if test $have_readline = yes
13735then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013737/* end confdefs.h. */
13738#include <readline/readline.h>
13739
13740_ACEOF
13741if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013742 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013743
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013744$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013745
13746fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013747rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013748
13749fi
13750
Martin v. Löwis82bca632006-02-10 20:49:30 +000013751# End of readline checks: restore LIBS
13752LIBS=$LIBS_no_readline
13753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13755$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013756if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013757 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013758else
Martin v. Löwis11437992002-04-12 09:54:03 +000013759
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013760if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013761 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013762else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013764/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013765
13766int main()
13767{
13768 int val1 = nice(1);
13769 if (val1 != -1 && val1 == nice(2))
13770 exit(0);
13771 exit(1);
13772}
13773
Martin v. Löwis11437992002-04-12 09:54:03 +000013774_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013775if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013776 ac_cv_broken_nice=yes
13777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013778 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013779fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13781 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013782fi
13783
Martin v. Löwiseba40652007-08-30 20:10:57 +000013784fi
13785
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13787$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013788if test "$ac_cv_broken_nice" = yes
13789then
Martin v. Löwis11437992002-04-12 09:54:03 +000013790
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013791$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013792
13793fi
13794
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13796$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013797if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013798 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013800 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013801 ac_cv_broken_poll=no
13802else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013804/* end confdefs.h. */
13805
13806#include <poll.h>
13807
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013808int main()
13809{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013810 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013811 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013812
13813 close (42);
13814
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013815 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013816 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013817 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013818 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013819 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013820 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013821 return 1;
13822}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013823
13824_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013825if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013826 ac_cv_broken_poll=yes
13827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013828 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013829fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13831 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013833
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013834fi
13835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13837$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013838if test "$ac_cv_broken_poll" = yes
13839then
13840
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013841$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013842
13843fi
13844
Brett Cannon43802422005-02-10 20:48:03 +000013845# 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 +000013846# (which is not required by ISO C or UNIX spec) and/or if we support
13847# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013848ac_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 +000013849#include <$ac_cv_struct_tm>
13850
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013851"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013852if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013853
13854cat >>confdefs.h <<_ACEOF
13855#define HAVE_STRUCT_TM_TM_ZONE 1
13856_ACEOF
13857
13858
13859fi
13860
13861if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13862
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013863$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013864
13865else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013866 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13867"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013868if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013869 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013871 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013872fi
13873
Martin v. Löwiseba40652007-08-30 20:10:57 +000013874cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013875#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013876_ACEOF
13877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13879$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013880if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013881 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013884/* end confdefs.h. */
13885#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013886#if !HAVE_DECL_TZNAME
13887extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013888#endif
13889
13890int
13891main ()
13892{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013893return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013894 ;
13895 return 0;
13896}
13897_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013898if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013899 ac_cv_var_tzname=yes
13900else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013901 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013902fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013903rm -f core conftest.err conftest.$ac_objext \
13904 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13907$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013908 if test $ac_cv_var_tzname = yes; then
13909
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013910$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013911
13912 fi
13913fi
13914
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013915
Martin v. Löwis1d459062005-03-14 21:23:33 +000013916# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13918$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013919if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013920 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013921else
13922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013923if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013924 ac_cv_working_tzset=no
13925else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013927/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013928
13929#include <stdlib.h>
13930#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013931#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013932
13933#if HAVE_TZNAME
13934extern char *tzname[];
13935#endif
13936
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013937int main()
13938{
Brett Cannon18367812003-09-19 00:59:16 +000013939 /* Note that we need to ensure that not only does tzset(3)
13940 do 'something' with localtime, but it works as documented
13941 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013942 This includes making sure that tzname is set properly if
13943 tm->tm_zone does not exist since it is the alternative way
13944 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013945
13946 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013947 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013948 */
13949
Martin v. Löwis1d459062005-03-14 21:23:33 +000013950 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013951 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13952
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013953 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013954 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013955 if (localtime(&groundhogday)->tm_hour != 0)
13956 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013957#if HAVE_TZNAME
13958 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13959 if (strcmp(tzname[0], "UTC") ||
13960 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13961 exit(1);
13962#endif
Brett Cannon18367812003-09-19 00:59:16 +000013963
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013964 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013965 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013966 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013967 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013968#if HAVE_TZNAME
13969 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13970 exit(1);
13971#endif
Brett Cannon18367812003-09-19 00:59:16 +000013972
13973 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13974 tzset();
13975 if (localtime(&groundhogday)->tm_hour != 11)
13976 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013977#if HAVE_TZNAME
13978 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13979 exit(1);
13980#endif
13981
13982#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013983 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13984 exit(1);
13985 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13986 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013987#endif
Brett Cannon18367812003-09-19 00:59:16 +000013988
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013989 exit(0);
13990}
13991
13992_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013993if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013994 ac_cv_working_tzset=yes
13995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013996 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013997fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13999 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014000fi
14001
Martin v. Löwiseba40652007-08-30 20:10:57 +000014002fi
14003
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14005$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014006if test "$ac_cv_working_tzset" = yes
14007then
14008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014009$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014010
14011fi
14012
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014013# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14015$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014016if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014017 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014018else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014020/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014021#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014022int
14023main ()
14024{
14025
14026struct stat st;
14027st.st_mtim.tv_nsec = 1;
14028
14029 ;
14030 return 0;
14031}
14032_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014033if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014034 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014036 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14039fi
14040
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14042$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014043if test "$ac_cv_stat_tv_nsec" = yes
14044then
14045
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014047
14048fi
14049
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014050# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14052$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014053if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014054 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014055else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014057/* end confdefs.h. */
14058#include <sys/stat.h>
14059int
14060main ()
14061{
14062
14063struct stat st;
14064st.st_mtimespec.tv_nsec = 1;
14065
14066 ;
14067 return 0;
14068}
14069_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014070if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014071 ac_cv_stat_tv_nsec2=yes
14072else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014073 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14076fi
14077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14079$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014080if test "$ac_cv_stat_tv_nsec2" = yes
14081then
14082
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014083$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014084
14085fi
14086
Jack Jansen666b1e72001-10-31 12:11:48 +000014087# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14089$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014090if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014091 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014094/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014095#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014096int
14097main ()
14098{
Jack Jansen666b1e72001-10-31 12:11:48 +000014099
14100 int rtn;
14101 rtn = mvwdelch(0,0,0);
14102
Martin v. Löwis11437992002-04-12 09:54:03 +000014103 ;
14104 return 0;
14105}
14106_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014107if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014108 ac_cv_mvwdelch_is_expression=yes
14109else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014110 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14113fi
14114
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14116$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014117
14118if test "$ac_cv_mvwdelch_is_expression" = yes
14119then
Martin v. Löwis11437992002-04-12 09:54:03 +000014120
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014121$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014122
14123fi
14124
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14126$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014127if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014128 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014129else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014131/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014132#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014133int
14134main ()
14135{
Jack Jansen666b1e72001-10-31 12:11:48 +000014136
14137 WINDOW *w;
14138 w->_flags = 0;
14139
Martin v. Löwis11437992002-04-12 09:54:03 +000014140 ;
14141 return 0;
14142}
14143_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014144if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014145 ac_cv_window_has_flags=yes
14146else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014147 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14150fi
14151
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14153$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014154
Jack Jansen666b1e72001-10-31 12:11:48 +000014155
14156if test "$ac_cv_window_has_flags" = yes
14157then
Martin v. Löwis11437992002-04-12 09:54:03 +000014158
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014159$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014160
14161fi
14162
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14164$as_echo_n "checking for is_term_resized... " >&6; }
14165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014166/* end confdefs.h. */
14167#include <curses.h>
14168int
14169main ()
14170{
14171void *x=is_term_resized
14172 ;
14173 return 0;
14174}
14175_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014176if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014177
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014178$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014179
Matthias Klosec511b472010-05-08 11:01:39 +000014180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014181$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14184$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014185
14186fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14188
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14190$as_echo_n "checking for resize_term... " >&6; }
14191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014192/* end confdefs.h. */
14193#include <curses.h>
14194int
14195main ()
14196{
14197void *x=resize_term
14198 ;
14199 return 0;
14200}
14201_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014202if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014203
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014204$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014205
Matthias Klosec511b472010-05-08 11:01:39 +000014206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014207$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14210$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014211
14212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14214
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14216$as_echo_n "checking for resizeterm... " >&6; }
14217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014218/* end confdefs.h. */
14219#include <curses.h>
14220int
14221main ()
14222{
14223void *x=resizeterm
14224 ;
14225 return 0;
14226}
14227_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014228if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014229
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014230$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014231
Matthias Klosec511b472010-05-08 11:01:39 +000014232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014233$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14236$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014237
14238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14240
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14242$as_echo "$as_me: checking for device files" >&6;}
14243
14244if test "x$cross_compiling" = xyes; then
14245 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14247$as_echo_n "checking for /dev/ptmx... " >&6; }
14248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14249$as_echo "not set" >&6; }
14250 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14251 fi
14252 if test "${ac_cv_file__dev_ptc+set}" != set; then
14253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14254$as_echo_n "checking for /dev/ptc... " >&6; }
14255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14256$as_echo "not set" >&6; }
14257 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14258 fi
14259fi
14260
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14262$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014263if ${ac_cv_file__dev_ptmx+:} false; then :
14264 $as_echo_n "(cached) " >&6
14265else
14266 test "$cross_compiling" = yes &&
14267 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14268if test -r "/dev/ptmx"; then
14269 ac_cv_file__dev_ptmx=yes
14270else
14271 ac_cv_file__dev_ptmx=no
14272fi
14273fi
14274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14275$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14276if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014277
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014278fi
14279
14280if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014282$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014283
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014284fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14286$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014287if ${ac_cv_file__dev_ptc+:} false; then :
14288 $as_echo_n "(cached) " >&6
14289else
14290 test "$cross_compiling" = yes &&
14291 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14292if test -r "/dev/ptc"; then
14293 ac_cv_file__dev_ptc=yes
14294else
14295 ac_cv_file__dev_ptc=no
14296fi
14297fi
14298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14299$as_echo "$ac_cv_file__dev_ptc" >&6; }
14300if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014301
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014302fi
14303
14304if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014305
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014306$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014307
Neal Norwitz865400f2003-03-21 01:42:58 +000014308fi
14309
Mark Dickinson82864d12009-11-15 16:18:58 +000014310if test "$have_long_long" = yes
14311then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14313$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014314 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014315 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014316else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014317 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014318 ac_cv_have_long_long_format="cross -- assuming no"
14319 if test x$GCC = xyes; then
14320 save_CFLAGS=$CFLAGS
14321 CFLAGS="$CFLAGS -Werror -Wformat"
14322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14323/* end confdefs.h. */
14324
14325 #include <stdio.h>
14326 #include <stddef.h>
14327
14328int
14329main ()
14330{
14331
14332 char *buffer;
14333 sprintf(buffer, "%lld", (long long)123);
14334 sprintf(buffer, "%lld", (long long)-123);
14335 sprintf(buffer, "%llu", (unsigned long long)123);
14336
14337 ;
14338 return 0;
14339}
14340_ACEOF
14341if ac_fn_c_try_compile "$LINENO"; then :
14342 ac_cv_have_long_long_format=yes
14343
14344fi
14345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14346 CFLAGS=$save_CFLAGS
14347 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014348else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014350/* end confdefs.h. */
14351
14352 #include <stdio.h>
14353 #include <stddef.h>
14354 #include <string.h>
14355
14356 #ifdef HAVE_SYS_TYPES_H
14357 #include <sys/types.h>
14358 #endif
14359
14360 int main()
14361 {
14362 char buffer[256];
14363
14364 if (sprintf(buffer, "%lld", (long long)123) < 0)
14365 return 1;
14366 if (strcmp(buffer, "123"))
14367 return 1;
14368
14369 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14370 return 1;
14371 if (strcmp(buffer, "-123"))
14372 return 1;
14373
14374 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14375 return 1;
14376 if (strcmp(buffer, "123"))
14377 return 1;
14378
14379 return 0;
14380 }
14381
14382_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014383if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014384 ac_cv_have_long_long_format=yes
14385else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014386 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014387fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014388rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14389 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014390fi
14391
14392
Mark Dickinson82864d12009-11-15 16:18:58 +000014393fi
14394
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14396$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014397fi
14398
Mark Dickinson5ce84742009-12-31 20:48:04 +000014399if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014400then
14401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014402$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014403
14404fi
14405
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014406if test $ac_sys_system = Darwin
14407then
14408 LIBS="$LIBS -framework CoreFoundation"
14409fi
14410
Mark Dickinson82864d12009-11-15 16:18:58 +000014411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14413$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014414if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014415 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014416else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014417 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014418 ac_cv_have_size_t_format="cross -- assuming yes"
14419
Brett Cannon09d12362006-05-11 05:11:33 +000014420else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014422/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014423
Brett Cannon09d12362006-05-11 05:11:33 +000014424#include <stdio.h>
14425#include <stddef.h>
14426#include <string.h>
14427
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014428#ifdef HAVE_SYS_TYPES_H
14429#include <sys/types.h>
14430#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014431
14432#ifdef HAVE_SSIZE_T
14433typedef ssize_t Py_ssize_t;
14434#elif SIZEOF_VOID_P == SIZEOF_LONG
14435typedef long Py_ssize_t;
14436#else
14437typedef int Py_ssize_t;
14438#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014439
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014440int main()
14441{
14442 char buffer[256];
14443
Brett Cannon09d12362006-05-11 05:11:33 +000014444 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14445 return 1;
14446
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014447 if (strcmp(buffer, "123"))
14448 return 1;
14449
14450 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14451 return 1;
14452
14453 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014454 return 1;
14455
14456 return 0;
14457}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014458
Brett Cannon09d12362006-05-11 05:11:33 +000014459_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014460if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014461 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014462else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014463 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014464fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14466 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014467fi
14468
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014469fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14471$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014472if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014473
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014474$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014475
14476fi
14477
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014478ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014479#ifdef HAVE_SYS_TYPES_H
14480#include <sys/types.h>
14481#endif
14482#ifdef HAVE_SYS_SOCKET_H
14483#include <sys/socket.h>
14484#endif
14485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014486"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014487if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014488
Martin v. Löwis11437992002-04-12 09:54:03 +000014489else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014491$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014492
14493fi
14494
Michael W. Hudson54241132001-12-07 15:38:26 +000014495
Benjamin Peterson7497e912010-10-16 00:53:39 +000014496case $ac_sys_system in
14497AIX*)
14498
14499$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14500 ;;
14501esac
14502
14503
Michael W. Hudson54241132001-12-07 15:38:26 +000014504
14505
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014506for h in `(cd $srcdir;echo Python/thread_*.h)`
14507do
14508 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14509done
14510
Michael W. Hudson54241132001-12-07 15:38:26 +000014511
Neal Norwitzd24499d2005-12-18 21:36:39 +000014512SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14514$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014515for dir in $SRCDIRS; do
14516 if test ! -d $dir; then
14517 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014518 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014519done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14521$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014522
Guido van Rossum627b2d71993-12-24 10:39:16 +000014523# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014524ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014525
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014526ac_config_files="$ac_config_files Modules/ld_so_aix"
14527
Martin v. Löwis11437992002-04-12 09:54:03 +000014528cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014529# This file is a shell script that caches the results of configure
14530# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014531# scripts and configure runs, see configure's option --config-cache.
14532# It is not useful on other systems. If it contains results you don't
14533# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014534#
Martin v. Löwis11437992002-04-12 09:54:03 +000014535# config.status only pays attention to the cache file if you give it
14536# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014537#
Skip Montanaro6dead952003-09-25 14:50:04 +000014538# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014539# loading this file, other *unset* `ac_cv_foo' will be assigned the
14540# following values.
14541
14542_ACEOF
14543
Guido van Rossumf78abae1997-01-21 22:02:36 +000014544# The following way of writing the cache mishandles newlines in values,
14545# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014546# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014547# Ultrix sh set writes to stderr and can't be redirected directly,
14548# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014549(
14550 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14551 eval ac_val=\$$ac_var
14552 case $ac_val in #(
14553 *${as_nl}*)
14554 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014555 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14556$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014557 esac
14558 case $ac_var in #(
14559 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014560 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14561 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014562 esac ;;
14563 esac
14564 done
14565
Martin v. Löwis11437992002-04-12 09:54:03 +000014566 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014567 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14568 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014569 # `set' does not quote correctly, so add quotes: double-quote
14570 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014572 "s/'/'\\\\''/g;
14573 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014574 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014575 *)
14576 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014577 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014578 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014579 esac |
14580 sort
14581) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014582 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014583 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014584 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014585 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014586 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14587 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014588 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14589 :end' >>confcache
14590if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14591 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014592 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014593 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14594$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014595 if test ! -f "$cache_file" || test -h "$cache_file"; then
14596 cat confcache >"$cache_file"
14597 else
14598 case $cache_file in #(
14599 */* | ?:*)
14600 mv -f confcache "$cache_file"$$ &&
14601 mv -f "$cache_file"$$ "$cache_file" ;; #(
14602 *)
14603 mv -f confcache "$cache_file" ;;
14604 esac
14605 fi
14606 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014607 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014608 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14609$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014610 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014611fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014612rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014613
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014614test "x$prefix" = xNONE && prefix=$ac_default_prefix
14615# Let make expand exec_prefix.
14616test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014617
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014618DEFS=-DHAVE_CONFIG_H
14619
Skip Montanaro6dead952003-09-25 14:50:04 +000014620ac_libobjs=
14621ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014622U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014623for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14624 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014625 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014626 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014627 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14628 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014629 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14630 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014631done
14632LIBOBJS=$ac_libobjs
14633
14634LTLIBOBJS=$ac_ltlibobjs
14635
14636
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014638
Matthias Klose3cef2a92012-03-14 23:39:33 +010014639: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014640ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014641ac_clean_files_save=$ac_clean_files
14642ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014643{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14644$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14645as_write_fail=0
14646cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014647#! $SHELL
14648# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014649# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014650# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014651# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014652
Martin v. Löwis11437992002-04-12 09:54:03 +000014653debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014654ac_cs_recheck=false
14655ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014656
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014657SHELL=\${CONFIG_SHELL-$SHELL}
14658export SHELL
14659_ASEOF
14660cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14661## -------------------- ##
14662## M4sh Initialization. ##
14663## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014664
Martin v. Löwiseba40652007-08-30 20:10:57 +000014665# Be more Bourne compatible
14666DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014667if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014668 emulate sh
14669 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014670 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014671 # is contrary to our usage. Disable this feature.
14672 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014673 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014674else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014675 case `(set -o) 2>/dev/null` in #(
14676 *posix*) :
14677 set -o posix ;; #(
14678 *) :
14679 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014680esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014681fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014682
Skip Montanaro6dead952003-09-25 14:50:04 +000014683
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014684as_nl='
14685'
14686export as_nl
14687# Printing a long string crashes Solaris 7 /usr/bin/printf.
14688as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14689as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14690as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14691# Prefer a ksh shell builtin over an external printf program on Solaris,
14692# but without wasting forks for bash or zsh.
14693if test -z "$BASH_VERSION$ZSH_VERSION" \
14694 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14695 as_echo='print -r --'
14696 as_echo_n='print -rn --'
14697elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14698 as_echo='printf %s\n'
14699 as_echo_n='printf %s'
14700else
14701 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14702 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14703 as_echo_n='/usr/ucb/echo -n'
14704 else
14705 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14706 as_echo_n_body='eval
14707 arg=$1;
14708 case $arg in #(
14709 *"$as_nl"*)
14710 expr "X$arg" : "X\\(.*\\)$as_nl";
14711 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14712 esac;
14713 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14714 '
14715 export as_echo_n_body
14716 as_echo_n='sh -c $as_echo_n_body as_echo'
14717 fi
14718 export as_echo_body
14719 as_echo='sh -c $as_echo_body as_echo'
14720fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014721
14722# The user is always right.
14723if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014724 PATH_SEPARATOR=:
14725 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14726 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14727 PATH_SEPARATOR=';'
14728 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014729fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014730
Martin v. Löwiseba40652007-08-30 20:10:57 +000014731
14732# IFS
14733# We need space, tab and new line, in precisely that order. Quoting is
14734# there to prevent editors from complaining about space-tab.
14735# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14736# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014737IFS=" "" $as_nl"
14738
14739# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014740as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014741case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014742 *[\\/]* ) as_myself=$0 ;;
14743 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014744for as_dir in $PATH
14745do
14746 IFS=$as_save_IFS
14747 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014748 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14749 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014750IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014751
Martin v. Löwiseba40652007-08-30 20:10:57 +000014752 ;;
14753esac
14754# We did not find ourselves, most probably we were run as `sh COMMAND'
14755# in which case we are not to be found in the path.
14756if test "x$as_myself" = x; then
14757 as_myself=$0
14758fi
14759if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014760 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14761 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014762fi
14763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014764# Unset variables that we do not need and which cause bugs (e.g. in
14765# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14766# suppresses any "Segmentation fault" message there. '((' could
14767# trigger a bug in pdksh 5.2.14.
14768for as_var in BASH_ENV ENV MAIL MAILPATH
14769do eval test x\${$as_var+set} = xset \
14770 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014771done
14772PS1='$ '
14773PS2='> '
14774PS4='+ '
14775
14776# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014777LC_ALL=C
14778export LC_ALL
14779LANGUAGE=C
14780export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014781
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014782# CDPATH.
14783(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14784
14785
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014786# as_fn_error STATUS ERROR [LINENO LOG_FD]
14787# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014788# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14789# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014790# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014791as_fn_error ()
14792{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014793 as_status=$1; test $as_status -eq 0 && as_status=1
14794 if test "$4"; then
14795 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14796 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014797 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014798 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014799 as_fn_exit $as_status
14800} # as_fn_error
14801
14802
14803# as_fn_set_status STATUS
14804# -----------------------
14805# Set $? to STATUS, without forking.
14806as_fn_set_status ()
14807{
14808 return $1
14809} # as_fn_set_status
14810
14811# as_fn_exit STATUS
14812# -----------------
14813# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14814as_fn_exit ()
14815{
14816 set +e
14817 as_fn_set_status $1
14818 exit $1
14819} # as_fn_exit
14820
14821# as_fn_unset VAR
14822# ---------------
14823# Portably unset VAR.
14824as_fn_unset ()
14825{
14826 { eval $1=; unset $1;}
14827}
14828as_unset=as_fn_unset
14829# as_fn_append VAR VALUE
14830# ----------------------
14831# Append the text in VALUE to the end of the definition contained in VAR. Take
14832# advantage of any shell optimizations that allow amortized linear growth over
14833# repeated appends, instead of the typical quadratic growth present in naive
14834# implementations.
14835if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14836 eval 'as_fn_append ()
14837 {
14838 eval $1+=\$2
14839 }'
14840else
14841 as_fn_append ()
14842 {
14843 eval $1=\$$1\$2
14844 }
14845fi # as_fn_append
14846
14847# as_fn_arith ARG...
14848# ------------------
14849# Perform arithmetic evaluation on the ARGs, and store the result in the
14850# global $as_val. Take advantage of shells that can avoid forks. The arguments
14851# must be portable across $(()) and expr.
14852if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14853 eval 'as_fn_arith ()
14854 {
14855 as_val=$(( $* ))
14856 }'
14857else
14858 as_fn_arith ()
14859 {
14860 as_val=`expr "$@" || test $? -eq 1`
14861 }
14862fi # as_fn_arith
14863
14864
Martin v. Löwiseba40652007-08-30 20:10:57 +000014865if expr a : '\(a\)' >/dev/null 2>&1 &&
14866 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14867 as_expr=expr
14868else
14869 as_expr=false
14870fi
14871
14872if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14873 as_basename=basename
14874else
14875 as_basename=false
14876fi
14877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014878if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14879 as_dirname=dirname
14880else
14881 as_dirname=false
14882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014883
Martin v. Löwiseba40652007-08-30 20:10:57 +000014884as_me=`$as_basename -- "$0" ||
14885$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14886 X"$0" : 'X\(//\)$' \| \
14887 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014888$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014889 sed '/^.*\/\([^/][^/]*\)\/*$/{
14890 s//\1/
14891 q
14892 }
14893 /^X\/\(\/\/\)$/{
14894 s//\1/
14895 q
14896 }
14897 /^X\/\(\/\).*/{
14898 s//\1/
14899 q
14900 }
14901 s/.*/./; q'`
14902
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014903# Avoid depending upon Character Ranges.
14904as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14905as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14906as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14907as_cr_digits='0123456789'
14908as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014909
14910ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014911case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014912-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014913 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014914 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014915 xy) ECHO_C='\c';;
14916 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14917 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014918 esac;;
14919*)
14920 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014922
Martin v. Löwis11437992002-04-12 09:54:03 +000014923rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014924if test -d conf$$.dir; then
14925 rm -f conf$$.dir/conf$$.file
14926else
14927 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014928 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014929fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014930if (echo >conf$$.file) 2>/dev/null; then
14931 if ln -s conf$$.file conf$$ 2>/dev/null; then
14932 as_ln_s='ln -s'
14933 # ... but there are two gotchas:
14934 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14935 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014936 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014937 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014938 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014939 elif ln conf$$.file conf$$ 2>/dev/null; then
14940 as_ln_s=ln
14941 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014942 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014943 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014944else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014945 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000014946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014947rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14948rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014949
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014950
14951# as_fn_mkdir_p
14952# -------------
14953# Create "$as_dir" as a directory, including parents if necessary.
14954as_fn_mkdir_p ()
14955{
14956
14957 case $as_dir in #(
14958 -*) as_dir=./$as_dir;;
14959 esac
14960 test -d "$as_dir" || eval $as_mkdir_p || {
14961 as_dirs=
14962 while :; do
14963 case $as_dir in #(
14964 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14965 *) as_qdir=$as_dir;;
14966 esac
14967 as_dirs="'$as_qdir' $as_dirs"
14968 as_dir=`$as_dirname -- "$as_dir" ||
14969$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14970 X"$as_dir" : 'X\(//\)[^/]' \| \
14971 X"$as_dir" : 'X\(//\)$' \| \
14972 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14973$as_echo X"$as_dir" |
14974 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14975 s//\1/
14976 q
14977 }
14978 /^X\(\/\/\)[^/].*/{
14979 s//\1/
14980 q
14981 }
14982 /^X\(\/\/\)$/{
14983 s//\1/
14984 q
14985 }
14986 /^X\(\/\).*/{
14987 s//\1/
14988 q
14989 }
14990 s/.*/./; q'`
14991 test -d "$as_dir" && break
14992 done
14993 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014994 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014995
14996
14997} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014998if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014999 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015000else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015001 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015002 as_mkdir_p=false
15003fi
15004
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015005
15006# as_fn_executable_p FILE
15007# -----------------------
15008# Test if FILE is an executable regular file.
15009as_fn_executable_p ()
15010{
15011 test -f "$1" && test -x "$1"
15012} # as_fn_executable_p
15013as_test_x='test -x'
15014as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015015
15016# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015017as_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 +000015018
15019# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015020as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015021
15022
Martin v. Löwis11437992002-04-12 09:54:03 +000015023exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015024## ----------------------------------- ##
15025## Main body of $CONFIG_STATUS script. ##
15026## ----------------------------------- ##
15027_ASEOF
15028test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015029
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015030cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15031# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015032# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015033# values after options handling.
15034ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015035This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015036generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015037
15038 CONFIG_FILES = $CONFIG_FILES
15039 CONFIG_HEADERS = $CONFIG_HEADERS
15040 CONFIG_LINKS = $CONFIG_LINKS
15041 CONFIG_COMMANDS = $CONFIG_COMMANDS
15042 $ $0 $@
15043
Martin v. Löwiseba40652007-08-30 20:10:57 +000015044on `(hostname || uname -n) 2>/dev/null | sed 1q`
15045"
15046
Martin v. Löwis11437992002-04-12 09:54:03 +000015047_ACEOF
15048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015049case $ac_config_files in *"
15050"*) set x $ac_config_files; shift; ac_config_files=$*;;
15051esac
15052
15053case $ac_config_headers in *"
15054"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15055esac
15056
15057
15058cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015059# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015060config_files="$ac_config_files"
15061config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015062
Martin v. Löwiseba40652007-08-30 20:10:57 +000015063_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015064
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015065cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015066ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015067\`$as_me' instantiates files and other configuration actions
15068from templates according to the current configuration. Unless the files
15069and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015070
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015071Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015072
15073 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015074 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015075 --config print configuration, then exit
15076 -q, --quiet, --silent
15077 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 -d, --debug don't remove temporary files
15079 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015080 --file=FILE[:TEMPLATE]
15081 instantiate the configuration file FILE
15082 --header=FILE[:TEMPLATE]
15083 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015084
15085Configuration files:
15086$config_files
15087
15088Configuration headers:
15089$config_headers
15090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015091Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015092
Martin v. Löwiseba40652007-08-30 20:10:57 +000015093_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015094cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15095ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015096ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015097python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015098configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015099 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015100
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015101Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015102This config.status script is free software; the Free Software Foundation
15103gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015104
15105ac_pwd='$ac_pwd'
15106srcdir='$srcdir'
15107INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015108MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015109test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015110_ACEOF
15111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015112cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15113# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015114ac_need_defaults=:
15115while test $# != 0
15116do
15117 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015118 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015119 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15120 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015121 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015123 --*=)
15124 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15125 ac_optarg=
15126 ac_shift=:
15127 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015128 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015129 ac_option=$1
15130 ac_optarg=$2
15131 ac_shift=shift
15132 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 esac
15134
Skip Montanaro6dead952003-09-25 14:50:04 +000015135 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015137 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15138 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015139 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015140 $as_echo "$ac_cs_version"; exit ;;
15141 --config | --confi | --conf | --con | --co | --c )
15142 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015143 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015144 debug=: ;;
15145 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015146 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015147 case $ac_optarg in
15148 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015149 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015150 esac
15151 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 ac_need_defaults=false;;
15153 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015154 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015155 case $ac_optarg in
15156 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15157 esac
15158 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015159 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015160 --he | --h)
15161 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015162 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015163Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015164 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015165 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015166 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15167 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15168 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015169
15170 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015171 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015172Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015173
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015174 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015175 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015176
15177 esac
15178 shift
15179done
15180
Skip Montanaro6dead952003-09-25 14:50:04 +000015181ac_configure_extra_args=
15182
15183if $ac_cs_silent; then
15184 exec 6>/dev/null
15185 ac_configure_extra_args="$ac_configure_extra_args --silent"
15186fi
15187
15188_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015189cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015190if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015191 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015192 shift
15193 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15194 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015195 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015196 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015197fi
15198
Martin v. Löwis11437992002-04-12 09:54:03 +000015199_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015200cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015201exec 5>>config.log
15202{
15203 echo
15204 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15205## Running $as_me. ##
15206_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015207 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015208} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015209
Martin v. Löwiseba40652007-08-30 20:10:57 +000015210_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015211cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015212_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015213
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215
15216# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015217for ac_config_target in $ac_config_targets
15218do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015219 case $ac_config_target in
15220 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15221 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15222 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15223 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015224 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15225 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015226 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15227 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015228 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015229 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015230
Matthias Klose3cef2a92012-03-14 23:39:33 +010015231 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015232 esac
15233done
15234
Martin v. Löwiseba40652007-08-30 20:10:57 +000015235
Martin v. Löwis11437992002-04-12 09:54:03 +000015236# If the user did not use the arguments to specify the items to instantiate,
15237# then the envvar interface is used. Set only those that are not.
15238# We use the long form for the default assignment because of an extremely
15239# bizarre bug on SunOS 4.1.3.
15240if $ac_need_defaults; then
15241 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15242 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15243fi
15244
Skip Montanaro6dead952003-09-25 14:50:04 +000015245# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015246# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015247# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015248# Hook for its removal unless debugging.
15249# Note that there is a small window in which the directory will not be cleaned:
15250# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015251$debug ||
15252{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015253 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015254 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015255 : "${ac_tmp:=$tmp}"
15256 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015257' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015258 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015259}
Martin v. Löwis11437992002-04-12 09:54:03 +000015260# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015261
Martin v. Löwis11437992002-04-12 09:54:03 +000015262{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015263 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015264 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015265} ||
15266{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015267 tmp=./conf$$-$RANDOM
15268 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015269} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015270ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015271
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015272# Set up the scripts for CONFIG_FILES section.
15273# No need to generate them if there are no CONFIG_FILES.
15274# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015275if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015276
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015277
15278ac_cr=`echo X | tr X '\015'`
15279# On cygwin, bash can eat \r inside `` if the user requested igncr.
15280# But we know of no other shell where ac_cr would be empty at this
15281# point, so we can use a bashism as a fallback.
15282if test "x$ac_cr" = x; then
15283 eval ac_cr=\$\'\\r\'
15284fi
15285ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15286if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015287 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015288else
15289 ac_cs_awk_cr=$ac_cr
15290fi
15291
Matthias Klose3cef2a92012-03-14 23:39:33 +010015292echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015293_ACEOF
15294
Martin v. Löwiseba40652007-08-30 20:10:57 +000015295
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015296{
15297 echo "cat >conf$$subs.awk <<_ACEOF" &&
15298 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15299 echo "_ACEOF"
15300} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015301 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15302ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015303ac_delim='%!_!# '
15304for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015305 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015306 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015308 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15309 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015310 break
15311 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015312 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015313 else
15314 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015315 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015316done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015317rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015318
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015319cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015320cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015322sed -n '
15323h
15324s/^/S["/; s/!.*/"]=/
15325p
15326g
15327s/^[^!]*!//
15328:repl
15329t repl
15330s/'"$ac_delim"'$//
15331t delim
15332:nl
15333h
15334s/\(.\{148\}\)..*/\1/
15335t more1
15336s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15337p
15338n
15339b repl
15340:more1
15341s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15342p
15343g
15344s/.\{148\}//
15345t nl
15346:delim
15347h
15348s/\(.\{148\}\)..*/\1/
15349t more2
15350s/["\\]/\\&/g; s/^/"/; s/$/"/
15351p
15352b
15353:more2
15354s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15355p
15356g
15357s/.\{148\}//
15358t delim
15359' <conf$$subs.awk | sed '
15360/^[^""]/{
15361 N
15362 s/\n//
15363}
15364' >>$CONFIG_STATUS || ac_write_fail=1
15365rm -f conf$$subs.awk
15366cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15367_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015368cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015369 for (key in S) S_is_set[key] = 1
15370 FS = ""
15371
15372}
15373{
15374 line = $ 0
15375 nfields = split(line, field, "@")
15376 substed = 0
15377 len = length(field[1])
15378 for (i = 2; i < nfields; i++) {
15379 key = field[i]
15380 keylen = length(key)
15381 if (S_is_set[key]) {
15382 value = S[key]
15383 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15384 len += length(value) + length(field[++i])
15385 substed = 1
15386 } else
15387 len += 1 + keylen
15388 }
15389
15390 print line
15391}
15392
15393_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015394_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015395cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15396if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15397 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15398else
15399 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015400fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015401 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015402_ACEOF
15403
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015404# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15405# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015406# trailing colons and then remove the whole line if VPATH becomes empty
15407# (actually we leave an empty line to preserve line numbers).
15408if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015409 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15410h
15411s///
15412s/^/:/
15413s/[ ]*$/:/
15414s/:\$(srcdir):/:/g
15415s/:\${srcdir}:/:/g
15416s/:@srcdir@:/:/g
15417s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015418s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015419x
15420s/\(=[ ]*\).*/\1/
15421G
15422s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015423s/^[^=]*=[ ]*$//
15424}'
15425fi
15426
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015427cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015428fi # test -n "$CONFIG_FILES"
15429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015430# Set up the scripts for CONFIG_HEADERS section.
15431# No need to generate them if there are no CONFIG_HEADERS.
15432# This happens for instance with `./config.status Makefile'.
15433if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015434cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015435BEGIN {
15436_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015438# Transform confdefs.h into an awk script `defines.awk', embedded as
15439# here-document in config.status, that substitutes the proper values into
15440# config.h.in to produce config.h.
15441
15442# Create a delimiter string that does not exist in confdefs.h, to ease
15443# handling of long lines.
15444ac_delim='%!_!# '
15445for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015446 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15447 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015448 break
15449 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015450 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015451 else
15452 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15453 fi
15454done
15455
15456# For the awk script, D is an array of macro values keyed by name,
15457# likewise P contains macro parameters if any. Preserve backslash
15458# newline sequences.
15459
15460ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15461sed -n '
15462s/.\{148\}/&'"$ac_delim"'/g
15463t rset
15464:rset
15465s/^[ ]*#[ ]*define[ ][ ]*/ /
15466t def
15467d
15468:def
15469s/\\$//
15470t bsnl
15471s/["\\]/\\&/g
15472s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15473D["\1"]=" \3"/p
15474s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15475d
15476:bsnl
15477s/["\\]/\\&/g
15478s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15479D["\1"]=" \3\\\\\\n"\\/p
15480t cont
15481s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15482t cont
15483d
15484:cont
15485n
15486s/.\{148\}/&'"$ac_delim"'/g
15487t clear
15488:clear
15489s/\\$//
15490t bsnlc
15491s/["\\]/\\&/g; s/^/"/; s/$/"/p
15492d
15493:bsnlc
15494s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15495b cont
15496' <confdefs.h | sed '
15497s/'"$ac_delim"'/"\\\
15498"/g' >>$CONFIG_STATUS || ac_write_fail=1
15499
15500cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15501 for (key in D) D_is_set[key] = 1
15502 FS = ""
15503}
15504/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15505 line = \$ 0
15506 split(line, arg, " ")
15507 if (arg[1] == "#") {
15508 defundef = arg[2]
15509 mac1 = arg[3]
15510 } else {
15511 defundef = substr(arg[1], 2)
15512 mac1 = arg[2]
15513 }
15514 split(mac1, mac2, "(") #)
15515 macro = mac2[1]
15516 prefix = substr(line, 1, index(line, defundef) - 1)
15517 if (D_is_set[macro]) {
15518 # Preserve the white space surrounding the "#".
15519 print prefix "define", macro P[macro] D[macro]
15520 next
15521 } else {
15522 # Replace #undef with comments. This is necessary, for example,
15523 # in the case of _POSIX_SOURCE, which is predefined and required
15524 # on some systems where configure will not decide to define it.
15525 if (defundef == "undef") {
15526 print "/*", prefix defundef, macro, "*/"
15527 next
15528 }
15529 }
15530}
15531{ print }
15532_ACAWK
15533_ACEOF
15534cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015535 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015536fi # test -n "$CONFIG_HEADERS"
15537
15538
15539eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15540shift
15541for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015542do
15543 case $ac_tag in
15544 :[FHLC]) ac_mode=$ac_tag; continue;;
15545 esac
15546 case $ac_mode$ac_tag in
15547 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015548 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015549 :[FH]-) ac_tag=-:-;;
15550 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15551 esac
15552 ac_save_IFS=$IFS
15553 IFS=:
15554 set x $ac_tag
15555 IFS=$ac_save_IFS
15556 shift
15557 ac_file=$1
15558 shift
15559
15560 case $ac_mode in
15561 :L) ac_source=$1;;
15562 :[FH])
15563 ac_file_inputs=
15564 for ac_f
15565 do
15566 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015567 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015568 *) # Look for the file first in the build tree, then in the source tree
15569 # (if the path is not absolute). The absolute path cannot be DOS-style,
15570 # because $ac_f cannot contain `:'.
15571 test -f "$ac_f" ||
15572 case $ac_f in
15573 [\\/$]*) false;;
15574 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15575 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015576 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015577 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015578 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15579 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015580 done
15581
15582 # Let's still pretend it is `configure' which instantiates (i.e., don't
15583 # use $as_me), people would be surprised to read:
15584 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015585 configure_input='Generated from '`
15586 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15587 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015588 if test x"$ac_file" != x-; then
15589 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015590 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15591$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015592 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015593 # Neutralize special characters interpreted by sed in replacement strings.
15594 case $configure_input in #(
15595 *\&* | *\|* | *\\* )
15596 ac_sed_conf_input=`$as_echo "$configure_input" |
15597 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15598 *) ac_sed_conf_input=$configure_input;;
15599 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015600
15601 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015602 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15603 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015604 esac
15605 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015606 esac
15607
Martin v. Löwiseba40652007-08-30 20:10:57 +000015608 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015609$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015610 X"$ac_file" : 'X\(//\)[^/]' \| \
15611 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015612 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015613$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015614 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15615 s//\1/
15616 q
15617 }
15618 /^X\(\/\/\)[^/].*/{
15619 s//\1/
15620 q
15621 }
15622 /^X\(\/\/\)$/{
15623 s//\1/
15624 q
15625 }
15626 /^X\(\/\).*/{
15627 s//\1/
15628 q
15629 }
15630 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015631 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015632 ac_builddir=.
15633
Martin v. Löwiseba40652007-08-30 20:10:57 +000015634case "$ac_dir" in
15635.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15636*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015637 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015638 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015639 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015640 case $ac_top_builddir_sub in
15641 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15642 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15643 esac ;;
15644esac
15645ac_abs_top_builddir=$ac_pwd
15646ac_abs_builddir=$ac_pwd$ac_dir_suffix
15647# for backward compatibility:
15648ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015649
15650case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015651 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015652 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015653 ac_top_srcdir=$ac_top_builddir_sub
15654 ac_abs_top_srcdir=$ac_pwd ;;
15655 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015656 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015657 ac_top_srcdir=$srcdir
15658 ac_abs_top_srcdir=$srcdir ;;
15659 *) # Relative name.
15660 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15661 ac_top_srcdir=$ac_top_build_prefix$srcdir
15662 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015663esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015664ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015665
Martin v. Löwis11437992002-04-12 09:54:03 +000015666
Martin v. Löwiseba40652007-08-30 20:10:57 +000015667 case $ac_mode in
15668 :F)
15669 #
15670 # CONFIG_FILE
15671 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015672
15673 case $INSTALL in
15674 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015675 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015677 ac_MKDIR_P=$MKDIR_P
15678 case $MKDIR_P in
15679 [\\/$]* | ?:[\\/]* ) ;;
15680 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15681 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015682_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015683
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015684cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015685# If the template does not know about datarootdir, expand it.
15686# FIXME: This hack should be removed a few years after 2.60.
15687ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015688ac_sed_dataroot='
15689/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015690 p
15691 q
15692}
15693/@datadir@/p
15694/@docdir@/p
15695/@infodir@/p
15696/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015697/@mandir@/p'
15698case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015699*datarootdir*) ac_datarootdir_seen=yes;;
15700*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15702$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015703_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015704cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015705 ac_datarootdir_hack='
15706 s&@datadir@&$datadir&g
15707 s&@docdir@&$docdir&g
15708 s&@infodir@&$infodir&g
15709 s&@localedir@&$localedir&g
15710 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015711 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015712esac
15713_ACEOF
15714
15715# Neutralize VPATH when `$srcdir' = `.'.
15716# Shell code in configure.ac might set extrasub.
15717# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015718cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15719ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015720$extrasub
15721_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015722cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015723:t
15724/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015725s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015726s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015727s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015728s&@srcdir@&$ac_srcdir&;t t
15729s&@abs_srcdir@&$ac_abs_srcdir&;t t
15730s&@top_srcdir@&$ac_top_srcdir&;t t
15731s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15732s&@builddir@&$ac_builddir&;t t
15733s&@abs_builddir@&$ac_abs_builddir&;t t
15734s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15735s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015736s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015737$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015738"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015739eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15740 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015741
Martin v. Löwiseba40652007-08-30 20:10:57 +000015742test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015743 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15744 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15745 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015747which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015748$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015749which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015750
Matthias Klose3cef2a92012-03-14 23:39:33 +010015751 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015752 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015753 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15754 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015755 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015756 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015757 ;;
15758 :H)
15759 #
15760 # CONFIG_HEADER
15761 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015762 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015763 {
15764 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015765 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15766 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015767 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015768 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015769 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15770$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015771 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015772 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015773 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015774 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015775 fi
15776 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015777 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015778 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015779 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015780 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015781 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015782
Martin v. Löwiseba40652007-08-30 20:10:57 +000015783
15784 esac
15785
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015786
15787 case $ac_file$ac_mode in
15788 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15789
15790 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015791done # for ac_tag
15792
Guido van Rossum627b2d71993-12-24 10:39:16 +000015793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015794as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015795_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015796ac_clean_files=$ac_clean_files_save
15797
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015798test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015799 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015800
Martin v. Löwis11437992002-04-12 09:54:03 +000015801
15802# configure is writing to config.log, and then calls config.status.
15803# config.status does its own redirection, appending to config.log.
15804# Unfortunately, on DOS this fails, as config.log is still kept open
15805# by configure, so config.status won't be able to write to it; its
15806# output is simply discarded. So we exec the FD to /dev/null,
15807# effectively closing config.log, so it can be properly (re)opened and
15808# appended to by config.status. When coming back to configure, we
15809# need to make the FD available again.
15810if test "$no_create" != yes; then
15811 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015812 ac_config_status_args=
15813 test "$silent" = yes &&
15814 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015815 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015816 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015817 exec 5>>config.log
15818 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15819 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015820 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015821fi
15822if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15824$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015825fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015826
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015827
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015828echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015829if test ! -f Modules/Setup
15830then
15831 cp $srcdir/Modules/Setup.dist Modules/Setup
15832fi
15833
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015834echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015835if test ! -f Modules/Setup.local
15836then
15837 echo "# Edit this file for local setup changes" >Modules/Setup.local
15838fi
15839
15840echo "creating Makefile"
15841$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15842 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015843 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015844
15845case $ac_sys_system in
15846BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015848
15849 Support for BeOS is deprecated as of Python 2.6.
15850 See PEP 11 for the gory details.
15851 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015852$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015853
15854 Support for BeOS is deprecated as of Python 2.6.
15855 See PEP 11 for the gory details.
15856 " >&2;}
15857 ;;
15858*) ;;
15859esac
15860
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015861mv config.c Modules